From 903b42ebc94ef8e155760d9d9ceeb8970682d5dd Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Tue, 7 Nov 2023 16:33:39 -0800 Subject: [PATCH] Cleanup shortcode calls --- content/en/about/security-model.md | 2 +- content/en/content-management/archetypes.md | 6 ++--- .../en/content-management/build-options.md | 8 +++---- .../image-processing/index.md | 4 ++-- content/en/content-management/menus.md | 6 ++--- content/en/content-management/multilingual.md | 20 ++++++++-------- content/en/content-management/page-bundles.md | 2 +- .../en/content-management/page-resources.md | 2 +- content/en/content-management/related.md | 4 ++-- content/en/content-management/sections.md | 2 +- content/en/content-management/shortcodes.md | 10 ++++---- content/en/content-management/summaries.md | 2 +- content/en/content-management/taxonomies.md | 6 ++--- content/en/content-management/toc.md | 4 ++-- content/en/content-management/urls.md | 14 +++++------ content/en/contribute/development.md | 2 +- content/en/functions/collections/After.md | 2 +- .../en/functions/collections/Dictionary.md | 4 ++-- .../en/functions/collections/IndexFunction.md | 4 ++-- content/en/functions/collections/Where.md | 2 +- content/en/functions/go-template/block.md | 6 ++--- .../en/functions/partials/IncludeCached.md | 2 +- .../functions/resources/ExecuteAsTemplate.md | 2 +- content/en/functions/safe/URL.md | 4 ++-- content/en/functions/urls/URLize.md | 4 ++-- .../getting-started/configuration-markup.md | 8 +++---- content/en/getting-started/configuration.md | 16 ++++++------- .../deployment-with-rsync.md | 2 +- .../hosting-on-github/index.md | 2 +- .../hosting-on-gitlab.md | 2 +- .../hosting-on-netlify.md | 6 ++--- content/en/hugo-pipes/postcss.md | 12 +++++----- content/en/methods/page/Description.md | 2 +- content/en/methods/page/HasShortcode.md | 6 ++--- content/en/methods/page/Page.md | 6 ++--- content/en/methods/page/Param.md | 2 +- content/en/methods/page/Params.md | 2 +- content/en/methods/page/RenderShortcodes.md | 6 ++--- content/en/methods/page/TranslationKey.md | 4 ++-- content/en/methods/pages/Related.md | 4 ++-- content/en/methods/resource/Content.md | 2 +- content/en/methods/resource/Name.md | 2 +- content/en/methods/resource/ResourceType.md | 2 +- content/en/methods/resource/Title.md | 2 +- content/en/methods/shortcode/Get.md | 8 +++---- content/en/methods/shortcode/Inner.md | 10 ++++---- content/en/methods/shortcode/InnerDeindent.md | 6 ++--- content/en/methods/shortcode/IsNamedParams.md | 4 ++-- content/en/methods/shortcode/Name.md | 2 +- content/en/methods/shortcode/Ordinal.md | 4 ++-- content/en/methods/shortcode/Page.md | 2 +- content/en/methods/shortcode/Params.md | 8 +++---- content/en/methods/shortcode/Parent.md | 6 ++--- content/en/methods/shortcode/Position.md | 2 +- content/en/methods/site/Config.md | 4 ++-- content/en/methods/site/Data.md | 4 ++-- .../taxonomy/_common/get-a-taxonomy-object.md | 2 +- content/en/templates/404.md | 2 +- content/en/templates/base.md | 6 ++--- content/en/templates/data-templates.md | 6 ++--- content/en/templates/homepage.md | 2 +- content/en/templates/internal.md | 6 ++--- content/en/templates/introduction.md | 16 ++++++------- content/en/templates/lists/index.md | 12 +++++----- content/en/templates/menu-templates.md | 8 +++---- content/en/templates/output-formats.md | 4 ++-- content/en/templates/partials.md | 4 ++-- content/en/templates/render-hooks.md | 6 ++--- content/en/templates/robots.md | 2 +- content/en/templates/section-templates.md | 2 +- content/en/templates/shortcode-templates.md | 24 +++++++++---------- content/en/templates/single-page-templates.md | 2 +- content/en/templates/sitemap-template.md | 4 ++-- content/en/templates/taxonomy-templates.md | 6 ++--- content/en/templates/views.md | 6 ++--- 75 files changed, 196 insertions(+), 196 deletions(-) diff --git a/content/en/about/security-model.md b/content/en/about/security-model.md index ed279b600..af1dd7d75 100644 --- a/content/en/about/security-model.md +++ b/content/en/about/security-model.md @@ -31,7 +31,7 @@ Hugo has a built-in security policy that restricts access to [os/exec](https://p The default configuration is listed below. Any build using features not in the allow list of the security policy will fail with a detailed message about what needs to be done. Most of these settings are allow lists (string or slice, [Regular Expressions](https://pkg.go.dev/regexp) or `none` which matches nothing). -{{< code-toggle config="security" />}} +{{< code-toggle config=security />}} Note that these and other configuration settings in Hugo can be overridden by the OS environment. If you want to block all remote HTTP fetching of data: diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index ff825f0de..94f038848 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -19,7 +19,7 @@ A content file consists of [front matter] and markup. The markup is typically ma The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype: -{{< code-toggle file="archetypes/default.md" fm=true >}} +{{< code-toggle file=archetypes/default.md fm=true >}} title = '{{ replace .File.ContentBaseName `-` ` ` | title }}' date = '{{ .Date }}' draft = true @@ -33,7 +33,7 @@ hugo new content posts/my-first-post.md With the default archetype shown above, Hugo creates this content file: -{{< code-toggle file="content/posts/my-first-post.md" fm=true >}} +{{< code-toggle file=content/posts/my-first-post.md fm=true >}} title = 'My First Post' date = '2023-08-24T11:49:46-07:00' draft = true @@ -85,7 +85,7 @@ Although typically used as a front matter template, you can also use an archetyp For example, in a documentation site you might have a section (content type) for functions. Every page within this section should follow the same format: a brief description, the function signature, examples, and notes. We can pre-populate the page to remind content authors of the standard format. -{{< code file="archetypes/functions.md" >}} +{{< code file=archetypes/functions.md >}} --- date: '{{ .Date }}' draft: true diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index 918635cfc..40704d9a0 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -14,7 +14,7 @@ aliases: [/content/build-options/] Build options are stored in a reserved front matter object named `_build` with these defaults: -{{< code-toggle file="content/example/index.md" fm=true >}} +{{< code-toggle file=content/example/index.md fm=true >}} [_build] list = 'always' publishResources = true @@ -93,7 +93,7 @@ title = 'Headless page' To include the content and images on the home page: -{{< code file="layouts/_default/home.html" lang=go-html-template >}} +{{< code file=layouts/_default/home.html lang=go-html-template >}} {{ with .Site.GetPage "/headless" }} {{ .Content }} {{ range .Resources.ByType "image" }} @@ -153,7 +153,7 @@ In the front matter above, note that we have set `list` to `local` to include th To include the content and images on the home page: -{{< code file="layouts/_default/home.html" lang=go-html-template >}} +{{< code file=layouts/_default/home.html lang=go-html-template >}} {{ with .Site.GetPage "/headless" }} {{ range .Pages }} {{ .Content }} @@ -199,7 +199,7 @@ content/ Set the build options in front matter, using the `cascade` keyword to "cascade" the values down to descendant pages. -{{< code-toggle file="content/glossary/_index.md" fm=true >}} +{{< code-toggle file=content/glossary/_index.md fm=true >}} title = 'Glossary' [_build] render = 'always' diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 9e6431261..01728f558 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -415,7 +415,7 @@ _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pe This is the shortcode used to generate the examples above: -{{< readfile file="layouts/shortcodes/imgproc.html" highlight="go-html-template" >}} +{{< readfile file=layouts/shortcodes/imgproc.html highlight=go-html-template >}} Call the shortcode from your Markdown like this: @@ -433,7 +433,7 @@ Note the self-closing shortcode syntax above. You may call the `imgproc` shortco Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options). -{{< code-toggle config="imaging" />}} +{{< code-toggle config=imaging />}} anchor : See image processing options: [anchor](#anchor). diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 5cd90aaba..e2a72f124 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -46,7 +46,7 @@ This creates a menu structure that you can access with `site.Menus.main` in your To add a page to the "main" menu: -{{< code-toggle file="content/about.md" fm=true >}} +{{< code-toggle file=content/about.md fm=true >}} title = 'About' menu = 'main' {{< /code-toggle >}} @@ -55,7 +55,7 @@ Access the entry with `site.Menus.main` in your templates. See [menu templates] To add a page to the "main" and "footer" menus: -{{< code-toggle file="content/contact.md" fm=true >}} +{{< code-toggle file=content/contact.md fm=true >}} title = 'Contact' menu = ['main','footer'] {{< /code-toggle >}} @@ -94,7 +94,7 @@ weight This front matter menu entry demonstrates some of the available properties: -{{< code-toggle file="content/products/software.md" fm=true >}} +{{< code-toggle file=content/products/software.md fm=true >}} title = 'Software' [menu.main] parent = 'Products' diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index aa9c44401..249be56f8 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -21,7 +21,7 @@ Also See [Hugo Multilingual Part 1: Content translation]. This is the default language configuration: -{{< code-toggle config="languages" />}} +{{< code-toggle config=languages />}} This is an example of a site configuration for a multilingual project. Any key not defined in a `languages` object will fall back to the global value in the root of your site configuration. @@ -277,7 +277,7 @@ To localize URLs: For example, a French translation can have its own localized slug. -{{< code-toggle file="content/about.fr.md" fm=true >}} +{{< code-toggle file=content/about.fr.md fm=true >}} title: A Propos slug: "a-propos" {{< /code-toggle >}} @@ -303,7 +303,7 @@ Page Bundle resources follow the same language assignment logic as content files To create a list of links to translated content, use a template similar to the following: -{{< code file="layouts/partials/i18nlist.html" >}} +{{< code file=layouts/partials/i18nlist.html >}} {{ if .IsTranslated }}

{{ i18n "translations" }}