mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00:00
2e711a28c7
af4b7ac5bRemove mention of Amber and Acec841e9207Exif docs corrections (#978)0f82420b8Change cache assets default example to 1 year676dc6e12Release 0.61.0a1d9fb18aMerge commit '79c5d7053486f540b6219e693d5590f2c4c3937a'1b9e675cdreleaser: Add release notes to /docs for release of 0.61.05b95cbc8aFixed suffixIsRemoved error in code samples (#975)59b2c245bFix Usage section in toc.md to consider Goldmark TOC settingsfd3828673Add link on how to configure TOC w/ Goldmarkea339f2d6Added external learning resources including Hugo In Action book.fab502d5dAdjust release notes269a025efRelease 0.60.16bff50beaMerge branch 'temp601'e15251c43releaser: Add release notes to /docs for release of 0.60.1690b864b9Update use-modules.md345ca8c36Update syntax-highlighting.mdbe64af9f5Update syntax-highlighting.mddf9dead83Update syntax-highlighting.md1c6e6d238Fix relnotes0ea6b2012Update homepagetweets.toml2c465625dUpdate index.md0025bba09Update index.md7417f1c05Update index.md9eeb8ce57Release 0.60.025a711023Merge branch 'temp60'0c4faab0ereleaser: Add release notes to /docs for release of 0.60.0779e5108eUpdate installing.md2ef1c386aMinor text improvements in README.md41ec5a19aReword sentence for clarity search.mdded74f098Add Goldmark as the new default markdown handlercb55cdbb0Update introduction.mdfcaad653aUpdate homepage.md7427a1fc5Update configuration.md8cc2c72catpl/collections: Allow dict to create nested structures4538c092cMerge commit 'efc0b1bb6c6564f54d596467dbc6a18cb206954e'90f908e7bSupport Go time format strings in permalinks git-subtree-dir: docs git-subtree-split:af4b7ac5b4
35 lines
1.4 KiB
HTML
35 lines
1.4 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 }}
|
|
{{ 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 . | 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>
|