diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-22 16:43:12 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-22 16:43:12 +0200 |
commit | f96384a3b596f9bc0a3a035970b09b2c601f0ccb (patch) | |
tree | 9dd478a33ea8aeea2e7ddc164b1c5a0200554f62 /content/en/content-management | |
parent | 336622d5e7afd9334cd2de7150d4f16bdf7c24f9 (diff) |
39af43ef1 Update postprocess.md
3ec192d08 Update multilingual.md
7fc7bf862 Add a note about some changes in 0.112.0
742510ae8 Fix ordinal abbrev example
fe557031a Correct spelling for 'GitHub' and 'GitLab' (#2082)
84a059b9a Fix typo in hosting-on-azure.md (#2080)
3383786fe Add i18n to list of directories affected by ignoreFiles
5bfb95234 Update 404.md (#2076)
87545a4fd Update hosting-on-cloudflare-pages.md (#2078)
aa5952c28 Add default module mount to example (#2075)
ced5292c8 Align permalinks examples (#2073)
77b5009fd Fix typo
c79319a6a Clarify description of baseURL
e93a9807b Fix typo in frontmatter description (#2071)
05fe9163a Remove erroneous statement
aa59ef383 docs: Remove note about hugo server not using 404 (#2068)
4a387a6b8 Clarify findRESubmatch (#2065)
47a9181b5 Clarify findRE, replaceRE, and findRESubmatch (#2064)
e5eedbb5e Update theme
5d392c3d4 Clarify pageRef menu property (#2059)
a557b0ebf Fix typos on Configure Hugo page (#2058)
17ef283e6 Clarify module.replacements wording (#2052)
5db4aa421 Fixing broken links (#2057)
9afa0c2fa Fix broken links (#2055)
49b981b1f Correct repo URL for migration tool (contentful.com) (#2056)
969c24c16 Remove duplicate content
0b91e7676 Revert "Delete duplicate content"
3229e79f2 Delete duplicate content
ec4eddb98 Fix typo
6509159d5 Describe snap package strict confinement (#2050)
1589bcdb7 Remove hugo.Generator admonition (#2048)
7e553d11b Add example
48bec0335 Replace blockquotes with admonitions where appropriate (#2043)
98226fe61 Remove orphaned param fron admonition calls (#2042)
2a37a1d21 Clarify cast functions (#2041)
03fd1d404 Fix typo
1898013ef Fix typos
944e27430 Replace output shortcode calls
0c66fb055 Add example of shortcode calls within sample code
f25a79c69 Replace tip and warning shortcode calls
3afac22fc Refactor code shortcode
ad65d2931 Clarify seq function
59f8a1f48 Clarify title function
47535dc87 Cleanup hasPrefix hasSuffix
7bee3e4c1 Cleanup action delimiters
cc96070f0 Correct functions archetype
ffe5d39b9 Remove duplicate shortcodes
075c9f3fe Remove old todos
bc3ec033c Front matter cleanup (#2039)
928b94505 Add code fence types (#2038)
856fa293c Document .File.Filename (#2037)
0988c4a42 Update output-formats.md (#2036)
289da5658 Change findRe to findRE
1e50f0583 Update theme
f90fb1bf5 Improve type formatting (#2032)
7785fa7d9 Use code-toggle shortcode where appropriate
f11cabf37 Add space after and before action delimiters
ac333c795 Replace erroneous use of nocopy shortcode param
064896c06 Use bool param when calling code-toggle
fb33bf59b Update code-toggle shortcode
6ddeab4f8 Add missing go-html-template code fence type (#2030)
1bba4cefb Fix links (#2029)
77f4d6c32 Link destination cleanup (#2028)
fc0ecc027 Improve breadcrumb example (#2026)
6148be2de Update the breadcrumb navigation example (#2025)
6ebb37b1b Clarify sort function (#2024)
31269bad9 Add Winget installation method (#1988)
d6c5f940e Resource methods: add signatures, minor improvements (#2017)
d2e594cbc Modify inner variable shortcode-template explanation (#1985)
a54927a7f Update GitHub Pages starter workflow (#2023)
2964c2d44 Remove orphaned static files (#2022)
97e5567cc Complete documentation on '.Scratch' and '.Store' (#2016)
fa7b2e299 Fix typo
bdce77c57 Remove literal from example menu template
c0f23b216 Correct and improve menu documentation (#2010)
464368fd9 Document .Page.Store (#2011)
a3d7c4a3a Improve urls.Parse function (#2012)
d2cec3776 Clarify postcss config option (#2013)
eb3003fef Fixed typo (#2007)
90c82d7ea Clarify mermaid markdown example (#2004)
1b11dcd5c docs(Diagrams): Update mermaid import mechanism (#1967)
4aceb6855 Fingerprinting, asset management: minor improvements (#2003)
bcbc519bb resources.GetRemote: minor improvement (#2002)
d54185bef Clarify markdownify behavior (#1999)
afb582a80 Clarify usage of slug in front matter (#1998)
f71985315 Update hasSuffix.md
29ad622a3 netlify: Hugo 0.111.3
adf223ecc Merge branch 'tempv0.111.3'
06858c646 docs: Improve examples of variadic math functions
8b656994e tpl/math: Allow multi numbers in add, sub, mul, div, min and max
2a38c4046 tpl: Add hasSuffix alias
4e0b98d54 switch transfers to workers
11651ac0f customize parallel transfer count
142f5da81 Update GitHub hosting instructions (#1991)
ad7901d2f netlify: Hugo 0.111.2
0651a76e0 add headings to distinguish render hook context params
d96d75be4 netlify: Hugo 0.111.1
226cb9e3a Add a paragraph about the new page template function
4c0157a49 Add .Fragments docs
6c78c0679 netlify: Bump to Hugo 0.111.0
7b11c24cf Merge branch 'feat/related-fragments'
615d18ef8 Add Related fragments config
a36449b0c cods: Regen docs helper
0272fa45f Merge commit '336622d5e7afd9334cd2de7150d4f16bdf7c24f9'
c5a962b93 related: Add config option cardinalityThreshold
f91677377 docs: Another fix related docs example
17aa939ea docs: Fix related docs example
12c449150 Merge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6'
cb998b3d6 Add page fragments support to Related
git-subtree-dir: docs
git-subtree-split: 39af43ef11c23b8eaea7e17b59ff065a169305ac
Diffstat (limited to 'content/en/content-management')
23 files changed, 795 insertions, 680 deletions
diff --git a/content/en/content-management/_index.md b/content/en/content-management/_index.md index 7cb6357c6..e87749d3a 100644 --- a/content/en/content-management/_index.md +++ b/content/en/content-management/_index.md @@ -8,7 +8,6 @@ menu: weight: 10 keywords: [source, organization] categories: [content management] -toc: false weight: 10 aliases: [/content/,/content/organization] --- diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index 1d2ba3179..f2bc6a441 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -1,6 +1,5 @@ --- title: Archetypes -linkTitle: Archetypes description: Archetypes are templates used when creating new content. keywords: [archetypes,generators,metadata,front matter] categories: [content management] diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index f798754f1..4798f9b2b 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -56,43 +56,39 @@ If true, the page will be treated as part of the project's collections and, when #### publishResources -If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published. +If set to true the [Bundle's Resources](/content-management/page-bundles) will be published. Setting this to false will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others. {{% note %}} -Any page, regardless of their build options, will always be available using the [`.GetPage`]({{< relref "functions/GetPage" >}}) methods. +Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/getpage) methods. {{% /note %}} ------- - ### Illustrative use cases #### Not publishing a page Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else. -```yaml -# content/who-we-are.md` +{{< code-toggle file="content/who-we-are.md" fm=true copy=false >}} title: Who we are _build: list: false render: false -``` +{{< /code-toggle >}} -```go-html-template -{{/* layouts/index.html */}} +{{< code file="layouts/index.html" copy=false >}} <section id="who-we-are"> -{{ with site.GetPage "who-we-are" }} - {{ .Content }} -{{ end }} + {{ with site.GetPage "who-we-are" }} + {{ .Content }} + {{ end }} </section> -``` +{{< /code >}} #### Listing pages without publishing them Website needs to showcase a few of the hundred "testimonials" available as content files without publishing any of them. -To avoid setting the build options on every testimonials, one can use [`cascade`]({{< relref "/content-management/front-matter#front-matter-cascade" >}}) on the testimonial section's content file. +To avoid setting the build options on every testimonials, one can use [`cascade`](/content-management/front-matter#front-matter-cascade) on the testimonial section's content file. {{< code-toggle >}} title: Testimonials @@ -104,12 +100,12 @@ cascade: list: true # default {{< /code-toggle >}} -```go-html-template -{{/* layouts/_defaults/testimonials.html */}} +{{< code file="layouts/_defaults/testimonials.html" copy=false >}} <section id="testimonials"> -{{ range first 5 .Pages }} - <blockquote cite="{{ .Params.cite }}"> - {{ .Content }} - </blockquote> -{{ end }} + {{ range first 5 .Pages }} + <blockquote cite="{{ .Params.cite }}"> + {{ .Content }} + </blockquote> + {{ end }} </section> +{{< /code >}} diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index e49711e7c..0543f47a7 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -1,6 +1,5 @@ --- title: Comments -linkTitle: Comments description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website. keywords: [sections,content,organization] categories: [project organization, fundamentals] @@ -25,7 +24,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/diagrams.md b/content/en/content-management/diagrams.md index c95548249..e664dd501 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -1,6 +1,5 @@ --- title: Diagrams -LinkTitle: Diagrams description: Use fenced code blocks and markdown render hooks to display diagrams. categories: [content management] keywords: [diagrams,drawing] @@ -58,8 +57,8 @@ And then include this snippet at the bottom of the content template (**Note**: b ```go-html-template {{ if .Page.Store.Get "hasMermaid" }} - <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> - <script> + <script type="module"> + import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true }); </script> {{ end }} @@ -67,6 +66,7 @@ And then include this snippet at the bottom of the content template (**Note**: b With that you can use the `mermaid` language in Markdown code blocks: +```` ```mermaid sequenceDiagram participant Alice @@ -80,6 +80,7 @@ sequenceDiagram John->>Bob: How about you? Bob-->>John: Jolly good! ``` +```` ## Goat Ascii Diagram Examples diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index a98898821..ba988c29b 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -46,9 +46,9 @@ Hugo passes reasonable default arguments to these external helpers by default: - `rst2html`: `--leave-comments --initial-header-level=2` - `pandoc`: `--mathjax` -{{% warning "Performance of External Helpers" %}} +{{% note %}} Because additional formats are external commands, generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome. -{{% /warning %}} +{{% /note %}} ### External Helper AsciiDoc diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index bf530518f..78d3323dd 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -1,8 +1,6 @@ --- title: Front Matter -linkTitle: Front Matter description: Hugo allows you to add front matter in yaml, toml, or json to your content files. -lastmod: 2017-02-24 categories: [content management] keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"] menu: @@ -56,87 +54,87 @@ slug = "spf13-vim-3-0-release-and-new-website" There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates. aliases -: an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details. +: An array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details. audio -: an array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`. +: An array of paths to audio files related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:audio`. cascade -: a map of Front Matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details. +: A map of front matter keys whose values are passed down to the page's descendants unless overwritten by self or a closer ancestor's cascade. See [Front Matter Cascade](#front-matter-cascade) for details. date -: the datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable. +: The datetime assigned to this page. This is usually fetched from the `date` field in front matter, but this behavior is configurable. description -: the description for the content. +: The description for the content. draft -: if `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command. +: If `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command. expiryDate -: the datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command. +: The datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command. headless -: if `true`, sets a leaf bundle to be [headless][headless-bundle]. +: If `true`, sets a leaf bundle to be [headless][headless-bundle]. images -: an array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`. +: An array of paths to images related to the page; used by [internal templates](/templates/internal) such as `_internal/twitter_cards.html`. isCJKLanguage -: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. +: If `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. keywords -: the meta keywords for the content. +: The meta keywords for the content. layout -: the layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type]. +: The layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type]. lastmod -: the datetime at which the content was last modified. +: The datetime at which the content was last modified. linkTitle -: used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle]. +: Used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle]. markup : **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown. outputs -: allows you to specify output formats specific to the content. See [output formats][outputs]. +: Allows you to specify output formats specific to the content. See [output formats][outputs]. publishDate -: if in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`. +: If in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`. resources -: used for configuring page bundle resources. See [Page Resources][page-resources]. +: Used for configuring page bundle resources. See [Page Resources][page-resources]. series -: an array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`. +: An array of series this page belongs to, as a subset of the `series` [taxonomy](/content-management/taxonomies/); used by the `opengraph` [internal template](/templates/internal) to populate `og:see_also`. slug -: appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename. +: Overrides the last segment of the URL path. Not applicable to section pages. See [URL Management](/content-management/urls/#slug) for details. summary -: text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section. +: Text used when providing a summary of the article in the `.Summary` page variable; details available in the [content-summaries](/content-management/summaries/) section. title -: the title for the content. +: The title for the content. type -: the type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter. +: The type of the content; this value will be automatically derived from the directory (i.e., the [section]) if not specified in front matter. url -: the full path to the content from the web root. It makes no assumptions about the path of the content file. See [URL Management](/content-management/urls/#set-url-in-front-matter). +: Overrides the entire URL path. Applicable to regular pages and section pages. See [URL Management](/content-management/urls/#url) for details. videos -: an array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`. +: An array of paths to videos related to the page; used by the `opengraph` [internal template](/templates/internal) to populate `og:video`. weight : used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight. \<taxonomies\> -: field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.* +: Field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.* -{{% note "Hugo's Default URL Destinations" %}} +{{% note %}} If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors. {{% /note %}} @@ -146,7 +144,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 +157,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 +191,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/image-processing/index.md b/content/en/content-management/image-processing/index.md index 3f71b4244..0043f97b0 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -1,6 +1,5 @@ --- title: Image Processing -linkTitle: Image Processing description: Resize, crop, rotate, filter, and convert images. categories: [content management] keywords: [resources, images] @@ -457,15 +456,15 @@ If you change image processing methods or options, or if you rename or remove im hugo --gc ``` -[`anchor`]: {{< relref "content-management/image-processing#anchor" >}} -[`lang.FormatNumber`]: {{< relref "functions/lang#langformatnumber" >}} -[Exif]: <https://en.wikipedia.org/wiki/Exif> -[filters]: {{< relref "functions/images" >}} +[time.Format]: /functions/dateformat +[`anchor`]: /content-management/image-processing#anchor +[mounted]: /hugo-modules/configuration#module-config-mounts +[page bundle]: /content-management/page-bundles +[`lang.FormatNumber`]: /functions/lang +[filters]: /functions/images [github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing> -[mounted]: {{< relref "hugo-modules/configuration#module-config-mounts">}} -[page bundle]: {{< relref "content-management/page-bundles" >}} [Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop> -[time.Format]: {{< relref "functions/dateformat" >}} +[Exif]: <https://en.wikipedia.org/wiki/Exif> [`Colors`]: #colors [`Crop`]: #crop [`Exif`]: #exif diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index b9fab2ca4..369938aba 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -1,7 +1,6 @@ --- title: Menus -linkTitle: Menus -description: Hugo has a simple yet powerful menu system. +description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure. categories: [content management] keywords: [menus] menu: @@ -13,117 +12,214 @@ weight: 190< |