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/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg index 5b1170f9b..598a1eb71 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg @@ -1,3 +1,4 @@ - - + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-blue.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-blue.svg new file mode 100644 index 000000000..79b13f431 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-blue.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-white.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-white.svg new file mode 100644 index 000000000..83e319a6d --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/cloudcannon-white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 71167bfd4..c8986a8c6 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -3,19 +3,20 @@ link = "https://www.linode.com/" logo = "images/sponsors/linode-logo.svg" utm_campaign = "hugosponsor" + bgcolor = "#ffffff" + +[[banners]] + name = "CloudCannon" + link = "https://cloudcannon.com/hugo-cms/" + logo = "/images/sponsors/cloudcannon-white.svg" + utm_campaign = "HugoSponsorship" + utm_source = "sponsor" + utm_content = "gohugo" + bgcolor = "#034AD8" [[banners]] name = "Your Company?" link = "https://bep.is/en/hugo-sponsor-2023-01/" - logo = "/images/sponsors/your-company.svg" utm_campaign = "hugosponsor" show_on_hover = true - bgcolor = "#004887" - -[[banners]] - name = "Your Company?" - link = "https://bep.is/en/hugo-sponsor-2023-01/" - logo = "/images/sponsors/your-company.svg" - utm_campaign = "hugosponsor" - show_on_hover = true - bgcolor = "#004887" + bgcolor = "#4e4f4f" diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index 32bc44f6a..6838ce36a 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -23,7 +23,7 @@ class="{{ $classes_box }} o-100" style="background-color: {{ .bgcolor }};"> {{ $query_params := .query_params | default "" }} - {{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" $utmSource "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor")) | safeURL }} + {{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }} {{ $logo := resources.Get .logo }} {{ if hugo.IsProduction }} {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} @@ -34,7 +34,7 @@ show-on-hover {{ end }}" style=""> - {{ $logo.Content | safeHTML }} + {{ with $logo }}{{ .Content | safeHTML }}{{ end }} {{ else }} - {{ $logo.Content | safeHTML }} + {{ with $logo }}{{ .Content | safeHTML }}{{ end }} {{ end }} diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 1c7cac307..18258d30d 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a +# github.com/gohugoio/gohugoioTheme v0.0.0-20230630055807-9874cd863bc5 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.md b/content/en/commands/hugo.md index 73d443169..f521a2d1f 100644 --- a/content/en/commands/hugo.md +++ b/content/en/commands/hugo.md @@ -27,7 +27,7 @@ hugo [flags] -D, --buildDrafts include content marked as draft -E, --buildExpired include expired content -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ --cleanDestinationDir remove files from destination not found in static directories --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 --config string config file (default is hugo.yaml|json|toml) @@ -44,8 +44,7 @@ hugo [flags] --ignoreCache ignores the cache directory --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern -l, --layoutDir string filesystem path to layout directory - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --minify minify any supported output format (HTML, XML etc.) --noBuildLock don't create .hugo_build.lock file --noChmod don't sync permission mode of files @@ -65,7 +64,6 @@ hugo [flags] --themesDir string filesystem path to themes directory --trace file write trace to file (not useful in general) -v, --verbose verbose output - --verboseLog verbose logging -w, --watch watch filesystem for changes and recreate as needed ``` diff --git a/content/en/commands/hugo_completion.md b/content/en/commands/hugo_completion.md index d7cc64cc2..c9b370da6 100644 --- a/content/en/commands/hugo_completion.md +++ b/content/en/commands/hugo_completion.md @@ -29,13 +29,11 @@ See each sub-command's help for details on how to use the generated script. -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_completion_bash.md b/content/en/commands/hugo_completion_bash.md index eb6fdd8d4..231804d09 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -52,16 +52,13 @@ hugo completion bash -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell - diff --git a/content/en/commands/hugo_completion_fish.md b/content/en/commands/hugo_completion_fish.md index f81acb8af..87b84a702 100644 --- a/content/en/commands/hugo_completion_fish.md +++ b/content/en/commands/hugo_completion_fish.md @@ -43,13 +43,11 @@ hugo completion fish [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_completion_powershell.md b/content/en/commands/hugo_completion_powershell.md index 5f900ec59..77cfeda5f 100644 --- a/content/en/commands/hugo_completion_powershell.md +++ b/content/en/commands/hugo_completion_powershell.md @@ -40,13 +40,11 @@ hugo completion powershell [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_completion_zsh.md b/content/en/commands/hugo_completion_zsh.md index fbe5c6ad4..84856b6b3 100644 --- a/content/en/commands/hugo_completion_zsh.md +++ b/content/en/commands/hugo_completion_zsh.md @@ -54,13 +54,11 @@ hugo completion zsh [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_config.md b/content/en/commands/hugo_config.md index 42cd188b7..e910a3235 100644 --- a/content/en/commands/hugo_config.md +++ b/content/en/commands/hugo_config.md @@ -19,7 +19,7 @@ hugo config [command] [flags] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory --format string preferred file format (toml, yaml or json) (default "toml") -h, --help help for config @@ -37,13 +37,11 @@ hugo config [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_config_mounts.md b/content/en/commands/hugo_config_mounts.md index e4c4cf8c5..59087c771 100644 --- a/content/en/commands/hugo_config_mounts.md +++ b/content/en/commands/hugo_config_mounts.md @@ -15,7 +15,7 @@ hugo config mounts [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for mounts -t, --theme strings themes to use (located in /themes/THEMENAME/) @@ -31,13 +31,11 @@ hugo config mounts [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_convert.md b/content/en/commands/hugo_convert.md index c52433487..07f7f9c13 100644 --- a/content/en/commands/hugo_convert.md +++ b/content/en/commands/hugo_convert.md @@ -13,10 +13,6 @@ Convert your content (e.g. front matter) to different formats. See convert's subcommands toJSON, toTOML and toYAML for more information. -``` -hugo convert [command] [flags] -``` - ### Options ``` @@ -35,13 +31,11 @@ hugo convert [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_convert_toJSON.md b/content/en/commands/hugo_convert_toJSON.md index 4b811f49e..23d6a1032 100644 --- a/content/en/commands/hugo_convert_toJSON.md +++ b/content/en/commands/hugo_convert_toJSON.md @@ -32,15 +32,13 @@ hugo convert toJSON [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_convert_toTOML.md b/content/en/commands/hugo_convert_toTOML.md index 19d847e90..431547a79 100644 --- a/content/en/commands/hugo_convert_toTOML.md +++ b/content/en/commands/hugo_convert_toTOML.md @@ -32,15 +32,13 @@ hugo convert toTOML [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_convert_toYAML.md b/content/en/commands/hugo_convert_toYAML.md index 1785d3ad8..03f7fbb25 100644 --- a/content/en/commands/hugo_convert_toYAML.md +++ b/content/en/commands/hugo_convert_toYAML.md @@ -32,15 +32,13 @@ hugo convert toYAML [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_deploy.md b/content/en/commands/hugo_deploy.md index 4bec6df50..b4ab3e618 100644 --- a/content/en/commands/hugo_deploy.md +++ b/content/en/commands/hugo_deploy.md @@ -42,13 +42,11 @@ hugo deploy [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_env.md b/content/en/commands/hugo_env.md index 296e6e002..076ddef26 100644 --- a/content/en/commands/hugo_env.md +++ b/content/en/commands/hugo_env.md @@ -31,13 +31,11 @@ hugo env [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_gen.md b/content/en/commands/hugo_gen.md index 71c6dfe42..5c8bd6f2c 100644 --- a/content/en/commands/hugo_gen.md +++ b/content/en/commands/hugo_gen.md @@ -7,10 +7,6 @@ url: /commands/hugo_gen/ A collection of several useful generators. -``` -hugo gen [command] [flags] -``` - ### Options ``` @@ -27,13 +23,11 @@ hugo gen [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md index 9c41f7174..bcb2fbf08 100644 --- a/content/en/commands/hugo_gen_chromastyles.md +++ b/content/en/commands/hugo_gen_chromastyles.md @@ -36,13 +36,11 @@ hugo gen chromastyles [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_gen_doc.md b/content/en/commands/hugo_gen_doc.md index 59999fb7b..d0b01a938 100644 --- a/content/en/commands/hugo_gen_doc.md +++ b/content/en/commands/hugo_gen_doc.md @@ -37,13 +37,11 @@ hugo gen doc [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_gen_man.md b/content/en/commands/hugo_gen_man.md index f2c40d71d..6a63a583e 100644 --- a/content/en/commands/hugo_gen_man.md +++ b/content/en/commands/hugo_gen_man.md @@ -34,13 +34,11 @@ hugo gen man [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_import.md b/content/en/commands/hugo_import.md index c9774f466..a6bd40f34 100644 --- a/content/en/commands/hugo_import.md +++ b/content/en/commands/hugo_import.md @@ -13,10 +13,6 @@ Import your site from other web site generators like Jekyll. Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`. -``` -hugo import [command] [flags] -``` - ### Options ``` @@ -33,13 +29,11 @@ hugo import [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_import_jekyll.md b/content/en/commands/hugo_import_jekyll.md index 4e4876d90..af751348c 100644 --- a/content/en/commands/hugo_import_jekyll.md +++ b/content/en/commands/hugo_import_jekyll.md @@ -34,13 +34,11 @@ hugo import jekyll [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_list.md b/content/en/commands/hugo_list.md index 6a3ec36d8..294a8eaa4 100644 --- a/content/en/commands/hugo_list.md +++ b/content/en/commands/hugo_list.md @@ -13,10 +13,6 @@ Listing out various types of content. List requires a subcommand, e.g. hugo list drafts -``` -hugo list [command] [flags] -``` - ### Options ``` @@ -33,13 +29,11 @@ hugo list [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_list_all.md b/content/en/commands/hugo_list_all.md index 5ac8a7c35..49f692de0 100644 --- a/content/en/commands/hugo_list_all.md +++ b/content/en/commands/hugo_list_all.md @@ -31,13 +31,11 @@ hugo list all [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_list_drafts.md b/content/en/commands/hugo_list_drafts.md index 601c7648f..e84e582e6 100644 --- a/content/en/commands/hugo_list_drafts.md +++ b/content/en/commands/hugo_list_drafts.md @@ -31,13 +31,11 @@ hugo list drafts [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_list_expired.md b/content/en/commands/hugo_list_expired.md index 47a9cc369..43feb5d8e 100644 --- a/content/en/commands/hugo_list_expired.md +++ b/content/en/commands/hugo_list_expired.md @@ -31,13 +31,11 @@ hugo list expired [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_list_future.md b/content/en/commands/hugo_list_future.md index 5cbb86c74..419accd6c 100644 --- a/content/en/commands/hugo_list_future.md +++ b/content/en/commands/hugo_list_future.md @@ -31,13 +31,11 @@ hugo list future [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod.md b/content/en/commands/hugo_mod.md index ac7e16f25..dc712b1de 100644 --- a/content/en/commands/hugo_mod.md +++ b/content/en/commands/hugo_mod.md @@ -38,13 +38,11 @@ See https://gohugo.io/hugo-modules/ for more information. -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_clean.md b/content/en/commands/hugo_mod_clean.md index 7878fe178..6ca413993 100644 --- a/content/en/commands/hugo_mod_clean.md +++ b/content/en/commands/hugo_mod_clean.md @@ -20,7 +20,7 @@ hugo mod clean [flags] [args] ``` --all clean entire module cache -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for clean --pattern string pattern matching module paths to clean (all if not set), e.g. "**hugo*" @@ -37,13 +37,11 @@ hugo mod clean [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_get.md b/content/en/commands/hugo_mod_get.md index 21fa1f967..784e81f44 100644 --- a/content/en/commands/hugo_mod_get.md +++ b/content/en/commands/hugo_mod_get.md @@ -57,13 +57,11 @@ hugo mod get [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_graph.md b/content/en/commands/hugo_mod_graph.md index fa1d66602..55c95ca23 100644 --- a/content/en/commands/hugo_mod_graph.md +++ b/content/en/commands/hugo_mod_graph.md @@ -21,7 +21,7 @@ hugo mod graph [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ --clean delete module cache for dependencies that fail verification -c, --contentDir string filesystem path to content directory -h, --help help for graph @@ -38,13 +38,11 @@ hugo mod graph [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_init.md b/content/en/commands/hugo_mod_init.md index af1575b73..bef38c050 100644 --- a/content/en/commands/hugo_mod_init.md +++ b/content/en/commands/hugo_mod_init.md @@ -26,7 +26,7 @@ hugo mod init [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for init -t, --theme strings themes to use (located in /themes/THEMENAME/) @@ -42,13 +42,11 @@ hugo mod init [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_npm.md b/content/en/commands/hugo_mod_npm.md index 8e13a7294..fcd834798 100644 --- a/content/en/commands/hugo_mod_npm.md +++ b/content/en/commands/hugo_mod_npm.md @@ -31,13 +31,11 @@ hugo mod npm [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_npm_pack.md b/content/en/commands/hugo_mod_npm_pack.md index 623649909..4f37f40df 100644 --- a/content/en/commands/hugo_mod_npm_pack.md +++ b/content/en/commands/hugo_mod_npm_pack.md @@ -29,7 +29,7 @@ hugo mod npm pack [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for pack -t, --theme strings themes to use (located in /themes/THEMENAME/) @@ -45,13 +45,11 @@ hugo mod npm pack [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_tidy.md b/content/en/commands/hugo_mod_tidy.md index 31558a55b..b28c6a3c2 100644 --- a/content/en/commands/hugo_mod_tidy.md +++ b/content/en/commands/hugo_mod_tidy.md @@ -15,7 +15,7 @@ hugo mod tidy [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for tidy -t, --theme strings themes to use (located in /themes/THEMENAME/) @@ -31,13 +31,11 @@ hugo mod tidy [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_vendor.md b/content/en/commands/hugo_mod_vendor.md index 42d19b36e..3df563621 100644 --- a/content/en/commands/hugo_mod_vendor.md +++ b/content/en/commands/hugo_mod_vendor.md @@ -21,7 +21,7 @@ hugo mod vendor [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory -h, --help help for vendor -t, --theme strings themes to use (located in /themes/THEMENAME/) @@ -37,13 +37,11 @@ hugo mod vendor [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_mod_verify.md b/content/en/commands/hugo_mod_verify.md index 861ef5752..86f908564 100644 --- a/content/en/commands/hugo_mod_verify.md +++ b/content/en/commands/hugo_mod_verify.md @@ -19,7 +19,7 @@ hugo mod verify [flags] [args] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ --clean delete module cache for dependencies that fail verification -c, --contentDir string filesystem path to content directory -h, --help help for verify @@ -36,13 +36,11 @@ hugo mod verify [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md index 31d6f1f18..ef0ff4cd4 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -18,10 +18,6 @@ If archetypes are provided in your theme or site, they will be used. Ensure you run this within the root directory of your site. -``` -hugo new [command] [flags] -``` - ### Options ``` @@ -38,13 +34,11 @@ hugo new [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO @@ -52,5 +46,5 @@ hugo new [command] [flags] * [hugo](/commands/hugo/) - hugo builds your site * [hugo new content](/commands/hugo_new_content/) - Create new content for your site * [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton) -* [hugo new theme](/commands/hugo_new_theme/) - Create a new site (skeleton) +* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme (skeleton) diff --git a/content/en/commands/hugo_new_content.md b/content/en/commands/hugo_new_content.md index fdacc6596..c7f87631c 100644 --- a/content/en/commands/hugo_new_content.md +++ b/content/en/commands/hugo_new_content.md @@ -10,13 +10,13 @@ Create new content for your site ### Synopsis Create a new content file and automatically set the date and title. - It will guess which kind of file to create based on the path provided. - - You can also specify the kind with `-k KIND`. - - If archetypes are provided in your theme or site, they will be used. - - Ensure you run this within the root directory of your site. +It will guess which kind of file to create based on the path provided. + +You can also specify the kind with `-k KIND`. + +If archetypes are provided in your theme or site, they will be used. + +Ensure you run this within the root directory of your site. ``` hugo new content [path] [flags] @@ -26,7 +26,7 @@ hugo new content [path] [flags] ``` -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ -c, --contentDir string filesystem path to content directory --editor string edit new content with this editor, if provided -f, --force overwrite file if it already exists @@ -46,13 +46,11 @@ hugo new content [path] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_new_site.md b/content/en/commands/hugo_new_site.md index 9409f1e28..f8a939df5 100644 --- a/content/en/commands/hugo_new_site.md +++ b/content/en/commands/hugo_new_site.md @@ -20,8 +20,9 @@ hugo new site [path] [flags] ### Options ``` - -f, --force init inside non-empty directory - -h, --help help for site + -f, --force init inside non-empty directory + --format string preferred file format (toml, yaml or json) (default "toml") + -h, --help help for site ``` ### Options inherited from parent commands @@ -34,13 +35,11 @@ hugo new site [path] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_new_theme.md b/content/en/commands/hugo_new_theme.md index a4057e0f1..301c79e0c 100644 --- a/content/en/commands/hugo_new_theme.md +++ b/content/en/commands/hugo_new_theme.md @@ -5,16 +5,17 @@ url: /commands/hugo_new_theme/ --- ## hugo new theme -Create a new site (skeleton) +Create a new theme (skeleton) ### Synopsis -Create a new site in the provided directory. -The new site will have the correct structure, but no content or theme yet. -Use `hugo new [contentPath]` to create new content. +Create a new theme (skeleton) called [name] in ./themes. +New theme is a skeleton. Please add content to the touched files. Add your +name to the copyright line in the license and adjust the theme.toml file +according to your needs. ``` -hugo new theme [path] [flags] +hugo new theme [name] [flags] ``` ### Options @@ -33,13 +34,11 @@ hugo new theme [path] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md index d328ee685..601fd4406 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -33,7 +33,7 @@ hugo server [command] [flags] -D, --buildDrafts include content marked as draft -E, --buildExpired include expired content -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache_$USER/ --cleanDestinationDir remove files from destination not found in static directories -c, --contentDir string filesystem path to content directory --disableBrowserError do not show build errors in the browser @@ -84,13 +84,11 @@ hugo server [command] [flags] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_server_trust.md b/content/en/commands/hugo_server_trust.md index 0217f0d6c..b789eb69a 100644 --- a/content/en/commands/hugo_server_trust.md +++ b/content/en/commands/hugo_server_trust.md @@ -28,13 +28,11 @@ hugo server trust [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO diff --git a/content/en/commands/hugo_version.md b/content/en/commands/hugo_version.md index b78237bb7..cf23e7fef 100644 --- a/content/en/commands/hugo_version.md +++ b/content/en/commands/hugo_version.md @@ -31,13 +31,11 @@ hugo version [flags] [args] -d, --destination string filesystem path to write files to -e, --environment string build environment --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) + --logLevel string log level (debug|info|warn|error) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output - --verboseLog verbose logging ``` ### SEE ALSO 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 4798f9b2b..378a31144 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 @@ -13,7 +12,7 @@ weight: 70 aliases: [/content/build-options/] --- -They are stored in a reserved Front Matter object named `_build` with the following defaults: +They are stored in a reserved front matter object named `_build` with the following defaults: {{< code-toggle >}} _build: @@ -26,38 +25,30 @@ _build: If `always`, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink. -We extended this property from a boolean to an enum in Hugo 0.76.0. Valid values are: +Valid values are: -never -: The page will not be included in any page collection. - -always (default) -: The page will be rendered to disk and get a `RelPermalink` etc. - -link -: The page will be not be rendered to disk, but will get a `RelPermalink`. + - `never` + : The page will not be included in any page collection. + - `always (default)` + : The page will be rendered to disk and get a `RelPermalink` etc. + - `link` + : The page will be not be rendered to disk, but will get a `RelPermalink`. #### list -Note that we extended this property from a boolean to an enum in Hugo 0.68.0. - Valid values are: - -never -: The page will not be included in any page collection. - -always (default) -: The page will be included in all page collections, e.g. `site.RegularPages`, `$page.Pages`. - -local -: The page will be included in any _local_ page collection, e.g. `$page.RegularPages`, `$page.Pages`. One use case for this would be to create fully navigable, but headless content sections. - -If true, the page will be treated as part of the project's collections and, when appropriate, returned by Hugo's listing methods (`.Pages`, `.RegularPages` etc...). + + - `never` + : The page will not be included in any page collection. + - `always (default)` + : The page will be included in all page collections, e.g. `site.RegularPages`, `.Pages`. + - `local` + : The page will be included in any _local_ page collection, e.g. `.RegularPages`, `.Pages`. One use case for this would be to create fully navigable, but headless content sections. #### publishResources -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. +If set to `true` (default) 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`](/functions/getpage) methods. @@ -67,7 +58,7 @@ Any page, regardless of their build options, will always be available using the #### 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. +Project needs a "Who We Are" content file for front matter and body to be used by the homepage but nowhere else. {{< code-toggle file="content/who-we-are.md" fm=true copy=false >}} title: Who we are 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 e664dd501..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,14 +42,14 @@ 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`: ```go-html-template -
+
   {{- .Inner | safeHTML }}
-
+ {{ .Page.Store.Set "hasMermaid" true }} ``` @@ -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 fb02f99f5..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. @@ -135,10 +135,10 @@ 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 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. +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. +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 71adc214d..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,57 +17,79 @@ 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 -The following is an example of a site configuration for a multilingual Hugo project: +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. {{< code-toggle file="hugo" >}} -defaultContentLanguage = "en" -copyright = "Everything is mine" +defaultContentLanguage = 'de' +defaultContentLanguageInSubdir = true -[params] -[params.navigation] -help = "Help" - -[languages] -[languages.en] -title = "My blog" +[languages.de] +contentDir = 'content/de' +disabled = false +languageCode = 'de-DE' +languageDirection = 'ltr' +languageName = 'Deutsch' +title = 'Projekt Dokumentation' weight = 1 + +[languages.de.params] +subtitle = 'Referenz, Tutorials und Erklärungen' + +[languages.en] +contentDir = 'content/en' +disabled = false +languageCode = 'en-US' +languageDirection = 'ltr' +languageName = 'English' +title = 'Project Documentation' +weight = 2 + [languages.en.params] -linkedin = "https://linkedin.com/whoever" - -[languages.fr] -title = "Mon blogue" -weight = 2 -[languages.fr.params] -linkedin = "https://linkedin.com/fr/whoever" -[languages.fr.params.navigation] -help = "Aide" - -[languages.ar] -title = "مدونتي" -weight = 2 -languagedirection = "rtl" - -[languages.pt-pt] -title = "O meu blog" -weight = 3 +subtitle = 'Reference, Tutorials, and Explanations' {{< /code-toggle >}} -Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated with `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set. +`defaultContentLanguage` +: (`string`) The project's default language tag as defined by [RFC 5646]. Must be lower case, and must match one of the defined language keys. Default is `en`. Examples: -With the configuration above, all content, sitemap, RSS feeds, pagination, -and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French. +- `en` +- `en-gb` +- `pt-br` -When working with front matter `Params` in [single page templates], omit the `params` in the key for the translation. +`defaultContentLanguageInSubdir` +: (`bool`) If `true`, Hugo renders the default language site in a subdirectory matching the `defaultContentLanguage`. Default is `false`. -`defaultContentLanguage` sets the project's default language. If not set, the default language will be `en`. +`contentDir` +: (`string`) The content directory for this language. Omit if [translating by file name]. -If the default language needs to be rendered below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`. +`disabled` +: (`bool`) If `true`, Hugo will not render content for this language. Default is `false`. -Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc. +`languageCode` +: (`string`) The language tag as defined by [RFC 5646]. This value may include upper and lower case characters, hyphens or underscores, and does not affect localization or URLs. Hugo uses this value to populate the `language` element in the [built-in RSS template], and the `lang` attribute of the `html` element in the [built-in alias template]. Examples: -**Please note:** use lowercase language codes, even when using regional languages (ie. use pt-pt instead of pt-PT). Currently Hugo language internals lowercase language codes, which can cause conflicts with settings like `defaultContentLanguage` which are not lowercased. Please track the evolution of this issue in [Hugo repository issue tracker](https://github.com/gohugoio/hugo/issues/7344) +- `en` +- `en-GB` +- `pt-BR` + +`languageDirection` +: (`string`) The language direction, either left-to-right (`ltr`) or right-to-left (`rtl`). Use this value in your templates with the global [`dir`] HTML attribute. + +`languageName` +: (`string`) The language name, typically used when rendering a language switcher. + +`title` +: (`string`) The language title. When set, this overrides the site title for this language. + +`weight` +: (`int`) The language weight. When set to a non-zero value, this is the primary sort criteria for this language. + +[`dir`]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir +[built-in RSS template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml +[built-in alias template]: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html +[RFC 5646]: https://datatracker.ietf.org/doc/html/rfc5646 +[translating by file name]: #translation-by-file-name ### Changes in Hugo 0.112.0 @@ -76,7 +98,7 @@ Only the obvious non-global options can be overridden per language. Examples of 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" @@ -92,35 +114,36 @@ color = "blue" 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: -``` +```go-html-template {{ site.Title }} {{ site.LanguageCode }} {{ site.Params.color }} ``` -### Disable a Language +### Disable a language -You can disable one or more languages. This can be useful when working on a new translation. +To disable a language within a `languages` object in your site configuration: -{{< code-toggle file="hugo" >}} -disableLanguages = ["fr", "ja"] +{{< code-toggle file="hugo" copy=false >}} +[languages.es] +disabled = true {{< /code-toggle >}} +To disable one or more languages in the root of your site configuration: + +{{< code-toggle file="hugo" copy=false >}} +disableLanguages = ["es", "fr"] +{{< /code-toggle >}} + +To disable one or more languages using an environment variable: + +```bash +HUGO_DISABLELANGUAGES="es fr" hugo +``` + Note that you cannot disable the default content language. -We kept this as a standalone setting to make it easier to set via [OS environment]: - -```bash -HUGO_DISABLELANGUAGES="fr ja" hugo -``` - -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 -``` - -### 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. @@ -167,12 +190,11 @@ 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. -### Translation by filename +### Translation by file name Considering the following example: @@ -182,9 +204,9 @@ Considering the following example: The first file is assigned the English language and is linked to the second. The second file is assigned the French language and is linked to the first. -Their language is __assigned__ according to the language code added as a __suffix to the filename__. +Their language is __assigned__ according to the language code added as a __suffix to the file name__. -By having the same **path and base filename**, the content pieces are __linked__ together as translated pages. +By having the same **path and base file name**, the content pieces are __linked__ together as translated pages. {{% note %}} If a file has no language code, it will be assigned the default language. @@ -192,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: @@ -234,11 +256,11 @@ 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 -Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory). +Because paths and file names are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory). To localize URLs: @@ -257,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...). @@ -269,10 +291,10 @@ If, across the linked bundles, two or more files share the same basename, only o * First file found across bundles by order of language `Weight`. {{% note %}} -Page Bundle resources follow the same language assignment logic as content files, both by filename (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`). +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: @@ -293,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: @@ -305,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. @@ -585,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. @@ -604,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 2a5147c21..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] @@ -19,23 +19,22 @@ A Page Bundle can be one of: - Branch Bundle (home page, section, taxonomy terms, taxonomy list) | | Leaf Bundle | Branch Bundle | -|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|-------------------------------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) | -| Index filename | `index.md` [^fn:1] | `_index.md` [^fn:1] | +| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] | | Allowed Resources | Page and non-page (like images, PDF, etc.) types | Only non-page (like images, PDF, etc.) types | | Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). | -| Layout type | `single` | `list` | +| Layout type | [`single`](/templates/single-page-templates/) | [`list`](/templates/lists) | | Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it | | 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 | +| 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/ @@ -92,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: @@ -126,7 +125,7 @@ Explanation of the above example: --- -A leaf bundle can be made headless by adding below in the Front Matter +A leaf bundle can be made headless by adding below in the front matter (in the `index.md`): {{< code-toggle file="content/headless/index.md" fm=true copy=false >}} @@ -138,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. @@ -151,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 54494c2e1..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] @@ -42,7 +42,7 @@ ResourceType : The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`. Name -: Default value is the filename (relative to the owning page). Can be set in front matter. +: Default value is the file name (relative to the owning page). Can be set in front matter. Title : Default value is the same as `.Name`. Can be set in front matter. @@ -67,21 +67,21 @@ with the contents of the file. Use this to create inline resources. {{ end }} {{ with .Resources.GetMatch "img.png" }} - + {{ end }} ``` -MediaType -: The MIME type of the resource, such as `image/jpeg`. +MediaType.Type +: The media type (formerly known as a MIME type) of the resource (e.g., `image/jpeg`). MediaType.MainType -: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`. +: The main type of the resource's media type (e.g., `image`). 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. For example, Microsoft PowerPoint files (`.ppt`) have a subtype of `vnd.ms-powerpoint`. +: The subtype of the resource's type (e.g., `jpeg`). This may or may not correspond to the file suffix. MediaType.Suffixes -: A slice of possible suffixes for the resource's MIME type. +: A slice of possible file suffixes for the resource's media type (e.g., `[jpg jpeg jpe jif jfif]`). ## Methods @@ -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 e80c0f06b..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] @@ -12,9 +12,9 @@ weight: 110 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). +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 b2c98fc65..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 `