From bb147f91ee9078e6a55e8c32ab4b2e5dbc5cee45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 7 Jul 2025 13:16:31 +0200 Subject: [PATCH] Squashed 'docs/' changes from b654fcba0..60dd993a6 60dd993a6 content: Update GitHub Pages workflow 6247e3590 content: Fix typo a22255b0b content: Update version references 21afec198 content: Update version reference 6226532c8 content: Update version reference 80d26621a content: Update version reference cda7135b5 content: Fix typo 70c509e8a content: Fix typo 136b20310 content: Change render hook example 038246c2f content: Fix accidental removal 441375fa4 netlify: Hugo 0.147.9 4a620931c content: Note that config/env/cascade.xxx is not supported 6d3a7587f config: Ignore front matter param override warnings 623b48624 content: Set searchable param to false for content/en/documentation.md d1b2aad69 content: Fix Codeberg deployment article 5e3d849b8 search: Use front matter parameter to control search indexing b4f90e39d content: Note that PATH segments must exclude project directory a81406e26 content: Create aliases for deleted template pages 7c3adc9ad content: Change order of template types e093eb036 content: Remove admonition from template types page 0015e7a9b content: Update to align with v0.146.0 template system (phase 1) cf986240d content: Update templates.Defer note ab51fdcc7 content: Use consistent templates.Defer examples b4f8e492f content: Fix formatting 62aa94add content: Fix typo 83747f36b content: Update FAQs fc644d894 Update netlify.toml 4151f3a5b content: Fix typo 9452bca92 content: Update description ToMath strict option 982b863c3 content: Add instructions about deploying to root of user's Codeberg Pages fc7cd2878 theme: Generate QR code once per page 784891b87 content: Update links to the CommonMark specification 741113fb5 content: Fix incorrect link to Shortcodes tutorial c4962f1ac content: Update transform.ToMath ad7b87223 Update netlify.toml 2d64e57ae theme: Remove bullet from new-in badge 55a832f8e Update ToMath.md e1e624f49 content: Document transform.ToMath strict mode 2df6218f8 netlify: Hugo 0.147.6 0259b88f1 Revert "theme: Display date on news items from content adapter" 43b35e56a theme: Adjust admonition dark mode colors 2f15e9c34 theme: Add link to Mastodon d99e979d4 theme: Display date on news items from content adapter 6c93dac97 content: Clarify the AddResource content value 49006468e content: Describe Codeberg's Forgejo Actions be80c3b82 content: Update css.TailwindCSS opts b3ba4329c theme: Update css.TailwindCSS opts and remove tailwind.config.js 902e360b0 content: Update stylesheet link for katex.js 8b9e1ba3e content: Update stylesheet link for katex.js 7dae3b0e8 content: Update TailwindCSS instructions cb093d210 Update netlify.toml 577d6fbb1 content: Remove GitCMS for now 8352af6cd Updates for v0.147.4 2240f07a5 content: Fix typo 677b3fed3 Correct openapi3.Unmarshal example 580477aa5 content: Fix typo 0dc43b481 content: Add GitCMS to commercial front ends list ac4179f2b content: Fix relref shortcode examples a699d267b Fix typos 7e28c4380 Make sponsor logo responsive 8e05f0425 Update MaxInt64.md f715265d3 content: Document math.MaxInt64 0d57ff7d4 Update netlify.toml d210e3476 theme: Adjust sponsor e73444b43 content: Clarify page title values fd4c292b8 content: Fix links to Pandoc dd074dc67 content: Bump version in GitHub Pages example fe5537bb2 content: Describe the pandoc format 10834529e theme: Remove duplicate meta element 838706d6e theme: More changes related to new template system b0b6b1e69 Update new-templatesystem-overview.md e719d2360 Update new-templatesystem-overview.md ec2bbd395 Update new-templatesystem-overview.md 53319a681 Add a one pager about the new template system e17416c05 Fix the spelling issue on the Host on Render description e8e1c82aa content: Document range-over-int introduced in v0.123.0 bc478f98f content: Fix editing errors 606547b48 Update netlify.toml e224f3f82 content: Fix formatting 24e4acc41 content: Fix typo 1e773f34b content: Fix typo 5ef94a725 content: Document alternative to shuffle for large collections 7fe42d76c content: Fix sample code formatting 5d601448f content: Update mathematical markup guidance 63b4fe2c0 content: Update version references 722da91f1 content: Fix GO_VERSION in Netlify hosting example 8cc589c3a theme: Add current Hugo version to the header 37aa24ac5 netlify: Hugo 0.147.1 a80b25e24 content: Remove dated new-in 89dcf0f92 content: Fix path formatting 1a5191d78 content: Update transformation examples 3327065ab Update Text.md 557c10dd2 content: Miscellaneous updates for v0.147.0 0dae1a185 netlify: Hugo 0.147.0 9b44821c3 Merge branch 'tempv0.147.0' f1481e8c3 content: Update GitLab Pages workflow example 2e61a0360 content: Update content format descriptions fb42d7c2a images: Add option for vertical alignment to images.Text git-subtree-dir: docs git-subtree-split: 60dd993a651f1b58c5dabf0e3896f1e96bb846ff --- .cspell.json | 1 + .prettierignore | 16 +- assets/images/sponsors/logo-pinme.svg | 100 +++ .../en/_common/methods/page/next-and-prev.md | 4 +- .../page/nextinsection-and-previnsection.md | 4 +- .../en/_common/methods/pages/next-and-prev.md | 6 +- .../methods/taxonomy/get-a-taxonomy-object.md | 2 +- content/en/_common/render-hooks/pageinner.md | 2 +- content/en/configuration/all.md | 6 +- content/en/configuration/introduction.md | 5 + content/en/configuration/markup.md | 4 +- content/en/configuration/output-formats.md | 12 +- content/en/configuration/related-content.md | 2 +- content/en/configuration/taxonomies.md | 2 +- .../en/content-management/build-options.md | 6 +- content/en/content-management/comments.md | 2 +- .../en/content-management/content-adapters.md | 16 +- content/en/content-management/data-sources.md | 2 +- content/en/content-management/diagrams.md | 4 +- content/en/content-management/formats.md | 10 +- content/en/content-management/front-matter.md | 2 +- content/en/content-management/mathematics.md | 12 +- content/en/content-management/multilingual.md | 6 +- .../content-management/organization/index.md | 4 +- .../en/content-management/related-content.md | 2 +- content/en/content-management/sections.md | 18 +- content/en/content-management/shortcodes.md | 4 +- content/en/content-management/taxonomies.md | 77 ++- content/en/content-management/types.md | 14 - content/en/content-management/urls.md | 2 +- content/en/contribute/development.md | 2 +- content/en/contribute/documentation.md | 65 +- content/en/documentation.md | 2 + content/en/functions/collections/Shuffle.md | 14 +- content/en/functions/css/Sass.md | 20 +- content/en/functions/css/TailwindCSS.md | 100 ++- content/en/functions/debug/Timer.md | 2 +- content/en/functions/diagrams/Goat.md | 2 +- content/en/functions/global/page.md | 2 +- content/en/functions/go-template/block.md | 6 +- content/en/functions/go-template/define.md | 19 +- content/en/functions/go-template/range.md | 55 +- content/en/functions/go-template/return.md | 11 +- content/en/functions/go-template/template.md | 34 +- content/en/functions/hugo/Generator.md | 2 +- content/en/functions/hugo/Version.md | 2 +- content/en/functions/images/QR.md | 2 +- content/en/functions/images/Text.md | 5 + content/en/functions/js/Build.md | 12 +- content/en/functions/lang/Merge.md | 2 +- content/en/functions/math/Counter.md | 12 +- content/en/functions/math/MaxInt64.md | 27 + content/en/functions/openapi3/Unmarshal.md | 7 +- content/en/functions/partials/Include.md | 2 +- .../en/functions/partials/IncludeCached.md | 4 +- content/en/functions/resources/FromString.md | 6 +- content/en/functions/templates/Current.md | 22 +- content/en/functions/templates/Defer.md | 71 +- content/en/functions/templates/Exists.md | 2 +- content/en/functions/transform/ToMath.md | 27 +- content/en/functions/transform/Unmarshal.md | 2 +- content/en/functions/transform/XMLEscape.md | 2 +- .../external-learning-resources/index.md | 2 +- .../host-on-aws-amplify/index.md | 6 +- .../host-and-deploy/host-on-codeberg-pages.md | 179 ++++- .../host-on-github-pages/index.md | 9 +- .../host-and-deploy/host-on-gitlab-pages.md | 5 +- .../host-and-deploy/host-on-netlify/index.md | 10 +- content/en/host-and-deploy/host-on-render.md | 2 +- content/en/methods/menu-entry/PageRef.md | 4 +- content/en/methods/page/Data.md | 2 +- content/en/methods/page/Description.md | 2 +- content/en/methods/page/Eq.md | 4 +- content/en/methods/page/Fragments.md | 4 +- content/en/methods/page/GetPage.md | 4 +- content/en/methods/page/HasShortcode.md | 4 +- content/en/methods/page/Layout.md | 13 +- content/en/methods/page/Page.md | 6 +- content/en/methods/page/Paginate.md | 4 +- content/en/methods/page/Paginator.md | 4 +- content/en/methods/page/Render.md | 25 +- content/en/methods/page/RenderShortcodes.md | 4 +- content/en/methods/page/RenderString.md | 2 +- content/en/methods/page/Sitemap.md | 2 +- content/en/methods/page/TableOfContents.md | 4 +- content/en/methods/page/Title.md | 15 +- content/en/methods/pager/PageGroups.md | 2 +- content/en/methods/pager/Pages.md | 2 +- content/en/methods/pages/Related.md | 4 +- content/en/methods/resource/ResourceType.md | 2 +- content/en/methods/shortcode/Get.md | 4 +- content/en/methods/shortcode/Inner.md | 14 +- content/en/methods/shortcode/InnerDeindent.md | 6 +- content/en/methods/shortcode/IsNamedParams.md | 2 +- content/en/methods/shortcode/Name.md | 2 +- content/en/methods/shortcode/Ordinal.md | 2 +- content/en/methods/shortcode/Page.md | 2 +- content/en/methods/shortcode/Params.md | 4 +- content/en/methods/shortcode/Parent.md | 4 +- content/en/methods/shortcode/Position.md | 2 +- content/en/methods/site/Language.md | 2 +- content/en/methods/site/Taxonomies.md | 2 +- content/en/quick-reference/emojis.md | 2 + content/en/quick-reference/glossary/_index.md | 1 + .../quick-reference/glossary/content-type.md | 3 +- .../quick-reference/glossary/content-view.md | 2 +- .../quick-reference/glossary/list-template.md | 5 - content/en/render-hooks/blockquotes.md | 13 +- content/en/render-hooks/code-blocks.md | 19 +- content/en/render-hooks/headings.md | 4 +- content/en/render-hooks/images.md | 4 +- content/en/render-hooks/introduction.md | 24 +- content/en/render-hooks/links.md | 4 +- content/en/render-hooks/passthrough.md | 11 +- content/en/render-hooks/tables.md | 2 +- content/en/shortcodes/details.md | 2 +- content/en/shortcodes/figure.md | 2 +- content/en/shortcodes/gist.md | 2 +- content/en/shortcodes/highlight.md | 4 +- content/en/shortcodes/instagram.md | 2 +- content/en/shortcodes/param.md | 2 +- content/en/shortcodes/qr.md | 2 +- content/en/shortcodes/ref.md | 2 +- content/en/shortcodes/relref.md | 10 +- content/en/shortcodes/vimeo.md | 4 +- content/en/shortcodes/x.md | 2 +- content/en/shortcodes/youtube.md | 4 +- content/en/templates/base.md | 90 --- content/en/templates/content-view.md | 90 --- content/en/templates/embedded.md | 24 +- content/en/templates/home.md | 58 -- content/en/templates/introduction.md | 44 +- content/en/templates/lookup-order.md | 59 +- content/en/templates/menu.md | 10 +- .../templates/new-templatesystem-overview.md | 99 +++ content/en/templates/pagination.md | 16 +- content/en/templates/partial.md | 158 ----- content/en/templates/rss.md | 14 +- content/en/templates/section.md | 81 --- content/en/templates/shortcode.md | 47 +- content/en/templates/single.md | 51 -- content/en/templates/sitemap.md | 4 +- content/en/templates/taxonomy.md | 164 ----- content/en/templates/term.md | 107 --- content/en/templates/types.md | 262 +++++-- content/en/troubleshooting/faq.md | 9 +- content/en/troubleshooting/performance.md | 32 +- data/docs.yaml | 640 +++--------------- data/sponsors.toml | 33 +- hugo.toml | 271 ++++---- layouts/_partials/layouts/blocks/alert.html | 2 +- layouts/_partials/layouts/head/head.html | 16 +- layouts/_partials/layouts/header/header.html | 23 +- .../_partials/layouts/header/mastodon.html | 29 + .../layouts/hooks/body-main-start.html | 4 +- layouts/_partials/layouts/related.html | 2 +- layouts/_shortcodes/datatable-filtered.html | 47 -- layouts/_shortcodes/new-in.html | 3 - layouts/_shortcodes/newtemplatesystem.html | 11 + layouts/baseof.html | 18 +- netlify.toml | 2 +- tailwind.config.js | 1 - 162 files changed, 1627 insertions(+), 2288 deletions(-) create mode 100644 assets/images/sponsors/logo-pinme.svg delete mode 100644 content/en/content-management/types.md create mode 100644 content/en/functions/math/MaxInt64.md delete mode 100644 content/en/quick-reference/glossary/list-template.md delete mode 100644 content/en/templates/base.md delete mode 100644 content/en/templates/content-view.md delete mode 100644 content/en/templates/home.md create mode 100644 content/en/templates/new-templatesystem-overview.md delete mode 100644 content/en/templates/partial.md delete mode 100644 content/en/templates/section.md delete mode 100644 content/en/templates/single.md delete mode 100644 content/en/templates/taxonomy.md delete mode 100644 content/en/templates/term.md create mode 100644 layouts/_partials/layouts/header/mastodon.html delete mode 100644 layouts/_shortcodes/datatable-filtered.html create mode 100644 layouts/_shortcodes/newtemplatesystem.html delete mode 100644 tailwind.config.js diff --git a/.cspell.json b/.cspell.json index bf61489da..16f9bd9f2 100644 --- a/.cspell.json +++ b/.cspell.json @@ -70,6 +70,7 @@ "# cspell: ignore hugo terminology", "# ----------------------------------------------------------------------", "alignx", + "aligny", "attrlink", "canonify", "codeowners", diff --git a/.prettierignore b/.prettierignore index f24bbcef0..56e7b90fb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,16 +2,16 @@ **/icons.html # These are whitespace sensitive. -layouts/_default/_markup/render-code* -layouts/_default/_markup/render-table* -layouts/shortcodes/glossary-term.html -layouts/shortcodes/glossary.html -layouts/shortcodes/highlighting-styles.html -layouts/shortcodes/list-pages-in-section.html -layouts/shortcodes/quick-reference.html +layouts/_markup/render-code* +layouts/_markup/render-table* +layouts/_shortcodes/glossary-term.html +layouts/_shortcodes/glossary.html +layouts/_shortcodes/highlighting-styles.html +layouts/_shortcodes/list-pages-in-section.html +layouts/_shortcodes/quick-reference.html # No root node. -layouts/partials/layouts/head/head.html +layouts/_partials/layouts/head/head.html # Auto generated. assets/css/components/chroma*.css diff --git a/assets/images/sponsors/logo-pinme.svg b/assets/images/sponsors/logo-pinme.svg new file mode 100644 index 000000000..fc807beda --- /dev/null +++ b/assets/images/sponsors/logo-pinme.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/content/en/_common/methods/page/next-and-prev.md b/content/en/_common/methods/page/next-and-prev.md index f859961a4..27b069ddc 100644 --- a/content/en/_common/methods/page/next-and-prev.md +++ b/content/en/_common/methods/page/next-and-prev.md @@ -32,13 +32,13 @@ content/ And these templates: -```go-html-template {file="layouts/_default/list.html"} +```go-html-template {file="layouts/section.html"} {{ range .Pages.ByWeight }}

{{ .LinkTitle }}

{{ end }} ``` -```go-html-template {file="layouts/_default/single.html"} +```go-html-template {file="layouts/page.html"} {{ with .Prev }} Previous {{ end }} diff --git a/content/en/_common/methods/page/nextinsection-and-previnsection.md b/content/en/_common/methods/page/nextinsection-and-previnsection.md index 54d240eb4..005953324 100644 --- a/content/en/_common/methods/page/nextinsection-and-previnsection.md +++ b/content/en/_common/methods/page/nextinsection-and-previnsection.md @@ -32,13 +32,13 @@ content/ And these templates: -```go-html-template {file="layouts/_default/list.html"} +```go-html-template {file="layouts/section.html"} {{ range .Pages.ByWeight }}

{{ .LinkTitle }}

{{ end }} ``` -```go-html-template {file="layouts/_default/single.html"} +```go-html-template {file="layouts/page.html"} {{ with .PrevInSection }} Previous {{ end }} diff --git a/content/en/_common/methods/pages/next-and-prev.md b/content/en/_common/methods/pages/next-and-prev.md index 462545c3f..5a92a7cb1 100644 --- a/content/en/_common/methods/pages/next-and-prev.md +++ b/content/en/_common/methods/pages/next-and-prev.md @@ -32,13 +32,13 @@ content/ And these templates: -```go-html-template {file="layouts/_default/list.html"} +```go-html-template {file="layouts/section.html"} {{ range .Pages.ByWeight }}

{{ .LinkTitle }}

{{ end }} ``` -```go-html-template {file="layouts/_default/single.html"} +```go-html-template {file="layouts/page.html"} {{ $pages := .CurrentSection.Pages.ByWeight }} {{ with $pages.Prev . }} @@ -57,7 +57,7 @@ When you visit page-2: To reverse the meaning of _next_ and _previous_ you can chain the [`Reverse`] method to the page collection definition: -```go-html-template {file="layouts/_default/single.html"} +```go-html-template {file="layouts/page.html"} {{ $pages := .CurrentSection.Pages.ByWeight.Reverse }} {{ with $pages.Prev . }} diff --git a/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md b/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md index 6fb729c17..a6c46b8b7 100644 --- a/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md +++ b/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md @@ -34,7 +34,7 @@ To capture the "genres" `Taxonomy` object from within any template, use the [`Ta To capture the "genres" `Taxonomy` object when rendering its page with a taxonomy template, use the [`Terms`] method on the page's [`Data`] object: -```go-html-template {file="layouts/_default/taxonomy.html"} +```go-html-template {file="layouts/taxonomy.html"} {{ $taxonomyObject := .Data.Terms }} ``` diff --git a/content/en/_common/render-hooks/pageinner.md b/content/en/_common/render-hooks/pageinner.md index a598b880a..e5c0afb79 100644 --- a/content/en/_common/render-hooks/pageinner.md +++ b/content/en/_common/render-hooks/pageinner.md @@ -8,7 +8,7 @@ _comment: Do not remove front matter. The primary use case for `PageInner` is to resolve links and [page resources](g) relative to an included `Page`. For example, create an "include" shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents: -```go-html-template {file="layouts/shortcodes/include.html" copy=true} +```go-html-template {file="layouts/_shortcodes/include.html" copy=true} {{ with .Get 0 }} {{ with $.Page.GetPage . }} {{- .RenderShortcodes }} diff --git a/content/en/configuration/all.md b/content/en/configuration/all.md index 9bc05057f..c64638499 100644 --- a/content/en/configuration/all.md +++ b/content/en/configuration/all.md @@ -84,7 +84,7 @@ disableKinds : (`[]string`) A slice of page [kinds](g) to disable during the build process, any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`. disableLanguages -: (`[]string]`) A slice of language keys representing the languages to disable during the build process. Although this is functional, consider using the [`disabled`] key under each language instead. +: (`[]string`) A slice of language keys representing the languages to disable during the build process. Although this is functional, consider using the [`disabled`] key under each language instead. disableLiveReload : (`bool`) Whether to disable automatic live reloading of the browser window. Default is `false`. @@ -123,7 +123,7 @@ ignoreCache : (`bool`) Whether to ignore the cache directory. Default is `false`. ignoreFiles -: (`[]string]`) A slice of [regular expressions](g) used to exclude specific files from a build. These expressions are matched against the absolute file path and apply to files within the `content`, `data`, and `i18n` directories. For more advanced file exclusion options, see the section on [module mounts]. +: (`[]string`) A slice of [regular expressions](g) used to exclude specific files from a build. These expressions are matched against the absolute file path and apply to files within the `content`, `data`, and `i18n` directories. For more advanced file exclusion options, see the section on [module mounts]. ignoreLogs : (`[]string`) A slice of message identifiers corresponding to warnings and errors you wish to suppress. See [`erroridf`] and [`warnidf`]. @@ -280,7 +280,7 @@ themesDir : (`string`) The designated directory for themes. Default is `themes`. timeout -: (`string`) The timeout for generating page content, either as a [duration] or in seconds. This timeout is used to prevent infinite recursion during content generation. You may need to increase this value if your pages take a long time to generate, for example, due to extensive image processing or reliance on remote content. Default is `30s`. +: (`string`) The timeout for generating page content, either as a [duration] or in seconds. This timeout is used to prevent infinite recursion during content generation. You may need to increase this value if your pages take a long time to generate, for example, due to extensive image processing or reliance on remote content. Default is `60s`. timeZone : (`string`) The time zone used to parse dates without time zone offsets, including front matter date fields and values passed to the [`time.AsTime`] and [`time.Format`] template functions. The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone Database]. For example, `America/Los_Angeles` and `Europe/Oslo` are valid time zones. diff --git a/content/en/configuration/introduction.md b/content/en/configuration/introduction.md index 8f8ad4c1e..77fce4e8a 100644 --- a/content/en/configuration/introduction.md +++ b/content/en/configuration/introduction.md @@ -79,6 +79,11 @@ my-project/ The root configuration keys are {{< root-configuration-keys >}}. +> [!note] +> You must define `cascade` tables in the root configuration file. You cannot define `cascade` tables in a dedicated file. See issue [#12899] for details. + +[#12899]: https://github.com/gohugoio/hugo/issues/12899 + ### Omit the root key When splitting the configuration by root key, omit the root key in the component file. For example, these are equivalent: diff --git a/content/en/configuration/markup.md b/content/en/configuration/markup.md index b6135cee5..4a2efb5e8 100644 --- a/content/en/configuration/markup.md +++ b/content/en/configuration/markup.md @@ -247,7 +247,7 @@ rougify style monokai.sublime > assets/css/syntax.css In your base template add a link to the CSS file: -```go-html-template {file="layouts/_default/baseof.html"} +```go-html-template {file="layouts/baseof.html"} ... {{ with resources.Get "css/syntax.css" }} @@ -337,5 +337,5 @@ ordered [superscript]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup [AsciiDoc]: https://asciidoc.org/ [Emacs Org Mode]: https://orgmode.org/ -[Pandoc]: https://www.pandoc.org/ +[Pandoc]: https://pandoc.org/ [reStructuredText]: https://docutils.sourceforge.io/rst.html diff --git a/content/en/configuration/output-formats.md b/content/en/configuration/output-formats.md index 2627c6df4..f3dbceec5 100644 --- a/content/en/configuration/output-formats.md +++ b/content/en/configuration/output-formats.md @@ -135,7 +135,7 @@ See [configure outputs] for more information. Create a template to render the output format. Since Atom feeds are lists, you need to create a list template. Consult the [template lookup order] to find the correct template path: ```text -layouts/_default/list.atom.atom +layouts/list.atom.atom ``` We leave writing the template code as an exercise for you. Aim for a result similar to the [embedded RSS template]. @@ -154,7 +154,7 @@ To access output formats, each `Page` object provides two methods: [`OutputForma By default, a `Page` object's [`Permalink`] and [`RelPermalink`] methods return the URL of the [primary output format](g), typically `html`. This behavior remains consistent regardless of the template used. -For example, in `single.json.json`, you'll see: +For example, in `page.json.json`, you'll see: ```go-html-template {{ .RelPermalink }} → /that-page/ @@ -165,7 +165,7 @@ For example, in `single.json.json`, you'll see: To make these methods return the URL of the _current_ template's output format, you must set the [`permalinkable`] setting to `true` for that format. -With `permalinkable` set to true for `json` in the same `single.json.json` template: +With `permalinkable` set to true for `json` in the same `page.json.json` template: ```go-html-template {{ .RelPermalink }} → /that-page/index.json @@ -188,9 +188,9 @@ For example, for section pages: Output format|Template path :--|:-- -`html`|`layouts/_default/section.html.html` -`json`|`layouts/_default/section.json.json` -`rss`|`layouts/_default/section.rss.xml` +`html`|`layouts/section.html.html` +`json`|`layouts/section.json.json` +`rss`|`layouts/section.rss.xml` [`AlternativeOutputFormats`]: /methods/page/alternativeoutputformats/ [`OutputFormats`]: /methods/page/outputformats/ diff --git a/content/en/configuration/related-content.md b/content/en/configuration/related-content.md index c6e182fae..7f2aa9831 100644 --- a/content/en/configuration/related-content.md +++ b/content/en/configuration/related-content.md @@ -97,7 +97,7 @@ We've configured the `authors` index with a weight of `2` and the `genres` index Then render a list of 5 related reviews with a partial template like this: -```go-html-template {file="layouts/partials/related.html" copy=true} +```go-html-template {file="layouts/_partials/related.html" copy=true} {{ with site.RegularPages.Related . | first 5 }}

Related content: