mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
content: Miscellaneous edits
This commit is contained in:
@@ -213,7 +213,7 @@ copy
|
||||
: (`bool`) Whether to display a copy-to-clipboard button. Default is `false`.
|
||||
|
||||
file
|
||||
: (`string`) The file name to display.
|
||||
: (`string`) The file name to display above the rendered code.
|
||||
|
||||
lang
|
||||
: (`string`) The code language. If you do not provide a `lang` argument, the code language is determined by the file extension. If the file extension is `html`, sets the code language to `go-html-template`. Default is `text`.
|
||||
@@ -233,11 +233,14 @@ config
|
||||
copy
|
||||
: (`bool`) Whether to display a copy-to-clipboard button. Default is `false`.
|
||||
|
||||
datakey:
|
||||
: (`string`) The section of `site.Data.docs` to render.
|
||||
|
||||
file
|
||||
: (`string`) The file name to display. Omit the file extension for site configuration examples.
|
||||
: (`string`) The file name to display above the rendered code. Omit the file extension for site configuration examples.
|
||||
|
||||
fm
|
||||
: (`bool`) Whether the example is front matter. Default is `false`.
|
||||
: (`bool`) Whether to render the code as front matter. Default is `false`.
|
||||
|
||||
skipHeader
|
||||
: (`bool`) Whether to omit top-level key(s) when rendering a section of `site.Data.docs.config`.
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
|
||||
|
||||
@param {string} [config] The section of site.Data.docs.config to render.
|
||||
@param {bool} [copy=false] If true, display a copy to clipboard button.
|
||||
@param {bool} [copy=false] Whether to display a copy-to-clipboard button.
|
||||
@param {string} [dataKey] The section of site.Data.docs to render.
|
||||
@param {string} [file] The file name to display above the rendered code.
|
||||
@param {bool} [fm=false] If true, render the code as front matter.
|
||||
@param {bool} [skipHeader=false] If false, omit top level key(s) when rendering a section of site.Data.docs.config.
|
||||
@param {bool} [fm=false] Whether to render the code as front matter.
|
||||
@param {bool} [skipHeader=false] Whether to omit top level key(s) when rendering a section of site.Data.docs.config.
|
||||
|
||||
@example {{< code-toggle file=hugo config=build />}}
|
||||
|
||||
@@ -72,7 +72,7 @@ Renders syntax-highlighted configuration data in JSON, TOML, and YAML formats.
|
||||
<div x-data class="shortcode-code not-prose relative p-0 mt-6 mb-8">
|
||||
{{- if $copy }}
|
||||
<svg
|
||||
class="absolute right-4 top-12 z-30 text-blue-600 hover:text-blue-500 cursor-pointer w-6 h-6"
|
||||
class="absolute right-3 top-12 z-30 text-blue-600 hover:text-blue-500 cursor-pointer w-6 h-6"
|
||||
@click="$copy($refs[$store.nav.userSettings.settings.configFileType])">
|
||||
<use href="#icon--copy"></use>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user