From 0015e7a9bed15133e33f75e407b23a93289baf0b Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 15 Jun 2025 20:42:35 -0700 Subject: [PATCH] content: Update to align with v0.146.0 template system (phase 1) --- .../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/markup.md | 2 +- content/en/configuration/output-formats.md | 12 +- content/en/configuration/related-content.md | 2 +- .../en/content-management/build-options.md | 6 +- content/en/content-management/comments.md | 2 +- .../en/content-management/content-adapters.md | 6 +- content/en/content-management/data-sources.md | 2 +- content/en/content-management/diagrams.md | 4 +- content/en/content-management/front-matter.md | 2 +- content/en/content-management/mathematics.md | 6 +- 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/contribute/documentation.md | 6 +- content/en/functions/css/TailwindCSS.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/return.md | 11 +- content/en/functions/go-template/template.md | 34 +- content/en/functions/images/QR.md | 2 +- content/en/functions/math/Counter.md | 12 +- content/en/functions/partials/Include.md | 2 +- .../en/functions/partials/IncludeCached.md | 4 +- content/en/functions/templates/Current.md | 22 +- content/en/functions/templates/Exists.md | 2 +- content/en/functions/transform/ToMath.md | 4 +- content/en/functions/transform/XMLEscape.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/GetPage.md | 2 +- 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 | 2 +- content/en/methods/page/Sitemap.md | 2 +- 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 | 10 +- content/en/methods/shortcode/InnerDeindent.md | 4 +- 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/Taxonomies.md | 2 +- .../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 | 15 +- 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 | 2 +- content/en/shortcodes/vimeo.md | 2 +- content/en/shortcodes/x.md | 2 +- content/en/shortcodes/youtube.md | 2 +- content/en/templates/base.md | 92 --- content/en/templates/content-view.md | 92 --- content/en/templates/embedded.md | 20 +- content/en/templates/home.md | 61 -- content/en/templates/introduction.md | 30 +- content/en/templates/lookup-order.md | 57 -- content/en/templates/menu.md | 10 +- .../templates/new-templatesystem-overview.md | 37 +- content/en/templates/pagination.md | 16 +- content/en/templates/partial.md | 158 ----- content/en/templates/rss.md | 14 +- content/en/templates/section.md | 84 --- content/en/templates/shortcode.md | 42 +- content/en/templates/single.md | 54 -- content/en/templates/sitemap.md | 4 +- content/en/templates/taxonomy.md | 167 ----- content/en/templates/term.md | 110 --- content/en/templates/types.md | 237 +++++-- content/en/troubleshooting/faq.md | 4 +- content/en/troubleshooting/performance.md | 32 +- data/docs.yaml | 640 +++--------------- layouts/_shortcodes/datatable-filtered.html | 47 -- 111 files changed, 665 insertions(+), 1897 deletions(-) delete mode 100644 content/en/content-management/types.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 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 delete mode 100644 layouts/_shortcodes/datatable-filtered.html 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/markup.md b/content/en/configuration/markup.md index 674c6569d..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" }} 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: