mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-02 11:42:37 +00:00
8d9511a08f
316cec249Update future events template example (#1595)3bde7d489Install mage outside module (#1592)762e27effClarify ignoreFiles regex matching4d0032051Add id attribute to h2 elements (#1590)8262b077cImprove inline resource examples (#1587)2eae7c7ecfix disqus example name (#1588)a772f4804Added install instructions for openSUSE Tumbleweed (#1459)7ad1c301bRemove screen capture from Hosting on GitHub page (#1586)a58541f49add more details on about gh-pages and baseURL on hosting-on-github.md (#1346)3bd0b46dcUpdate configuration page (#1585)4cf1f013eUpdate OS functions2c45a95c2Remove getting-started/code-toggle/40fdff598Describe artificial language private use subtags (#1577)91011d210Remove google_news from list of internal templates (#1576)36c7879e4Update the .Unix function731063488Remove a showcase818c371a0Update index.md3136d39d9netlify: Hugo 0.89.4092bc9278Merge branch 'tempv0.89.4'18e01f105releaser: Add release notes to /docs for release of 0.89.479135281fCorrect and sort list of target image formats (#1574)af4170c7enetlify: Hugo 0.89.37f5444251Merge branch 'tempv0.89.3'a32e4a6c2releaser: Add release notes to /docs for release of 0.89.36dd3dc3f9Update configuration.md5fbe741d7Update index.md (#1570)37a69496fnetlify: Bump to Hugo 0.89.23b293f1f4Merge branch 'tempv0.89.2'64c934e7areleaser: Add release notes to /docs for release of 0.89.2919c51c7dUpdate index.md13dd463b1netlify: Hugo 0.89.1d8cda1474releaser: Add release notes to /docs for release of 0.89.1a2adf7742releaser: Add release notes to /docs for release of 0.89.1c3088c4fcAdd code toggle to menus page (#1568)2d0f38978Remove blank lines from code-toggle output (#1564)7cf058bfdAdd localization examples (#1563)cf8627c2eFixing typos, fixing incomplete link (#1561)c78cc014bDocument the removePathAccents setting70beddaf4Make corrections to 0.89.0 release notes (#1560)1917195f0Update index.md7fb8e070cRun hugo --gc1772d45fbRelease 0.89.0d9006179bMerge branch 'tempv0.89.0'8db86b61ereleaser: Add release notes to /docs for release of 0.89.0abf268571docs: Regen CLI docsfbbdb0ab1Update the timeout default9cbd1c15aFix description of lang.FormatNumberCustom6043b54ccRemove "render" keyword from Host on Render pagef8ea8e84fClarify description of front matter url (#1557)91a0c9954Update Twitter shortcode oEmbed endpoint79a7405b8Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e'57667bae6hugofs: Add includeFiles and excludeFiles to mount configuration0c9ee0a04Allow multiple plugins in the PostCSS options map155799e6bdocs: Create path.Clean documentation git-subtree-dir: docs git-subtree-split:316cec2494
42 lines
1.6 KiB
HTML
42 lines
1.6 KiB
HTML
{{ $file := .Get "file" }}
|
|
{{ $code := "" }}
|
|
{{ with .Get "config" }}
|
|
{{ $file = $file | default "config" }}
|
|
{{ $sections := (split . ".") }}
|
|
{{ $configSection := index $.Site.Data.docs.config $sections }}
|
|
{{ $code = dict $sections $configSection }}
|
|
{{ if $.Get "skipHeader"}}
|
|
{{ $code = $configSection }}
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ $code = $.Inner }}
|
|
{{ end }}
|
|
{{ $langs := (slice "yaml" "toml" "json") }}
|
|
<div class="code relative" {{ with $file }}id="{{ . | urlize}}"{{ end }}>
|
|
<div class="code-nav flex flex-nowrap items-stretch">
|
|
{{- with $file -}}
|
|
<div class="san-serif f6 dib lh-solid pl2 pv2 mr2">
|
|
{{ . }}.
|
|
</div>
|
|
{{- end -}}
|
|
{{ range $langs }}
|
|
<button data-toggle-tab="{{ . }}" class="tab-button {{ cond (eq . "yaml") "active" ""}} ba san-serif f6 dib lh-solid ph2 pv2">
|
|
{{ . }}
|
|
</button>
|
|
|
|
{{ end }}
|
|
</div>
|
|
<div class="tab-content">
|
|
{{ range $langs }}
|
|
<div data-pane="{{ . }}" class="code-copy-content nt3 tab-pane {{ cond (eq . "yaml") "active" ""}}">
|
|
{{ highlight ($code | transform.Remarshal . | replaceRE `\n+` "\n" | safeHTML) . "" }}
|
|
</div>
|
|
{{ if ne ($.Get "copy") "false" }}
|
|
<button class="needs-js copy copy-toggle 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}}
|
|
{{ end }}
|
|
</div>
|
|
|
|
</div>
|