diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-27 17:02:23 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-27 17:02:23 +0200 |
commit | a838a27e4c82626f9b3227e02a157119673e5dcf (patch) | |
tree | 9d220eadc3fcaedfd77be3fa466fec14e038cfd1 /docs/content/en/content-management | |
parent | 273d9f69a6cb46ce632b340ebb1191e2e083323b (diff) | |
parent | d3927310d5b2404c3238f9b899db3329ea516490 (diff) |
Merge commit 'd3927310d5b2404c3238f9b899db3329ea516490'
Diffstat (limited to 'docs/content/en/content-management')
11 files changed, 35 insertions, 35 deletions
diff --git a/docs/content/en/content-management/cross-references.md b/docs/content/en/content-management/cross-references.md index 00fb2d973..a2b3f8e1c 100644 --- a/docs/content/en/content-management/cross-references.md +++ b/docs/content/en/content-management/cross-references.md @@ -139,7 +139,7 @@ produces this HTML: ## Ref and RelRef Configuration -The behavior can, since Hugo 0.45, be configured in `config.toml`: +The behavior can, since Hugo 0.45, be configured in `hugo.toml`: refLinksErrorLevel ("ERROR") : When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`). diff --git a/docs/content/en/content-management/front-matter.md b/docs/content/en/content-management/front-matter.md index 78d3323dd..062288320 100644 --- a/docs/content/en/content-management/front-matter.md +++ b/docs/content/en/content-management/front-matter.md @@ -135,7 +135,7 @@ weight : 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 %}} -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. +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 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 %}} ### User-Defined diff --git a/docs/content/en/content-management/image-processing/index.md b/docs/content/en/content-management/image-processing/index.md index 0043f97b0..3d70951b3 100644 --- a/docs/content/en/content-management/image-processing/index.md +++ b/docs/content/en/content-management/image-processing/index.md @@ -384,7 +384,7 @@ Note the self-closing shortcode syntax above. You may call the `imgproc` shortco Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options). -{{< code-toggle file="config" copy=true >}} +{{< code-toggle file="hugo" copy=true >}} [imaging] resampleFilter = "Box" quality = 75 @@ -412,7 +412,7 @@ resampleFilter Define an `imaging.exif` section in your site configuration to control the availability of Exif data. -{{< code-toggle file="config" copy=true >}} +{{< code-toggle file="hugo" copy=true >}} [imaging.exif] includeFields = "" excludeFields = "" diff --git a/docs/content/en/content-management/menus.md b/docs/content/en/content-management/menus.md index 369938aba..07bf41669 100644 --- a/docs/content/en/content-management/menus.md +++ b/docs/content/en/content-management/menus.md @@ -36,7 +36,7 @@ Although you can use these methods in combination when defining a menu, the menu To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration. -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} sectionPagesMenu = "main" {{< /code-toggle >}} @@ -111,7 +111,7 @@ Access the entry with `site.Menus.main` in your templates. See [menu templates] To define entries for the "main" menu: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] name = 'Home' pageRef = '/' @@ -132,7 +132,7 @@ This creates a menu structure that you can access with `site.Menus.main` in your To define entries for the "footer" menu: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.footer]] name = 'Terms' pageRef = '/terms' @@ -177,7 +177,7 @@ url This nested menu demonstrates some of the available properties: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] name = 'Products' pageRef = '/products' diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index f1f25086a..71adc214d 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -21,7 +21,7 @@ Also See [Hugo Multilingual Part 1: Content translation]. The following is an example of a site configuration for a multilingual Hugo project: -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} defaultContentLanguage = "en" copyright = "Everything is mine" @@ -73,10 +73,10 @@ Only the obvious non-global options can be overridden per language. Examples of {{< new-in "0.112.0" >}} -In version `0.112.0` of Hugo we did a major we consolidated all configuration options, but also improved how the languages and their params gets merged with the main configuration. But while testing this on Hugo sites out there, we got some error reports. +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. The `params` sections on site and language is the only place to put custom user parameters, and `site.Params` will only contain these user defined parameters (see example below). +1. Adding custom params to the top level language config is deprecated, add all of these below `[params]`, see `color` in the example below. ```toml title = "My blog" @@ -90,7 +90,7 @@ languageCode = "sv" color = "blue" ``` -In the example above, all the settings exept the `color` below `params` maps to predefined configuration options in Hguo for the site and its language, and should be accessed via the documented accessors: +In the example above, all settings except `color` below `params` map to predefined configuration options in Hugo for the site and its language, and should be accessed via the documented accessors: ``` {{ site.Title }} @@ -102,7 +102,7 @@ In the example above, all the settings exept the `color` below `params` maps to You can disable one or more languages. This can be useful when working on a new translation. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} disableLanguages = ["fr", "ja"] {{< /code-toggle >}} @@ -114,7 +114,7 @@ We kept this as a standalone setting to make it easier to set via [OS environmen HUGO_DISABLELANGUAGES="fr ja" hugo ``` -If you have already a list of disabled languages in `config.toml`, you can enable them in development like this: +If you have already a list of disabled languages in `hugo.toml`, you can enable them in development like this: ```bash HUGO_DISABLELANGUAGES=" " hugo server @@ -132,7 +132,7 @@ If a `baseURL` is set on the `language` level, then all languages must have one Example: -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} [languages] [languages.fr] baseURL = "https://example.fr" @@ -194,7 +194,7 @@ If a file has no language code, it will be assigned the default language. This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} languages: en: weight: 10 @@ -400,7 +400,7 @@ In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is The following localization examples assume your site's primary language is English, with translations to French and German. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} defaultContentLanguage = 'en' [languages] @@ -522,7 +522,7 @@ The `identifier` depends on how you define menu entries: For example, if you define menu entries in site configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] identifier = 'products' name = 'Products' @@ -551,7 +551,7 @@ services = 'Leistungen' For example: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [languages.de] languageCode = 'de-DE' languageName = 'Deutsch' diff --git a/docs/content/en/content-management/page-resources.md b/docs/content/en/content-management/page-resources.md index 4bbd159be..54494c2e1 100644 --- a/docs/content/en/content-management/page-resources.md +++ b/docs/content/en/content-management/page-resources.md @@ -78,7 +78,7 @@ MediaType.MainType : The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`. MediaType.SubType -: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`. +: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension. For example, Microsoft PowerPoint files (`.ppt`) have a subtype of `vnd.ms-powerpoint`. MediaType.Suffixes : A slice of possible suffixes for the resource's MIME type. diff --git a/docs/content/en/content-management/related.md b/docs/content/en/content-management/related.md index 823e3035c..e80c0f06b 100644 --- a/docs/content/en/content-management/related.md +++ b/docs/content/en/content-management/related.md @@ -66,7 +66,7 @@ We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 di Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [related] threshold = 20 includeNewer = true @@ -113,7 +113,7 @@ Hugo provides a sensible default configuration of Related Content, but you can f Without any `related` configuration set on the project, Hugo's Related Content methods will use the following. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} related: threshold: 80 includeNewer: false diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md index 35ffc390f..b2c98fc65 100644 --- a/docs/content/en/content-management/shortcodes.md +++ b/docs/content/en/content-management/shortcodes.md @@ -225,7 +225,7 @@ You must obtain an Access Token to use the `instagram` shortcode. If your site configuration is private: -{{< code-toggle file=config copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [services.instagram] accessToken = 'xxx' {{< /code-toggle >}} diff --git a/docs/content/en/content-management/static-files.md b/docs/content/en/content-management/static-files.md index 6bff7fd6f..ddc35da36 100644 --- a/docs/content/en/content-management/static-files.md +++ b/docs/content/en/content-management/static-files.md @@ -28,7 +28,7 @@ This union filesystem will be served from your site root. So a file Here's an example of setting `staticDir` and `staticDir2` for a multi-language site: -{{< code-toggle copy=false file="config" >}} +{{< code-toggle copy=false file="hugo" >}} staticDir = ["static1", "static2"] [languages] diff --git a/docs/content/en/content-management/taxonomies.md b/docs/content/en/content-management/taxonomies.md index fe42a0667..a532e1873 100644 --- a/docs/content/en/content-management/taxonomies.md +++ b/docs/content/en/content-management/taxonomies.md @@ -82,7 +82,7 @@ Hugo natively supports taxonomies. Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -90,7 +90,7 @@ Without adding a single line to your [site config][config] file, Hugo will autom If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site config][config] to the following: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} disableKinds = ["taxonomy","term"] {{</ code-toggle >}} @@ -113,7 +113,7 @@ Custom taxonomies other than the [defaults](#default-taxonomies) must be defined While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_. {{% /note %}} -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -124,7 +124,7 @@ While adding custom taxonomies, you need to put in the default taxonomies too, _ If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site config][config]. -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" {{</ code-toggle >}} diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md index c65d6c15a..48de64966 100644 --- a/docs/content/en/content-management/urls.md +++ b/docs/content/en/content-management/urls.md @@ -110,7 +110,7 @@ content/ Create a date-based hierarchy, recursively, for regular pages within the `posts` section: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] posts = '/posts/:year/:month/:title/' {{< /code-toggle >}} @@ -133,7 +133,7 @@ public/ To create a date-based hierarchy for regular pages in the content root: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] '/' = '/:year/:month/:title/' {{< /code-toggle >}} @@ -144,7 +144,7 @@ A URL pattern defined for the content root is not recursive. Use the same approach with taxonomies. For example, to omit the taxonomy segment of the URL: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] 'tags' = '/:title/' {{< /code-toggle >}} @@ -198,7 +198,7 @@ For time-related values, you can also use the layout string components defined i [time package]: https://pkg.go.dev/time#pkg-constants -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} permalinks: posts: /:06/:1/:2/:title/ {{< /code-toggle >}} @@ -214,7 +214,7 @@ pretty|content/about.md|`https://example.org/about/` By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} uglyURLs = true {{< /code-toggle >}} @@ -241,7 +241,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} canonifyURLs = true {{< /code-toggle >}} @@ -264,7 +264,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} relativeURLs = true {{< /code-toggle >}} |