From bc53ea5ce591d0482726ba72c65fe662462e12ab Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Thu, 13 Jul 2023 09:55:39 -0700 Subject: [PATCH] Use sentence-style capitalization for headings --- .github/SUPPORT.md | 2 +- config/_default/menus/menus.en.toml | 12 +- content/en/_index.md | 2 +- content/en/about/_index.md | 7 +- content/en/about/benefits.md | 10 +- content/en/about/features.md | 8 +- content/en/about/hugo-and-gdpr.md | 22 ++-- content/en/about/license.md | 7 +- content/en/about/security-model/index.md | 16 +-- content/en/about/what-is-hugo.md | 10 +- content/en/commands/hugo_completion_bash.md | 1 - content/en/content-management/_index.md | 5 +- content/en/content-management/archetypes.md | 6 +- .../en/content-management/build-options.md | 5 +- content/en/content-management/comments.md | 6 +- .../en/content-management/cross-references.md | 7 +- content/en/content-management/diagrams.md | 10 +- content/en/content-management/formats.md | 15 +-- content/en/content-management/front-matter.md | 36 +++--- .../image-processing/index.md | 56 ++++----- content/en/content-management/multilingual.md | 29 +++-- .../content-management/organization/index.md | 16 +-- content/en/content-management/page-bundles.md | 12 +- .../en/content-management/page-resources.md | 6 +- content/en/content-management/related.md | 18 +-- content/en/content-management/sections.md | 13 +- content/en/content-management/shortcodes.md | 36 +++--- content/en/content-management/static-files.md | 7 +- content/en/content-management/summaries.md | 14 +-- .../content-management/syntax-highlighting.md | 26 ++-- content/en/content-management/taxonomies.md | 36 +++--- content/en/content-management/toc.md | 8 +- content/en/content-management/types.md | 4 +- content/en/content-management/urls.md | 6 +- content/en/contribute/_index.md | 9 +- content/en/contribute/development.md | 24 ++-- content/en/contribute/documentation.md | 8 +- content/en/contribute/themes.md | 10 +- content/en/documentation.md | 6 +- content/en/functions/GetPage.md | 6 +- content/en/functions/_index.md | 7 +- content/en/functions/after.md | 2 +- content/en/functions/anchorize.md | 4 +- content/en/functions/dict.md | 2 +- content/en/functions/emojify.md | 4 +- content/en/functions/errorf.md | 2 +- content/en/functions/format.md | 6 +- content/en/functions/hasPrefix.md | 1 - content/en/functions/hasSuffix.md | 4 +- content/en/functions/images/index.md | 2 +- content/en/functions/index-function.md | 2 +- content/en/functions/intersect.md | 2 +- content/en/functions/isset.md | 2 +- content/en/functions/time.md | 4 +- content/en/functions/transform.Unmarshal.md | 2 +- content/en/functions/union.md | 2 +- content/en/functions/where.md | 9 +- content/en/getting-started/_index.md | 9 +- .../getting-started/configuration-markup.md | 16 ++- content/en/getting-started/configuration.md | 92 +++++++------- .../en/getting-started/directory-structure.md | 16 +-- .../external-learning-resources/index.md | 6 +- content/en/getting-started/quick-start.md | 6 +- content/en/getting-started/usage.md | 4 +- content/en/hosting-and-deployment/_index.md | 9 +- .../deployment-with-rclone.md | 10 +- .../deployment-with-rsync.md | 8 +- .../hosting-on-21yunbox.md | 2 - .../hosting-on-aws-amplify.md | 2 - .../hosting-on-azure-static-web-apps.md | 6 +- .../hosting-on-azure.md | 96 -------------- .../hosting-on-cloudflare-pages.md | 2 - .../hosting-on-firebase.md | 6 +- .../hosting-on-github/index.md | 4 +- .../hosting-on-gitlab.md | 4 +- .../hosting-on-keycdn.md | 5 +- .../hosting-on-netlify.md | 12 +- .../hosting-on-render.md | 12 +- .../en/hosting-and-deployment/hugo-deploy.md | 4 +- content/en/hugo-modules/_index.md | 9 +- content/en/hugo-modules/configuration.md | 18 +-- content/en/hugo-modules/theme-components.md | 8 +- content/en/hugo-modules/use-modules.md | 36 +++--- content/en/hugo-pipes/_index.md | 6 +- content/en/hugo-pipes/babel.md | 8 +- content/en/hugo-pipes/bundling.md | 6 +- content/en/hugo-pipes/fingerprint.md | 8 +- content/en/hugo-pipes/introduction.md | 28 ++--- content/en/hugo-pipes/js.md | 12 +- content/en/hugo-pipes/minification.md | 6 +- content/en/hugo-pipes/postcss.md | 4 +- content/en/hugo-pipes/postprocess.md | 8 +- content/en/hugo-pipes/resource-from-string.md | 8 +- .../en/hugo-pipes/resource-from-template.md | 8 +- .../en/hugo-pipes/transpile-sass-to-css.md | 8 +- content/en/installation/_index.md | 4 +- .../common/03-prebuilt-binaries.md | 2 +- content/en/news/0.62.0-relnotes/index.md | 7 +- content/en/news/0.71.0-relnotes/index.md | 7 +- content/en/news/0.77.0-relnotes/index.md | 7 +- content/en/news/0.89.0-relnotes/index.md | 2 +- content/en/readfiles/dateformatting.md | 4 +- content/en/showcase/ampio-help/index.md | 2 +- content/en/showcase/digitalgov/index.md | 2 +- content/en/showcase/forestry/index.md | 4 +- content/en/showcase/letsencrypt/index.md | 4 +- content/en/templates/404.md | 10 +- content/en/templates/_index.md | 7 +- content/en/templates/base.md | 14 +-- content/en/templates/data-templates.md | 24 ++-- content/en/templates/files.md | 8 +- content/en/templates/homepage.md | 13 +- content/en/templates/internal.md | 22 ++-- content/en/templates/introduction.md | 60 ++++----- content/en/templates/lists/index.md | 119 +++++++++--------- content/en/templates/lookup-order.md | 47 +++---- content/en/templates/menu-templates.md | 6 +- content/en/templates/output-formats.md | 35 +++--- content/en/templates/pagination.md | 9 +- content/en/templates/partials.md | 18 +-- content/en/templates/render-hooks.md | 19 +-- content/en/templates/robots.md | 19 ++- content/en/templates/rss.md | 17 ++- content/en/templates/section-templates.md | 20 +-- content/en/templates/shortcode-templates.md | 71 ++++++----- content/en/templates/single-page-templates.md | 88 +++++++------ content/en/templates/sitemap-template.md | 12 +- content/en/templates/taxonomy-templates.md | 45 ++++--- content/en/templates/template-debugging.md | 10 +- content/en/templates/views.md | 14 +-- content/en/tools/_index.md | 11 +- content/en/tools/editors.md | 10 +- content/en/tools/frontends.md | 12 +- content/en/tools/migrations.md | 8 +- content/en/tools/other.md | 10 +- content/en/tools/search.md | 12 +- content/en/troubleshooting/_index.md | 6 +- .../en/troubleshooting/build-performance.md | 11 +- content/en/troubleshooting/faq.md | 11 +- content/en/variables/_index.md | 9 +- content/en/variables/files.md | 4 +- content/en/variables/git.md | 10 +- content/en/variables/menus.md | 4 +- content/en/variables/page.md | 22 ++-- content/en/variables/pages.md | 4 +- content/en/variables/shortcodes.md | 4 +- content/en/variables/site.md | 16 +-- content/en/variables/sitemap.md | 5 +- content/en/variables/taxonomy.md | 4 +- layouts/shortcodes/module-mounts-note.html | 2 +- 150 files changed, 942 insertions(+), 1091 deletions(-) delete mode 100644 content/en/hosting-and-deployment/hosting-on-azure.md diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index cc9de09ff..96a4400c3 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,3 +1,3 @@ -### Asking Support Questions +### Asking support questions We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions. Please don't use the GitHub issue tracker to ask questions. diff --git a/config/_default/menus/menus.en.toml b/config/_default/menus/menus.en.toml index 7a956a47f..327a5777b 100644 --- a/config/_default/menus/menus.en.toml +++ b/config/_default/menus/menus.en.toml @@ -11,7 +11,7 @@ url = "/installation/" [[docs]] - name = "Getting Started" + name = "Getting started" weight = 30 identifier = "getting-started" url = "/getting-started/" @@ -26,7 +26,7 @@ # Core menus [[docs]] - name = "Content Management" + name = "Content management" weight = 50 identifier = "content-management" post = "expanded" @@ -53,7 +53,7 @@ [[docs]] name = "Hugo Pipes" weight = 90 - identifier = "pipes" + identifier = "hugo-pipes" url = "/hugo-pipes/" [[docs]] @@ -72,13 +72,13 @@ url = "/troubleshooting/" [[docs]] - name = "Tools" + name = "Developer tools" weight = 120 - identifier = "tools" + identifier = "developer-tools" url = "/tools/" [[docs]] - name = "Hosting & Deployment" + name = "Hosting and deployment" weight = 130 identifier = "hosting-and-deployment" url = "/hosting-and-deployment/" diff --git a/content/en/_index.md b/content/en/_index.md index b4e602438..69d40ebcf 100644 --- a/content/en/_index.md +++ b/content/en/_index.md @@ -1,5 +1,5 @@ --- -title: "The world’s fastest framework for building websites" +title: The world’s fastest framework for building websites date: 2017-03-02T12:00:00-05:00 features: - heading: Blistering Speed diff --git a/content/en/about/_index.md b/content/en/about/_index.md index 91260a4a6..3a8319029 100644 --- a/content/en/about/_index.md +++ b/content/en/about/_index.md @@ -1,14 +1,15 @@ --- title: About Hugo -linktitle: Overview +linkTitle: Overview description: Hugo's features, roadmap, license, and motivation. categories: [] keywords: [] menu: docs: + identifier: about-hugo-overview parent: about - weight: 1 -weight: 1 + weight: 10 +weight: 10 aliases: [/about-hugo/,/docs/] --- diff --git a/content/en/about/benefits.md b/content/en/about/benefits.md index 91c243413..f1fc0cfb6 100644 --- a/content/en/about/benefits.md +++ b/content/en/about/benefits.md @@ -1,13 +1,13 @@ --- -title: The Benefits of Static Site Generators -linktitle: The Benefits of Static +title: Benefits of static site generators +linkTitle: Static site generators description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing. keywords: [ssg,static,performance,security] menu: docs: parent: about - weight: 30 -weight: 30 + weight: 40 +weight: 40 --- The purpose of website generators is to render content into HTML files. Most are "dynamic site generators." That means the HTTP server---i.e., the program that sends files to the browser to be viewed---runs the generator to create a new HTML file every time an end user requests a page. @@ -18,7 +18,7 @@ Hugo takes caching a step further and all HTML files are rendered on your comput This has many benefits. The most noticeable is performance. HTTP servers are *very* good at sending files---so good, in fact, that you can effectively serve the same number of pages with a fraction of the memory and CPU needed for a dynamic site. -## More on Static Site Generators +## More on static site generators * ["An Introduction to Static Site Generators", David Walsh] * ["Hugo vs. WordPress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress] diff --git a/content/en/about/features.md b/content/en/about/features.md index 6fac68cdd..dcb85e8b5 100644 --- a/content/en/about/features.md +++ b/content/en/about/features.md @@ -1,11 +1,11 @@ --- -title: Hugo Features +title: Hugo features description: Hugo boasts blistering speed, robust content management, and a powerful templating language making it a great fit for all kinds of static websites. menu: docs: parent: about - weight: 20 -weight: 20 + weight: 30 +weight: 30 toc: true --- @@ -40,7 +40,7 @@ toc: true * ["Minutes to Read"][pagevars] functionality * ["WordCount"][pagevars] functionality -## Additional Features +## Additional features * Integrated [Disqus] comment support * Integrated [Google Analytics] support diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md index b028c4543..d82368afc 100644 --- a/content/en/about/hugo-and-gdpr.md +++ b/content/en/about/hugo-and-gdpr.md @@ -1,14 +1,14 @@ --- -title: Hugo and the General Data Protection Regulation (GDPR) -linktitle: Hugo and GDPR +title: Hugo and the General Data Protection Regulation +linkTitle: Hugo and the GDPR description: About how to configure your Hugo site to meet the new regulations. layout: single keywords: ["GDPR", "Privacy", "Data Protection"] menu: docs: parent: about - weight: 5 -weight: 5 + weight: 60 +weight: 60 aliases: [/privacy/,/gdpr/] toc: true --- @@ -17,7 +17,7 @@ toc: true **Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.** - But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **Privacy Config** that covers the relevant built-in templates. + But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **privacy configuration** that covers the relevant built-in templates. Note that: @@ -25,9 +25,9 @@ toc: true * These settings work with the [internal templates](/templates/internal/). Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect. * We will continue this work and improve this further in future Hugo versions. -## All Privacy Settings +## All privacy settings -Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `hugo.toml`). +Below are all privacy settings and their default value. These settings need to be put in your site configuration (e.g. `hugo.toml`). {{< code-toggle file="hugo" >}} [privacy] @@ -54,11 +54,11 @@ disable = false privacyEnhanced = false {{< /code-toggle >}} -## Disable All Services +## Disable all services -An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter. +An example privacy configuration that disables all the relevant services in Hugo. With this configuration, the other settings will not matter. - {{< code-toggle file="hugo" >}} +{{< code-toggle file="hugo" >}} [privacy] [privacy.disqus] disable = true @@ -74,7 +74,7 @@ disable = true disable = true {{< /code-toggle >}} -## The Privacy Settings Explained +## The privacy settings explained ### GoogleAnalytics diff --git a/content/en/about/license.md b/content/en/about/license.md index 267ec95a0..dc560b33f 100644 --- a/content/en/about/license.md +++ b/content/en/about/license.md @@ -1,14 +1,13 @@ --- -title: Apache License -linktitle: License +title: License description: Hugo v0.15 and later are released under the Apache 2.0 license. categories: ["about hugo"] keywords: ["License","apache"] menu: docs: parent: about - weight: 60 -weight: 60 + weight: 70 +weight: 70 aliases: [/meta/license] toc: true --- diff --git a/content/en/about/security-model/index.md b/content/en/about/security-model/index.md index a909a4236..3b93167ab 100644 --- a/content/en/about/security-model/index.md +++ b/content/en/about/security-model/index.md @@ -1,18 +1,18 @@ --- -title: Hugo's Security Model +title: Hugo's security model description: A summary of Hugo's security model. layout: single keywords: ["Security", "Privacy"] menu: docs: parent: about - weight: 4 -weight: 5 + weight: 50 +weight: 50 aliases: [/security/] toc: true --- -## Runtime Security +## Runtime security Hugo produces static output, so once built, the runtime is the browser (assuming the output is HTML) and any server (API) that you integrate with. @@ -25,7 +25,7 @@ But when developing and building your site, the runtime is the `hugo` executable * User-defined components have read-only access to the filesystem. * We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns. -## Security Policy +## Security policy Hugo has a built-in security policy that restricts access to [os/exec](https://pkg.go.dev/os/exec), remote communication and similar. @@ -33,19 +33,19 @@ The default configuration is listed below. Any build using features not in the a {{< code-toggle config="security" />}} -Note that these and other config settings in Hugo can be overridden by the OS environment. If you want to block all remote HTTP fetching of data: +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: ```txt HUGO_SECURITY_HTTP_URLS=none hugo ``` -## Dependency Security +## Dependency security Hugo is built as a static binary using [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. Go Modules have several safeguards, one of them being the `go.sum` file. This is a database of the expected cryptographic checksums of all of your dependencies, including transitive dependencies. [Hugo Modules](/hugo-modules/) is a feature built on top of the functionality of Go Modules. Like Go Modules, a Hugo project using Hugo Modules will have a `go.sum` file. We recommend that you commit this file to your version control system. The Hugo build will fail if there is a checksum mismatch, which would be an indication of [dependency tampering](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/). -## Web Application Security +## Web application security These are the security threats as defined by [OWASP](https://en.wikipedia.org/wiki/OWASP). diff --git a/content/en/about/what-is-hugo.md b/content/en/about/what-is-hugo.md index 3097de50e..9e28346dd 100644 --- a/content/en/about/what-is-hugo.md +++ b/content/en/about/what-is-hugo.md @@ -5,8 +5,8 @@ layout: single menu: docs: parent: about - weight: 10 -weight: 10 + weight: 20 +weight: 20 aliases: [/overview/introduction/,/about/why-i-built-hugo/] toc: true --- @@ -17,15 +17,15 @@ Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made. -## How Fast is Hugo? +## How fast is Hugo? {{< youtube "CdiDYZ51a2o" >}} -## What Does Hugo Do? +## What does Hugo do? In technical terms, Hugo takes a source directory of files and templates and uses these as input to create a complete website. -## Who Should Use Hugo? +## Who should use Hugo? Hugo is for people that prefer writing in a text editor over a browser. diff --git a/content/en/commands/hugo_completion_bash.md b/content/en/commands/hugo_completion_bash.md index 875ecfc19..231804d09 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -62,4 +62,3 @@ hugo completion bash ### SEE ALSO * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell - diff --git a/content/en/content-management/_index.md b/content/en/content-management/_index.md index e87749d3a..35f85a641 100644 --- a/content/en/content-management/_index.md +++ b/content/en/content-management/_index.md @@ -1,9 +1,10 @@ --- -title: Content Management -linkTitle: Content Management Overview +title: Content management +linkTitle: Overview description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more. menu: docs: + identifier: content-management-overview parent: content-management weight: 10 keywords: [source, organization] diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md index f2bc6a441..d8c864536 100644 --- a/content/en/content-management/archetypes.md +++ b/content/en/content-management/archetypes.md @@ -13,7 +13,7 @@ weight: 140 aliases: [/content/archetypes/] --- -## What are Archetypes? +## What are archetypes? **Archetypes** are content template files in the [archetypes directory] of your project that contain preconfigured [front matter] and possibly also a content disposition for your website's [content types]. These will be used when you run `hugo new`. @@ -33,7 +33,7 @@ The above will create a new content file in `content/posts/my-first-post.md` usi The last two list items are only applicable if you use a theme and it uses the `my-theme` theme name as an example. -## Create a New Archetype Template +## Create a new archetype template A fictional example for the section `newsletter` and the archetype file `archetypes/newsletter.md`. Create a new file in `archetypes/newsletter.md` and open it in a text editor. @@ -46,7 +46,7 @@ draft: true **Insert Lead paragraph here.** -## New Cool Posts +## New cool posts {{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }} * {{ .Title }} diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md index dac4629fe..d8df2bdfb 100644 --- a/content/en/content-management/build-options.md +++ b/content/en/content-management/build-options.md @@ -1,9 +1,8 @@ --- -title: Build Options -linkTitle: Build Options +title: Build options description: Build options help define how Hugo must treat a given page when building the site. keywords: [build,content,front matter, page resources] -categories: [content management] +categories: [fundamentals,content management] menu: docs: parent: content-management diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md index 0543f47a7..751fb89bf 100644 --- a/content/en/content-management/comments.md +++ b/content/en/content-management/comments.md @@ -2,7 +2,7 @@ title: 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] +categories: [project organization] menu: docs: parent: content-management @@ -34,9 +34,9 @@ For many websites, this is enough configuration. However, you also have the opti * `disqus_title` * `disqus_url` -### Render Hugo's Built-in Disqus Partial Template +### Render Hugo's built-in Disqus partial template -Disqus has its own [internal template](https://gohugo.io/templates/internal/#disqus) available, to render it add the following code where you want comments to appear: +Disqus has its own [internal template](/templates/internal/#disqus) available, to render it add the following code where you want comments to appear: ```go-html-template {{ template "_internal/disqus.html" . }} diff --git a/content/en/content-management/cross-references.md b/content/en/content-management/cross-references.md index a2b3f8e1c..c989cc560 100644 --- a/content/en/content-management/cross-references.md +++ b/content/en/content-management/cross-references.md @@ -1,6 +1,5 @@ --- -title: Links and Cross References -linkTitle: Links and Cross References +title: Links and cross references description: Shortcodes for creating links to documents. categories: [content management] keywords: ["cross references","references", "anchors", "urls"] @@ -19,7 +18,7 @@ The `ref` and `relref` shortcodes display the absolute and relative permalinks t The `ref` and `relref` shortcodes require a single parameter: the path to a content document, with or without a file extension, with or without an anchor. Paths without a leading `/` are first resolved relative to the current page, then to the remainder of the site. -``` +```text . └── content ├── about @@ -78,7 +77,7 @@ To link to another language version of a document, use this syntax: {{}} ``` -### Get another Output Format +### Get another output format To link to another Output Format of a document, use this syntax: diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index 71d168494..c0b2349b0 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -12,7 +12,7 @@ weight: 50 --- {{< new-in "0.93.0" >}} -## GoAT Diagrams (Ascii) +## GoAT diagrams (Ascii) Hugo supports [GoAT](https://github.com/bep/goat) natively. This means that this code block: @@ -42,7 +42,7 @@ Will be rendered as: 1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4 ``` -## Mermaid Diagrams +## Mermaid diagrams Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`: @@ -66,7 +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: -```` +````text ```mermaid sequenceDiagram participant Alice @@ -82,7 +82,7 @@ sequenceDiagram ``` ```` -## Goat Ascii Diagram Examples +## Goat ASCII diagram examples ### Graphics @@ -166,7 +166,7 @@ Created from ``` -### Sequence Diagram +### Sequence diagram diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index ba988c29b..a974d41d3 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -1,6 +1,5 @@ --- -title: Content Formats -linkTitle: Content Formats +title: Content formats description: Both HTML and Markdown are supported content formats. categories: [content management] keywords: [markdown,asciidoc,pandoc,content format] @@ -34,7 +33,7 @@ The current list of content formats in Hugo: The `markup identifier` is fetched from either the `markup` variable in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/). -## External Helpers +## External helpers Some of the formats in the table above need external helpers installed on your PC. For example, for AsciiDoc files, Hugo will try to call the `asciidoctor` command. This means that you will have to install the associated @@ -50,13 +49,7 @@ Hugo passes reasonable default arguments to these external helpers by default: 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. {{% /note %}} -### External Helper AsciiDoc - -[AsciiDoc](https://github.com/asciidoc/asciidoc) implementation EOLs in Jan 2020 and is no longer supported. -AsciiDoc development is being continued under [Asciidoctor](https://github.com/asciidoctor). The format AsciiDoc -remains of course. Please continue with the implementation Asciidoctor. - -### External Helper Asciidoctor +### External helper Asciidoctor The Asciidoctor community offers a wide set of tools for the AsciiDoc format that can be installed additionally to Hugo. [See the Asciidoctor docs for installation instructions](https://asciidoctor.org/docs/install-toolchain/). Make sure that also all @@ -113,7 +106,7 @@ parameters. Run Hugo with `-v`. You will get an output like INFO 2019/12/22 09:08:48 Rendering book-as-pdf.adoc with C:\Ruby26-x64\bin\asciidoctor.bat using asciidoc args [--no-header-footer -r asciidoctor-html5s -b html5s -r asciidoctor-diagram --base-dir D:\prototypes\hugo_asciidoc_ddd\docs -a outdir=D:\prototypes\hugo_asciidoc_ddd\build -] ... ``` -## Learn Markdown +## Learn markdown Markdown syntax is simple enough to learn in a single sitting. The following are excellent resources to get you up and running: diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index 3c9b6d31e..10317e805 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -1,5 +1,5 @@ --- -title: Front Matter +title: Front matter description: Hugo allows you to add front matter in yaml, toml, or json to your content files. categories: [content management] keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"] @@ -16,7 +16,7 @@ aliases: [/content/front-matter/] {{< youtube Yh2xKRJGff4 >}} -## Front Matter Formats +## Front matter formats Hugo supports four formats for front matter, each with their own identifying tokens. @@ -47,7 +47,7 @@ categories = [ slug = "spf13-vim-3-0-release-and-new-website" {{< /code-toggle >}} -## Front Matter Variables +## Front matter variables ### Predefined @@ -93,7 +93,7 @@ lastmod : 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. @@ -138,7 +138,7 @@ weight If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site configuration file](/content-management/urls/#permalinks), Hugo will use the file name 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 %}} -### User-Defined +### User-defined You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates. @@ -149,11 +149,11 @@ include_toc: true show_comments: false {{}} -## Front Matter Cascade +## Front matter cascade Any node or section can pass down to descendants a set of front matter values as long as defined underneath the reserved `cascade` front matter key. -### Target Specific Pages +### Target specific pages The `cascade` block can be a slice with a optional `_target` keyword, allowing for multiple `cascade` values targeting different page sets. @@ -202,15 +202,15 @@ With the above example the Blog section page and its descendants will return `im - Said descendant has its own `banner` value set - Or a closer ancestor node has its own `cascade.banner` value set. -## Order Content Through Front Matter +## Order content through front matter You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views. -## Override Global Markdown Configuration +## Override global markdown configuration -It's possible to set some options for Markdown rendering in a content's front matter as an override to the [Rendering options set in your project configuration][config]. +It's possible to set some options for Markdown rendering in a content's front matter as an override to the [rendering options set in your project configuration][config]. -## Front Matter Format Specs +## Front matter format specs - [TOML Spec][toml] - [YAML Spec][yaml] @@ -220,15 +220,15 @@ It's possible to set some options for Markdown rendering in a content's front ma [aliases]: /content-management/urls/#aliases [archetype]: /content-management/archetypes/ [bylinktitle]: /templates/lists/#by-link-title -[config]: /getting-started/configuration/ "Hugo documentation for site configuration" +[config]: /getting-started/configuration/ [content type]: /content-management/types/ [contentorg]: /content-management/organization/ [headless-bundle]: /content-management/page-bundles/#headless-bundle -[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation" -[lists]: /templates/lists/#order-content "See how to order content in list pages; for example, templates that look to specific _index.md for content and front matter." -[lookup]: /templates/lookup-order/ "Hugo traverses your templates in a specific order when rendering content to allow for DRYer templating." -[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates" -[outputs]: /templates/output-formats/ "With the release of v22, you can output your content to any text format using Hugo's familiar templating" +[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf +[lists]: /templates/lists/#order-content +[lookup]: /templates/lookup-order/ +[ordering]: /templates/lists/ +[outputs]: /templates/output-formats/ [page-resources]: /content-management/page-resources/ [pagevars]: /variables/page/ [section]: /content-management/sections/ @@ -236,4 +236,4 @@ It's possible to set some options for Markdown rendering in a content's front ma [toml]: https://toml.io/ [urls]: /content-management/urls/ [variables]: /variables/ -[yaml]: https://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language" +[yaml]: https://yaml.org/spec/ diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 3d70951b3..273b68ab8 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -1,7 +1,7 @@ --- -title: Image Processing +title: Image processing description: Resize, crop, rotate, filter, and convert images. -categories: [content management] +categories: [fundamentals,content management] keywords: [resources, images] menu: docs: @@ -10,11 +10,11 @@ menu: toc: true weight: 90 --- -## Image Resources +## Image resources To process an image, you must access the image as either a page resource or a global resource. -### Page Resources +### Page resources A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root. @@ -26,7 +26,7 @@ content/ └── sunset.jpg <-- page resource ``` -### Global Resources +### Global resources A global resource is a file: @@ -52,7 +52,7 @@ To access a remote image as a global resource: {{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }} ``` -## Image Rendering +## Image rendering Once you have accessed an image as either a page resource or a global resource, render it in your templates using the `Permalink`, `RelPermalink`, `Width`, and `Height` properties. @@ -80,12 +80,12 @@ Example 3: A more concise way to skip image rendering if the resource is not fou {{ end }} ``` -## Image Processing Methods +## Image processing methods The `image` resource implements the [`Resize`], [`Fit`], [`Fill`], [`Crop`], [`Filter`], [`Colors`] and [`Exif`] methods. {{% note %}} -Metadata (Exif, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`] method with the _original_ image to extract Exif metadata from JPEG or TIFF images. +Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`] method with the _original_ image to extract EXIF metadata from JPEG or TIFF images. {{% /note %}} ### Resize @@ -164,11 +164,11 @@ Sometimes it can be useful to create the filter chain once and then reuse it. This method is fast, but if you also scale down your images, it would be good for performance to extract the colors from the scaled down image. -### Exif +### EXIF -Provides an [Exif] object containing image metadata. +Provides an [EXIF] object containing image metadata. -You may access Exif data in JPEG and TIFF images. To prevent errors when processing images without Exif data, wrap the access in a [`with`] statement. +You may access EXIF data in JPEG and TIFF images. To prevent errors when processing images without EXIF data, wrap the access in a [`with`] statement. ```go-html-template {{ with $image.Exif }} @@ -181,7 +181,7 @@ You may access Exif data in JPEG and TIFF images. To prevent errors when process {{ end }} ``` -You may also access Exif fields individually, using the [`lang.FormatNumber`] function to format the fields as needed. +You may also access EXIF fields individually, using the [`lang.FormatNumber`] function to format the fields as needed. ```go-html-template {{ with $image.Exif }} @@ -198,7 +198,7 @@ You may also access Exif fields individually, using the [`lang.FormatNumber`] fu {{ end }} ``` -#### Exif Variables +#### EXIF variables .Date : Image creation date/time. Format with the [time.Format] function. @@ -210,9 +210,9 @@ You may also access Exif fields individually, using the [`lang.FormatNumber`] fu : GPS longitude in degrees. .Tags -: A collection of the available Exif tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data). +: A collection of the available EXIF tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data). -## Image Processing Options +## Image processing options The [`Resize`], [`Fit`], [`Fill`], and [`Crop`] methods accept a space-separated, case-insensitive list of options. The order of the options within the list is irrelevant. @@ -265,7 +265,7 @@ For example, if you have a 400x200 image with a bird in the upper left quadrant, If you apply [rotation](#rotation) when using the [`Crop`] or [`Fill`] method, specify the anchor relative to the rotated image. -### Target Format +### Target format By default, Hugo encodes the image in the source format. You may convert the image to another format by specifying `bmp`, `gif`, `jpeg`, `jpg`, `png`, `tif`, `tiff`, or `webp`. @@ -313,7 +313,7 @@ The default value is `photo`. You may override the default value in the [site co {{ $image.Resize "600x webp picture" }} ``` -### Background Color +### Background color When converting an image from a format that supports transparency (e.g., PNG) to a format that does _not_ support transparency (e.g., JPEG), you may specify the background color of the resulting image. @@ -325,7 +325,7 @@ The default value is `#ffffff` (white). You may override the default value in th {{ $image.Resize "600x jpg #b31280" }} ``` -### Resampling Filter +### Resampling filter You may specify the resampling filter used when resizing an image. Commonly used resampling filters include: @@ -346,7 +346,7 @@ The default value is `Box`. You may override the default value in the [site conf See [github.com/disintegration/imaging] for the complete list of resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters. -## Image Processing Examples +## Image processing examples _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_ @@ -378,9 +378,9 @@ Call the shortcode from your Markdown like this: Note the self-closing shortcode syntax above. You may call the `imgproc` shortcode with or without **inner content**. {{% /note %}} -## Imaging Configuration +## Imaging configuration -### Processing Options +### Processing options Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options). @@ -408,9 +408,9 @@ quality resampleFilter : See image processing options: [resampling filter](#resampling-filter). -### Exif Data +### EXIF data -Define an `imaging.exif` section in your site configuration to control the availability of Exif data. +Define an `imaging.exif` section in your site configuration to control the availability of EXIF data. {{< code-toggle file="hugo" copy=true >}} [imaging.exif] @@ -427,16 +427,16 @@ disableLatLong : Hugo extracts the GPS latitude and longitude into `.Lat` and `.Long`. Set this to `true` to disable. Default is `false`. excludeFields -: Regular expression matching the Exif tags to exclude from the `.Tags` collection. Default is `""`. +: Regular expression matching the EXIF tags to exclude from the `.Tags` collection. Default is `""`. includeFields -: Regular expression matching the Exif tags to include in the `.Tags` collection. Default is `""`. To include all available tags, set this value to `".*"`. +: Regular expression matching the EXIF tags to include in the `.Tags` collection. Default is `""`. To include all available tags, set this value to `".*"`. {{% note %}} To improve performance and decrease cache size, if you set neither `excludeFields` nor `includeFields`, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`. {{% /note %}} -## Smart Cropping of Images +## Smart cropping of images By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice. @@ -446,7 +446,7 @@ Examples using the sunset image from above: {{< imgproc sunset Crop "200x200 smart" />}} -## Image Processing Performance Consideration +## Image processing performance consideration Hugo caches processed images in the `resources` directory. If you include this directory in source control, Hugo will not have to regenerate the images in a CI/CD workflow (e.g., GitHub Pages, GitLab Pages, Netlify, etc.). This results in faster builds. @@ -458,7 +458,7 @@ hugo --gc [time.Format]: /functions/dateformat [`anchor`]: /content-management/image-processing#anchor -[mounted]: /hugo-modules/configuration#module-config-mounts +[mounted]: /hugo-modules/configuration#module-configuration-mounts [page bundle]: /content-management/page-bundles [`lang.FormatNumber`]: /functions/lang [filters]: /functions/images diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index 60dc638e6..4c1f6446e 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -1,5 +1,5 @@ --- -title: Multilingual Mode +title: Multilingual mode linkTitle: Multilingual description: Hugo supports the creation of websites with multiple languages side by side. categories: [content management] @@ -17,7 +17,7 @@ You should define the available languages in a `languages` section in your site Also See [Hugo Multilingual Part 1: Content translation]. -## Configure Languages +## Configure 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. @@ -98,7 +98,7 @@ subtitle = 'Reference, Tutorials, and Explanations' In Hugo `v0.112.0` we consolidated all configuration options, and improved how the languages and their parameters are merged with the main configuration. But while testing this on Hugo sites out there, we received some error reports and reverted some of the changes in favor of deprecation warnings: 1. `site.Language.Params` is deprecated. Use `site.Params` directly. -1. Adding custom params to the top level language config is deprecated, add all of these below `[params]`, see `color` in the example below. +1. Adding custom parameters to the top level language configuration is deprecated, add all of these below `[params]`, see `color` in the example below. ```toml title = "My blog" @@ -120,7 +120,7 @@ In the example above, all settings except `color` below `params` map to predefin {{ site.Params.color }} ``` -### Disable a Language +### Disable a language To disable a language within a `languages` object in your site configuration: @@ -143,7 +143,7 @@ HUGO_DISABLELANGUAGES="es fr" hugo Note that you cannot disable the default content language. -### Configure Multilingual Multihost +### Configure multilingual multihost From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details. @@ -190,8 +190,7 @@ Press Ctrl+C to stop Live reload and `--navigateToChanged` between the servers work as expected. - -## Translate Your Content +## Translate your content There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations. @@ -215,7 +214,7 @@ If a file has no language code, it will be assigned the default language. ### Translation by content directory -This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param. +This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` parameter. {{< code-toggle file="hugo" >}} languages: @@ -257,7 +256,7 @@ Considering the following example: translationKey: "about" {{< /code-toggle >}} -By setting the `translationKey` front matter param to `about` in all three pages, they will be __linked__ as translated pages. +By setting the `translationKey` front matter parameter to `about` in all three pages, they will be __linked__ as translated pages. ### Localizing permalinks @@ -280,7 +279,7 @@ slug: "a-propos" At render, Hugo will build both `/about/` and `/fr/a-propos/` without affecting the translation link. -### Page Bundles +### Page bundles To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (Markdown files, HTML files etc...). @@ -295,7 +294,7 @@ If, across the linked bundles, two or more files share the same basename, only o Page Bundle resources follow the same language assignment logic as content files, both by file name (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`). {{%/ note %}} -## Reference the Translated Content +## Reference translated content To create a list of links to translated content, use a template similar to the following: @@ -316,7 +315,7 @@ The above can be put in a `partial` (i.e., inside `layouts/partials/`) and inclu The above also uses the [`i18n` function][i18func] described in the next section. -### List All Available Languages +### List all available languages `.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator: @@ -328,7 +327,7 @@ The above also uses the [`i18n` function][i18func] described in the next section {{< /code >}} -## Translation of Strings +## Translation of strings Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows. @@ -608,7 +607,7 @@ weight = 20 For a simple menu with two languages, these menu entries are easy to create and maintain. For a larger menu, or with more than two languages, using translation tables as described above is preferable. -## Missing Translations +## Missing translations If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown. @@ -627,7 +626,7 @@ hugo --printI18nWarnings | grep i18n i18n|MISSING_TRANSLATION|en|wordCount ``` -## Multilingual Themes support +## Multilingual themes support To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria: diff --git a/content/en/content-management/organization/index.md b/content/en/content-management/organization/index.md index efa355ddc..2c0d2e604 100644 --- a/content/en/content-management/organization/index.md +++ b/content/en/content-management/organization/index.md @@ -1,8 +1,8 @@ --- -title: Content Organization +title: Content organization linkTitle: Organization description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site. -categories: [content management,fundamentals] +categories: [fundamentals,content management] keywords: [sections,content,organization,bundle,resources] menu: docs: @@ -13,7 +13,7 @@ weight: 20 aliases: [/content/sections/] --- -## Page Bundles +## Page bundles Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`. @@ -29,7 +29,7 @@ The bundle documentation is a **work in progress**. We will publish more compreh {{% /note %}} -## Organization of Content Source +## Organization of content source In Hugo, your content should be organized in a manner that reflects the rendered website. @@ -52,12 +52,12 @@ Without any additional configuration, the following will automatically work: └── second.md // <- https://example.com/quote/second/ ``` -## Path Breakdown in Hugo +## Path breakdown in Hugo The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.com"` in your [site's configuration file][config]. -### Index Pages: `_index.md` +### Index pages: `_index.md` `_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists]. These templates include those for [section templates], [taxonomy templates], [taxonomy terms templates], and your [homepage template]. @@ -94,7 +94,7 @@ https://example.com/posts/index.html The [sections] can be nested as deeply as you want. The important thing to understand is that to make the section tree fully navigational, at least the lower-most section must include a content file. (i.e. `_index.md`). -### Single Pages in Sections +### Single pages in sections Single content files in each of your sections will be rendered as [single page templates][singles]. Here is an example of a single `post` within `posts`: @@ -121,7 +121,7 @@ https://example.com/posts/my-first-hugo-post/index.html ``` -## Paths Explained +## Paths explained The following concepts provide more insight into the relationship between your project's organization and the default Hugo behavior when building output for the website. diff --git a/content/en/content-management/page-bundles.md b/content/en/content-management/page-bundles.md index fae7406be..c4ce69f5f 100644 --- a/content/en/content-management/page-bundles.md +++ b/content/en/content-management/page-bundles.md @@ -1,5 +1,5 @@ --- -title: Page Bundles +title: Page bundles description: Content organization using Page Bundles keywords: [page, bundle, leaf, branch] categories: [content management] @@ -29,12 +29,12 @@ A Page Bundle can be one of: | Example | `content/posts/my-post/index.md` | `content/posts/_index.md` | | Content from non-index page files...| Accessed only as page resources | Accessed only as regular pages | -## Leaf Bundles {#leaf-bundles} +## Leaf bundles A _Leaf Bundle_ is a directory at any hierarchy within the `content/` directory, that contains an **`index.md`** file. -### Examples of Leaf Bundle organization {#examples-of-leaf-bundle-organization} +### Examples of leaf bundle organization {#examples-of-leaf-bundle-organization} ```text content/ @@ -91,7 +91,7 @@ as long as it is not inside another **leaf** bundle. {{% /note %}} -### Headless Bundle {#headless-bundle} +### Headless bundle A headless bundle is a bundle that is configured to not get published anywhere: @@ -137,7 +137,7 @@ There are many use cases of such headless page bundles: - Shared media galleries - Reusable page content "snippets" -## Branch Bundles {#branch-bundles} +## Branch bundles A _Branch Bundle_ is any directory at any hierarchy within the `content/` directory, that contains at least an **`_index.md`** file. @@ -150,7 +150,7 @@ type as a content resource as long as it is a content type recognized by Hugo. {{% /note %}} -### Examples of Branch Bundle organization {#examples-of-branch-bundle-organization} +### Examples of branch bundle organization ```text content/ diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index 9c4cf9cab..bbf288459 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -1,5 +1,5 @@ --- -title: Page Resources +title: Page resources description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata. categories: [content management] keywords: [bundle,content,resources] @@ -101,7 +101,7 @@ Match GetMatch : Same as `Match` but will return the first match. -### Pattern Matching +### Pattern matching ```go // Using Match/GetMatch to find this images/sunset.jpg ? @@ -115,7 +115,7 @@ GetMatch ``` -## Page Resources Metadata +## Page resources metadata The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm). diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md index addfb926d..d897bf47f 100644 --- a/content/en/content-management/related.md +++ b/content/en/content-management/related.md @@ -1,5 +1,5 @@ --- -title: Related Content +title: Related content description: List related content in "See Also" sections. categories: [content management] keywords: [content] @@ -14,7 +14,7 @@ aliases: [/content/related/,/related/] Hugo uses a set of factors to identify a page's related content based on front matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content). -## List Related Content +## List related content To list up to 5 related pages (which share the same _date_ or _keyword_ parameters) is as simple as including something similar to this partial in your single page template: @@ -60,7 +60,7 @@ A fictional example using all of the above options: We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 different methods: `Related`, `RelatedTo` and `RelatedIndicies`. Now we have only one method: `Related`. The old methods are still available but deprecated. Also see [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation of more advanced usage of this feature. {{% /note %}} -## Index Content Headings in Related Content +## Index content headings in related content {{< new-in "0.111.0" >}} @@ -105,7 +105,7 @@ weight = 80 {{ end }} ``` -## Configure Related Content +## Configure related content Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed. @@ -130,10 +130,10 @@ Note that if you have configured `tags` as a taxonomy, `tags` will also be added Custom configuration should be set using the same syntax. {{% note %}} -If you add a `related` config section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest from the Hugo defaults. +If you add a `related` configuration section, you need to add a complete configuration. It is not possible to just set, say, `includeNewer` and use the rest from the Hugo defaults. {{% /note %}} -### Top Level Config Options +### Top level configuration options threshold : A value between 0-100. Lower value will give more, but maybe not so relevant, matches. @@ -144,10 +144,10 @@ includeNewer toLower : Set to true to lower case keywords in both the indexes and the queries. This may give more accurate results at a slight performance penalty. Note that this can also be set per index. -### Config Options per Index +### Configuration options per index name -: The index name. This value maps directly to a page param. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects. +: The index name. This value maps directly to a page parameter. Hugo supports string values (`author` in the example) and lists (`tags`, `keywords` etc.) and time and date objects. type : {{< new-in "0.111.0" >}}. One of `basic`(default) or `fragments`. @@ -168,7 +168,7 @@ pattern toLower : See above. -## Performance Considerations +## Performance considerations **Fast is Hugo's middle name** and we would not have released this feature had it not been blistering fast. diff --git a/content/en/content-management/sections.md b/content/en/content-management/sections.md index 10c87e6cb..9ee0f617f 100644 --- a/content/en/content-management/sections.md +++ b/content/en/content-management/sections.md @@ -1,6 +1,5 @@ --- -title: Content Sections -linkTitle: Sections +title: Sections description: Hugo generates a **section tree** that matches your content. categories: [content management] keywords: [lists,sections,content types,organization] @@ -31,7 +30,7 @@ A **section** cannot be defined or overridden by a front matter parameter -- it is strictly derived from the content organization structure. {{% /note %}} -## Nested Sections +## Nested sections The sections can be nested as deeply as you need. @@ -55,7 +54,7 @@ currently always the *root section* only (`/blog/funny-cats/mypost/ => blog`). If you need a specific template for a sub-section, you need to adjust either the `type` or `layout` in front matter. {{% /note %}} -## Example: Breadcrumb Navigation +## Example: breadcrumb navigation With the available [section variables and methods](#section-page-variables-and-methods) you can build powerful navigation. One common example would be a partial to show Breadcrumb navigation: @@ -74,17 +73,17 @@ With the available [section variables and methods](#section-page-variables-and-m {{< /code >}} -## Section Page Variables and Methods +## Section page variables and methods Also see [Page Variables](/variables/page/). {{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}} -## Content Section Lists +## Content section lists Hugo will automatically create a page for each *root section* that lists all the content in that section. See the documentation on [section templates] for details on customizing the way these pages are rendered. -## Content *Section* vs Content *Type* +## Content *section* vs. content *type* By default, everything created within a section will use the [content `type`][content type] that matches the *root section* name. For example, Hugo will assume that `posts/post-1.md` has a `posts` content `type`. If you are using an [archetype] for your `posts` section, Hugo will generate front matter according to what it finds in `archetypes/posts.md`. diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index 775927156..72ddc6a8c 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -13,7 +13,7 @@ aliases: [/extras/shortcodes/] testparam: "Hugo Rocks!" --- -## What a Shortcode is +## What a shortcode is Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `