mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-25 07:48:52 +00:00
c029065582
4e7e1815bFix some typosd23d8f5c4Remove 'fundamentals' category from function pages52fa65e15Mention Chroma as the preferred syntax highlighter64ca535dbMerge commit '8762aee8afe30bec6f1fbc9560749983dc44d60b'8762aee8aSquashed 'themes/gohugoioTheme/' changes from 396b859f..6f3a8bf503f0673a9Move the gopher to the theme320e268cdSpellinge45b640f7More layout lookup workfe0ad9d9dSync the YAML config menu example with TOML'sb9505fc70Remove template reference to ordinal numbers0fa2532d3Remove deprecated Hugoidx, add native hugo solution2152b907cFix a link in the last commit47614f416Manually specifying heading anchors in Markdown content9d6770d2aRelease notes 0.37.1e1eed8b27Remove some unused imagese960046f5releaser: Prepare repository for 0.38-DEV4fa83a4eereleaser: Add release notes to /docs for release of 0.37.146c879995releaser: Bump versions for release of 0.37.1fb3ac5a3ereleaser: Prepare repository for 0.38-DEV4870c8e7bUpdate archetypes.md232c0b578Merge commit '2b18014fd0aa99e9f1a5610ba875101351a90de3'2b18014fdSquashed 'themes/gohugoioTheme/' changes from fe71e360..396b859f62567e9aaAdd some "writing guidelines"7cfd530d2Revise the archetype docs5d4c3c03cUpdate data-templates.mde5fee3099Update page-bundles.mdca7f03c8dUpdate page-bundles.md2a7fdc269Fix typo 'vailable' to 'available' line 53999b75201LastMod should be Lastmod?099f46ca5Fix spacing in content-management/types.md6bcdc58efWord choice improvements20e8a21f6update rss linking docs7ef44d262Add some missing configuration entriesf1c7aa568Sort config list5cb8ceadeCreate a proper definition list for the configuration settings25dffe4acSend custom dimensions in GA55df01a34Fix broken gtag6c8772aadAdd site to GA confige63acb894Remove conflicting release note for 0.35f30083a23Add branch to GA config99caedb96Set the small-multiples to draft4a33c70abPolish the Small Multiples showcase7b2f1ea2eAdd small multiples showcasee78e96baeAdd new sponsorc42943041updated to new Forestry logoe07eda273Add OS env to faq414f0dbc6Release Hugo 0.3785f0cc324Merge branch 'temp37'1e6da9497Rebuild images75e97adfcreleaser: Add release notes to /docs for release of 0.3750b887cb0releaser: Bump versions for release of 0.377acf73ba3Merge commit '900b5f6cfe5a377ef369d26cd700201be4cf6b06'819d02c30Merge commit '374d184e6747678364fd61f5faf328ec9205eb6b'c7eacf018Fix typos in development contribution doc git-subtree-dir: docs git-subtree-split:4e7e1815b7
23 lines
1.1 KiB
HTML
23 lines
1.1 KiB
HTML
{{ $file := .Get "file" }}
|
|
{{ $.Scratch.Set "codeLang" "" }}
|
|
{{ $suffix := findRE "(\\.[^.]+)$" $file 1 }}
|
|
{{ with $suffix }}
|
|
{{ $.Scratch.Set "codeLang" (index . 0 | strings.TrimPrefix ".") }}
|
|
{{ end }}
|
|
{{ with .Get "codeLang" }}{{ $.Scratch.Set "codeLang" . }}{{ end }}
|
|
<div class="code relative" id="{{ $file | urlize}}">
|
|
{{- with $file -}}
|
|
<div class="filename san-serif f6 dib lh-solid pl2 pv2">{{.}}</div>
|
|
{{- end -}}
|
|
|
|
{{ if ne (.Get "copy") "false" }}
|
|
<button class="needs-js copy bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button">
|
|
</button>
|
|
{{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
|
|
{{end}}
|
|
<div class="code-copy-content nt3" {{with .Get "download"}}id="{{.}}"{{end}}>
|
|
{{ if .Get "nocode" }}{{ $.Inner }}{{ else }}{{ with $.Scratch.Get "codeLang" }}{{- highlight $.Inner . "" | -}}{{ else }}<pre><code>{{- .Inner | string -}}</code></pre>{{ end }}{{ end }}
|
|
</div>
|
|
|
|
</div>
|