diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index e49711e7c..41c20d48e 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -25,7 +25,7 @@ Hugo comes with all the code you need to load Disqus into your templates. Before Disqus comments require you set a single value in your [site's configuration file][configuration] like so: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} disqusShortname = "yourDisqusShortname" {{ code-toggle >}} diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index c361bcc41..657302930 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -146,7 +146,7 @@ You can add fields to your front matter arbitrarily to meet your needs. These us The following fields can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables] section provides more information on using Hugo's page- and site-level variables in your templates. -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} include_toc: true show_comments: false {{ code-toggle >}} @@ -159,7 +159,7 @@ Any node or section can pass down to descendants a set of Front Matter values as The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets. -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} title ="Blog" [[cascade]] background = "yosemite.jpg" @@ -193,7 +193,7 @@ Any of the above can be omitted. In `content/blog/_index.md` -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} title: Blog cascade: banner: images/typewriter.jpg diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index 9e2312a5d..fc2426958 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -139,7 +139,7 @@ params ### Resources metadata example -{{< code-toggle copy="false">}} +{{< code-toggle copy=false >}} title: Application date : 2018-01-25 resources : @@ -185,7 +185,7 @@ The counter starts at 1 the first time they are used in either `name` or `title` For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as: -{{< code-toggle copy="false">}} +{{< code-toggle copy=false >}} [[resources]] src = "*specs.pdf" title = "Specification #:counter" diff --git a/content/en/content-management/static-files.md b/content/en/content-management/static-files.md index 20a1442e6..6bff7fd6f 100644 --- a/content/en/content-management/static-files.md +++ b/content/en/content-management/static-files.md @@ -28,7 +28,7 @@ This union filesystem will be served from your site root. So a file Here's an example of setting `staticDir` and `staticDir2` for a multi-language site: -{{< code-toggle copy="false" file="config" >}} +{{< code-toggle copy=false file="config" >}} staticDir = ["static1", "static2"] [languages] diff --git a/content/en/content-management/taxonomies.md b/content/en/content-management/taxonomies.md index 85e3a4c51..8c3ef53e5 100644 --- a/content/en/content-management/taxonomies.md +++ b/content/en/content-management/taxonomies.md @@ -83,7 +83,7 @@ Hugo natively supports taxonomies. Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -91,7 +91,7 @@ Without adding a single line to your [site config][config] file, Hugo will autom If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site config][config] to the following: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} disableKinds = ["taxonomy","term"] {{ code-toggle >}} @@ -114,7 +114,7 @@ Custom taxonomies other than the [defaults](#default-taxonomies) must be defined While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_. {{% /note %}} -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -125,7 +125,7 @@ While adding custom taxonomies, you need to put in the default taxonomies too, _ If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site config][config]. -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} [taxonomies] tag = "tags" {{ code-toggle >}} @@ -156,7 +156,7 @@ If you would like the ability to quickly generate content files with preconfigur ### Example: Front Matter with Taxonomies -{{< code-toggle copy="false">}} +{{< code-toggle copy=false >}} title = "Hugo: A fast and flexible static site generator" tags = [ "Development", "Go", "fast", "Blogging" ] categories = [ "Development" ] @@ -173,7 +173,7 @@ The following show a piece of content that has a weight of 22, which can be used ### Example: Taxonomic `weight` -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} title = "foo" tags = [ "a", "b", "c" ] tags_weight = 22 diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index 713e2d812..c9e78d419 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -29,7 +29,7 @@ You can change the structure and appearance of URLs with front matter values and Set the `slug` in front matter to override the last segment of the path. The `slug` value does not affect section pages. -{{< code-toggle file="content/posts/post-1.md" copy="false" fm=true >}} +{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}} title = 'My First Post' slug = 'my-first-post' {{< /code-toggle >}} @@ -46,7 +46,7 @@ Set the `url` in front matter to override the entire path. Use this with either With this front matter: -{{< code-toggle file="content/posts/post-1.md" copy="false" fm=true >}} +{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}} title = 'My First Article' url = '/articles/my-first-article' {{< /code-toggle >}} @@ -59,7 +59,7 @@ https://example.org/articles/my-first-article/ If you include a file extension: -{{< code-toggle file="content/posts/post-1.md" copy="false" fm=true >}} +{{< code-toggle file="content/posts/post-1.md" copy=false fm=true >}} title = 'My First Article' url = '/articles/my-first-article.html' {{< /code-toggle >}} @@ -111,7 +111,7 @@ content/ Create a date-based hierarchy, recursively, for regular pages within the `posts` section: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} posts = '/posts/:year/:month/:title/' {{< /code-toggle >}} @@ -133,7 +133,7 @@ public/ To create a date-based hierarchy for regular pages in the content root: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} '/' = '/:year/:month/:title/' {{< /code-toggle >}} @@ -143,7 +143,7 @@ A URL pattern defined for the content root is not recursive. Use the same approach with taxonomies. For example, to omit the taxonomy segment of the URL: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} 'tags' = '/:title/' {{< /code-toggle >}} @@ -196,7 +196,7 @@ For time-related values, you can also use the layout string components defined i [time package]: https://pkg.go.dev/time#pkg-constants -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} permalinks: posts: /:06/:1/:2/:title/ {{< /code-toggle >}} @@ -212,7 +212,7 @@ pretty|content/about.md|`https://example.org/about/` By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} uglyURLs = true {{< /code-toggle >}} @@ -239,7 +239,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} canonifyURLs = true {{< /code-toggle >}} @@ -262,7 +262,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy="false" >}} +{{< code-toggle file="config" copy=false >}} relativeURLs = true {{< /code-toggle >}} @@ -277,7 +277,7 @@ Create redirects from old URLs to new URLs with aliases: Change the file name of an existing page, and create an alias from the previous URL to the new URL: -{{< code-toggle file="content/posts/new-file-name.md" copy="false" >}} +{{< code-toggle file="content/posts/new-file-name.md" copy=false >}} aliases = ['/posts/previous-file-name'] {{< /code-toggle >}} @@ -289,13 +289,13 @@ Each of these directory-relative aliases is equivalent to the site-relative alia You can create more than one alias to the current page: -{{< code-toggle file="content/posts/new-file-name.md" copy="false" >}} +{{< code-toggle file="content/posts/new-file-name.md" copy=false >}} aliases = ['previous-file-name','original-file-name'] {{< /code-toggle >}} In a multilingual site, use a directory-relative alias, or include the language prefix with a site-relative alias: -{{< code-toggle file="content/posts/new-file-name.de.md" copy="false" >}} +{{< code-toggle file="content/posts/new-file-name.de.md" copy=false >}} aliases = ['/de/posts/previous-file-name'] {{< /code-toggle >}} diff --git a/content/en/functions/delimit.md b/content/en/functions/delimit.md index 533af0523..10045b780 100644 --- a/content/en/functions/delimit.md +++ b/content/en/functions/delimit.md @@ -31,12 +31,10 @@ To maintain a consistent output order, maps will be sorted by keys and only a sl The examples of `delimit` that follow all use the same front matter: -{{< code file="delimit-example-front-matter.toml" nocopy="true" >}} -+++ -title: I love Delimit +{{< code-toggle file="content/about.md" copy=false fm=true >}} +title: About tags: [ "tag1", "tag2", "tag3" ] -+++ -{{< /code >}} +{{< /code-toggle >}} {{< code file="delimit-page-tags-input.html" >}}
Tags: {{ delimit .Params.tags ", " }}
diff --git a/content/en/functions/urlize.md b/content/en/functions/urlize.md index 048946cd3..df939eba1 100644 --- a/content/en/functions/urlize.md +++ b/content/en/functions/urlize.md @@ -19,7 +19,7 @@ relatedfuncs: [] The following examples pull from a content file with the following front matter: -{{< code file="content/blog/greatest-city.md" copy="false">}} +{{< code file="content/blog/greatest-city.md" copy="false" >}} +++ title = "The World's Greatest City" location = "Chicago IL" diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index a6985edbf..568481848 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -649,13 +649,13 @@ To exclude specific files from the `content` and `data` directories when renderi To ignore files ending with `.foo` or `.boo`: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} ignoreFiles = ['\.foo$', '\.boo$'] {{< /code-toggle >}} To ignore a file using the absolute file path: -{{< code-toggle copy="false" >}} +{{< code-toggle copy=false >}} ignoreFiles = ['^/home/user/project/content/test\.md$'] {{< /code-toggle >}} diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 14ebbda28..87c479f6d 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -624,7 +624,7 @@ content/ └── event-3.md ``` -{{< code-toggle file="content/events/event-1.md" copy="false" >}} +{{< code-toggle file="content/events/event-1.md" copy=false >}} title = 'Event 1' date = 2021-12-06T10:37:16-08:00 draft = false