mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-02 11:42:37 +00:00
13e64d7276
6b00298bbRemove outdated "related example"987f1e1cdFix dead links (#601)96287a20aAdd config option "summaryLength" (#600)ced7f2085Adjust Over showcasee334a6354Add new showcase: over10435b502Add warning about privacy options only work with internal templates (#525)48c6b0e4dMinor grammatical fix684670ebcAdd quote0e9fada52Improvements to taxonomy template examplese06c4bf73Add syntax highlighting; consistent 4-space indentationc1cb3f081Remove dead links for custom permalinks3e3aefd04Fix0a671bc375d65888685fix file name in 'Add Non-content Entries to a Menu' code toggle (#547)1a0563857Add Solus install guide (#590)8a0d65b0dUpdate Windows Installation instructions (#564)c4348636aFix typo0a671bc37Add post to menu exampleaf14497c6Add notes for `os.Stat` (Hugo 0.47) (#557)e49f65bb3Singular to pluralcb5608dbfUpdate introduction.md30b060dffAdd variable re-definition example (Hugo v0.48+)21123967eMinor editsfac3df043Refresh the Go Templates introduction4a9600e92Updating URL to how-to-guide for hosting hugo site on firebasebfaa7779cadd missing wordc2cb5d09bTweak 'name: weight' to 'name: date' in example (#582)5ea938ad6Remove some Scratch2708dcd57Release 0.48e375d0f05Merge branch 'temp48'75e36c160releaser: Prepare repository for 0.49-DEVa6102f253releaser: Add release notes to /docs for release of 0.4841fc35db4releaser: Bump versions for release of 0.4864b9ecc74Spell out the npm command for installing PostCSS19e900a17Improved Related Content docfe21600e7Merge commit '844aef544c19e9d8f529b4f8144e089d0982bb34'844aef544Squashed 'themes/gohugoioTheme/' changes from 66249819..68ddff44069828db8Update git.mdd881d1433Make default "related" behavior more explicit60b9160ebAdd docs for displaying 404 page on CloudFrontb72ebc760Add .gitattributes to /resources000cf85f4Make the pros/cons styling consistent for summaries; use desc listebf1da97aAdd note about outputStyle compressede3338ee91Triple backquote syntax fix361962a7cAdd one more Blogger to Hugo tool for Windows (.NET Framework 4.5) (#540)066606a21Fix wrong link about Mmark Syntax Documentfaee70757Added exitwp-for-hugo6b4108051Add hugo-wrapper to starter-kits4695dfba2Added Utterances as Comments Alternatives.c7ba9e3e1Correct typobeb850d9fRelease 0.47.11cf417c8aMerge branch 'temp471'0843bc46creleaser: Prepare repository for 0.48-DEV8ff5c8b70releaser: Add release notes to /docs for release of 0.47.1e2353434dreleaser: Bump versions for release of 0.47.1ffb1300afUpdate development.mdc22234ea5netlify: Minify output5b9191c56Release 0.47bfd92cf52releaser: Prepare repository for 0.48-DEVac7acf730releaser: Add release notes to /docs for release of 0.47b0096099dreleaser: Bump versions for release of 0.4786a7ae459docs: Regenerate CLI docsd2c8b72bcMerge commit 'a95896878f4b4a79448b39ce93a4e0d3258b4a43'84de7ef59Merge commit '3a44bf182fed5f34621f450114083a6dd7e88a07' git-subtree-dir: docs git-subtree-split:6b00298bb2
26 lines
1.1 KiB
HTML
26 lines
1.1 KiB
HTML
{{ $file := .Get "file" }}
|
|
{{ $codeLang := "" }}
|
|
{{ $suffix := findRE "(\\.[^.]+)$" $file 1 }}
|
|
{{ with $suffix }}
|
|
{{ $codeLang = (index . 0 | strings.TrimPrefix ".") }}
|
|
{{ end }}
|
|
{{ with .Get "codeLang" }}{{ $codeLang = . }}{{ end }}
|
|
{{ if eq $codeLang "html"}}
|
|
{{ $codeLang = "go-html-template" }}
|
|
{{ 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 $codeLang }}{{- highlight $.Inner . "" | -}}{{ else }}<pre><code>{{- .Inner | string -}}</code></pre>{{ end }}{{ end }}
|
|
</div>
|
|
|
|
</div>
|