diff --git a/docs/.cspell.json b/docs/.cspell.json index bf61489da..16f9bd9f2 100644 --- a/docs/.cspell.json +++ b/docs/.cspell.json @@ -70,6 +70,7 @@ "# cspell: ignore hugo terminology", "# ----------------------------------------------------------------------", "alignx", + "aligny", "attrlink", "canonify", "codeowners", diff --git a/docs/.prettierignore b/docs/.prettierignore index f24bbcef0..56e7b90fb 100644 --- a/docs/.prettierignore +++ b/docs/.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/docs/assets/images/sponsors/logo-pinme.svg b/docs/assets/images/sponsors/logo-pinme.svg new file mode 100644 index 000000000..fc807beda --- /dev/null +++ b/docs/assets/images/sponsors/logo-pinme.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/content/en/_common/methods/page/next-and-prev.md b/docs/content/en/_common/methods/page/next-and-prev.md index f859961a4..27b069ddc 100644 --- a/docs/content/en/_common/methods/page/next-and-prev.md +++ b/docs/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/docs/content/en/_common/methods/page/nextinsection-and-previnsection.md b/docs/content/en/_common/methods/page/nextinsection-and-previnsection.md index 54d240eb4..005953324 100644 --- a/docs/content/en/_common/methods/page/nextinsection-and-previnsection.md +++ b/docs/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/docs/content/en/_common/methods/pages/next-and-prev.md b/docs/content/en/_common/methods/pages/next-and-prev.md index 462545c3f..5a92a7cb1 100644 --- a/docs/content/en/_common/methods/pages/next-and-prev.md +++ b/docs/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/docs/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md b/docs/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md index 6fb729c17..a6c46b8b7 100644 --- a/docs/content/en/_common/methods/taxonomy/get-a-taxonomy-object.md +++ b/docs/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/docs/content/en/_common/render-hooks/pageinner.md b/docs/content/en/_common/render-hooks/pageinner.md index a598b880a..e5c0afb79 100644 --- a/docs/content/en/_common/render-hooks/pageinner.md +++ b/docs/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/docs/content/en/configuration/all.md b/docs/content/en/configuration/all.md index 9bc05057f..c64638499 100644 --- a/docs/content/en/configuration/all.md +++ b/docs/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/docs/content/en/configuration/introduction.md b/docs/content/en/configuration/introduction.md index 8f8ad4c1e..77fce4e8a 100644 --- a/docs/content/en/configuration/introduction.md +++ b/docs/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/docs/content/en/configuration/markup.md b/docs/content/en/configuration/markup.md index b6135cee5..4a2efb5e8 100644 --- a/docs/content/en/configuration/markup.md +++ b/docs/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/docs/content/en/configuration/output-formats.md b/docs/content/en/configuration/output-formats.md index 2627c6df4..f3dbceec5 100644 --- a/docs/content/en/configuration/output-formats.md +++ b/docs/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/docs/content/en/configuration/related-content.md b/docs/content/en/configuration/related-content.md index c6e182fae..7f2aa9831 100644 --- a/docs/content/en/configuration/related-content.md +++ b/docs/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: