summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/.cspell.json1
-rw-r--r--docs/content/en/about/features.md6
-rw-r--r--docs/content/en/content-management/comments.md2
-rw-r--r--docs/content/en/content-management/formats.md5
-rw-r--r--docs/content/en/content-management/front-matter.md5
-rw-r--r--docs/content/en/content-management/multilingual.md2
-rw-r--r--docs/content/en/content-management/shortcodes.md2
-rw-r--r--docs/content/en/content-management/taxonomies.md6
-rw-r--r--docs/content/en/content-management/toc.md4
-rw-r--r--docs/content/en/content-management/urls.md2
-rw-r--r--docs/content/en/contribute/development.md2
-rw-r--r--docs/content/en/contribute/documentation.md2
-rw-r--r--docs/content/en/documentation.md1
-rw-r--r--docs/content/en/functions/adddate.md58
-rw-r--r--docs/content/en/functions/relLangURL.md4
-rw-r--r--docs/content/en/getting-started/configuration.md6
-rw-r--r--docs/content/en/getting-started/directory-structure.md4
-rw-r--r--docs/content/en/getting-started/installing.md3
-rw-r--r--docs/content/en/getting-started/quick-start.md9
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md141
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md19
-rw-r--r--docs/content/en/news/0.12-relnotes/index.md2
-rw-r--r--docs/content/en/showcase/stackimpact/bio.md4
-rw-r--r--docs/content/en/showcase/stackimpact/featured.pngbin153794 -> 0 bytes
-rw-r--r--docs/content/en/showcase/stackimpact/index.md16
-rw-r--r--docs/content/en/templates/404.md1
-rw-r--r--docs/content/en/templates/lists.md7
-rw-r--r--docs/content/en/templates/render-hooks.md2
-rw-r--r--docs/content/en/templates/single-page-templates.md2
-rw-r--r--docs/content/en/templates/taxonomy-templates.md8
-rw-r--r--docs/content/en/troubleshooting/faq.md11
-rw-r--r--docs/content/en/variables/page.md8
-rw-r--r--docs/netlify.toml8
33 files changed, 103 insertions, 250 deletions
diff --git a/docs/.cspell.json b/docs/.cspell.json
index 84631ce67..1a197ea7b 100644
--- a/docs/.cspell.json
+++ b/docs/.cspell.json
@@ -163,7 +163,6 @@
"Milli",
"Mittwoch",
"mkdir",
- "mmark",
"modh",
"monokai",
"Morling",
diff --git a/docs/content/en/about/features.md b/docs/content/en/about/features.md
index 11f9f65b7..ed8c25821 100644
--- a/docs/content/en/about/features.md
+++ b/docs/content/en/about/features.md
@@ -60,7 +60,7 @@ toc: true
[content summaries]: /content-management/summaries/
[content types]: /content-management/types/
[Disqus]: https://disqus.com/
-[Dynamic menu]: /templates/menus/
+[Dynamic menu]: /templates/menu-templates/
[Extremely fast]: https://github.com/bep/hugo-benchmark
[front matter]: /content-management/front-matter/
[functions]: /functions/
@@ -73,13 +73,13 @@ toc: true
[organization for your projects]: /getting-started/directory-structure/
[pagevars]: /variables/page/
[Permalink]: /content-management/urls/#permalinks
-[Powerful theming]: /themes/
+[Powerful theming]: /hugo-modules/theme-components/
[Pretty URLs]: /content-management/urls/
[RSS]: /templates/rss/
[Shortcodes]: /content-management/shortcodes/
[sort content]: /templates/
[supported formats]: /content-management/formats/
-[Syntax highlighting]: /tools/syntax-highlighting/
+[Syntax highlighting]: /content-management/syntax-highlighting/
[table of contents]: /content-management/toc/
[taxonomies]: /content-management/taxonomies/
[URLs]: /content-management/urls/
diff --git a/docs/content/en/content-management/comments.md b/docs/content/en/content-management/comments.md
index 311f24c14..ad3a1b55d 100644
--- a/docs/content/en/content-management/comments.md
+++ b/docs/content/en/content-management/comments.md
@@ -64,7 +64,7 @@ These are some alternatives to Disqus:
* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
[configuration]: /getting-started/configuration/
-[disquspartial]: /templates/partials/#disqus
+[disquspartial]: /templates/internal/#disqus
[disqussetup]: https://disqus.com/profile/signup/
[forum]: https://discourse.gohugo.io
[front matter]: /content-management/front-matter/
diff --git a/docs/content/en/content-management/formats.md b/docs/content/en/content-management/formats.md
index 0b25c3171..7d2d7b0a0 100644
--- a/docs/content/en/content-management/formats.md
+++ b/docs/content/en/content-management/formats.md
@@ -5,7 +5,7 @@ description: Both HTML and Markdown are supported content formats.
date: 2017-01-10
publishdate: 2017-01-10
categories: [content management]
-keywords: [markdown,asciidoc,mmark,pandoc,content format]
+keywords: [markdown,asciidoc,pandoc,content format]
menu:
docs:
parent: "content-management"
@@ -30,7 +30,6 @@ The current list of content formats in Hugo:
| ------------- | ------------- |-------------|
| Goldmark | md, markdown, goldmark |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).{{< new-in "0.60.0" >}} |
| Blackfriday | blackfriday |Blackfriday will eventually be deprecated.|
-|MMark|mmark|Mmark is deprecated and will be removed in a future release.|
|Emacs Org-Mode|org|See [go-org](https://github.com/niklasfasching/go-org).|
|AsciiDoc|asciidocext, adoc, ad|Needs [Asciidoctor][ascii] installed.|
|RST|rst|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
@@ -131,7 +130,6 @@ Markdown syntax is simple enough to learn in a single sitting. The following are
[ascii]: https://asciidoctor.org/
[bfconfig]: /getting-started/configuration/#configuring-blackfriday-rendering
[blackfriday]: https://github.com/russross/blackfriday
-[mmark]: https://github.com/miekg/mmark
[config]: /getting-started/configuration/
[developer tools]: /tools/
[emojis]: https://www.webpagefx.com/tools/emoji-cheat-sheet/
@@ -146,7 +144,6 @@ Markdown syntax is simple enough to learn in a single sitting. The following are
[mdcheatsheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
[mdguide]: https://www.markdownguide.org/
[mdtutorial]: https://www.markdowntutorial.com/
-[Miek Gieben's website]: https://miek.nl/2016/march/05/mmark-syntax-document/
[org]: https://orgmode.org/
[pandoc]: https://www.pandoc.org/
[rest]: https://docutils.sourceforge.io/rst.html
diff --git a/docs/content/en/content-management/front-matter.md b/docs/content/en/content-management/front-matter.md
index cac4ef952..c915a5f96 100644
--- a/docs/content/en/content-management/front-matter.md
+++ b/docs/content/en/content-management/front-matter.md
@@ -92,7 +92,7 @@ keywords
: the meta keywords for the content.
layout
-: the layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See ["Defining a Content Type"][definetype]
+: the layout Hugo should select from the [lookup order][lookup] when rendering the content. If a `type` is not specified in the front matter, Hugo will look for the layout of the same name in the layout directory that corresponds with a content's section. See [Content Types][content type].
lastmod
: the datetime at which the content was last modified.
@@ -232,10 +232,9 @@ It's possible to set some options for Markdown rendering in a content's front ma
[config]: /getting-started/configuration/ "Hugo documentation for site configuration"
[content type]: /content-management/types/
[contentorg]: /content-management/organization/
-[definetype]: /content-management/types/#defining-a-content-type "Learn how to specify a type and a layout in a content's front matter"
[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/#ordering-content "See how to order content in list pages; for example, templates that look to specific _index.md for content and front matter."
+[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"
diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md
index 620ec0b93..82d95f6f1 100644
--- a/docs/content/en/content-management/multilingual.md
+++ b/docs/content/en/content-management/multilingual.md
@@ -571,7 +571,7 @@ If there is more than one language defined, the `LanguagePrefix` variable will e
[lang.FormatAccounting]: /functions/lang/#langformataccounting
[lang.FormatCurrency]: /functions/lang/#langformatcurrency
[lang.FormatNumber]: /functions/lang/#langformatnumber
-[lang.FormatNumberCustom]: functions/lang/#langformatnumbercustom
+[lang.FormatNumberCustom]: /functions/lang/#langformatnumbercustom
[lang.FormatPercent]: /functions/lang/#langformatpercent
[lang.Merge]: /functions/lang.merge/
[menus]: /content-management/menus/
diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md
index 013532ce4..017267ec7 100644
--- a/docs/content/en/content-management/shortcodes.md
+++ b/docs/content/en/content-management/shortcodes.md
@@ -183,7 +183,7 @@ To demonstrate the remarkably efficiency of Hugo's shortcode feature, we have em
### `highlight`
-This shortcode will convert the source code provided into syntax-highlighted HTML. Read more on [highlighting](/tools/syntax-highlighting/). `highlight` takes exactly one required `language` parameter and requires a closing shortcode.
+This shortcode will convert the source code provided into syntax-highlighted HTML. Read more on [highlighting](/content-management/syntax-highlighting/). `highlight` takes exactly one required `language` parameter and requires a closing shortcode.
#### Example `highlight` Input
diff --git a/docs/content/en/content-management/taxonomies.md b/docs/content/en/content-management/taxonomies.md
index da29fa7be..32227d52c 100644
--- a/docs/content/en/content-management/taxonomies.md
+++ b/docs/content/en/content-management/taxonomies.md
@@ -84,7 +84,7 @@ Moonrise Kingdom <- Value
Hugo natively supports taxonomies.
-Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configuring-taxonomies) as below:
+Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below:
{{< code-toggle copy="false" >}}
[taxonomies]
@@ -189,7 +189,7 @@ categories_weight = 44
By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies.
{{% note "Limits to Ordering Taxonomies" %}}
-Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight-date). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
+Currently taxonomies only support the [default `weight => date` ordering of list content](/templates/lists/#default-weight--date--linktitle--filepath). For more information, see the documentation on [taxonomy templates](/templates/taxonomy-templates/).
{{% /note %}}
## Add custom metadata to a Taxonomy or Term
@@ -209,7 +209,7 @@ wikipedia: "https://en.wikipedia.org/wiki/Bruce_Willis"
[content type]: /content-management/types/
[documentation on archetypes]: /content-management/archetypes/
[front matter]: /content-management/front-matter/
-[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-page-templates
+[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-list-templates
[taxonomy templates]: /templates/taxonomy-templates/
[terms within the taxonomy]: /templates/taxonomy-templates/#taxonomy-terms-templates "See how to order terms associated with a taxonomy"
[config]: /getting-started/configuration/
diff --git a/docs/content/en/content-management/toc.md b/docs/content/en/content-management/toc.md
index 6a0b73fe5..57228ba50 100644
--- a/docs/content/en/content-management/toc.md
+++ b/docs/content/en/content-management/toc.md
@@ -49,10 +49,6 @@ Hugo will take this Markdown and create a table of contents from `## Introductio
The built-in `.TableOfContents` variables outputs a `<nav id="TableOfContents">` element with a child `<ul>`, whose child `<li>` elements begin with appropriate HTML headings. See [the available settings](/getting-started/configuration-markup/#table-of-contents) to configure what heading levels you want to include in TOC.
-{{% note "Table of contents not available for MMark" %}}
-Hugo documents created in the [MMark](/content-management/formats/#mmark) Markdown dialect do not currently display TOCs. TOCs are, however, compatible with all other supported Markdown formats.
-{{% /note %}}
-
## Template Example: Basic TOC
The following is an example of a very basic [single page template][]:
diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md
index 25d0f5d7a..f498d02ea 100644
--- a/docs/content/en/content-management/urls.md
+++ b/docs/content/en/content-management/urls.md
@@ -175,7 +175,7 @@ Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias
</html>
```
-The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name="robots" content="noindex">` lets search engine bots know that they should not crawl and index your new alias page.
+The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name="robots" content="noindex">` lets search engine bots know that they should not index your alias page (`https://example.com/posts/my-old-url/`).
### Customize
diff --git a/docs/content/en/contribute/development.md b/docs/content/en/contribute/development.md
index dd92ec0a7..16489772e 100644
--- a/docs/content/en/contribute/development.md
+++ b/docs/content/en/contribute/development.md
@@ -416,7 +416,6 @@ Feel free to [open an issue][newissue] if you think you found a bug or you have
* [Code School and GitHub's "Try Git" Tutorial][trygit] (Free)
* [The Git Book][gitbook] (Free)
* [Go Bootcamp][gobootcamp]
-* [GitHub Pull Request Tutorial, Thinkful][thinkful]
[codecademy]: https://www.codecademy.com/learn/learn-git
@@ -432,5 +431,4 @@ Feel free to [open an issue][newissue] if you think you found a bug or you have
[newissue]: https://github.com/gohugoio/hugo/issues/new
[releases]: /getting-started/
[setupgopath]: https://golang.org/doc/code.html#Workspaces
-[thinkful]: https://www.thinkful.com/learn/github-pull-request-tutorial/
[trygit]: https://try.github.io/levels/1/challenges/1
diff --git a/docs/content/en/contribute/documentation.md b/docs/content/en/contribute/documentation.md
index 014f6761e..df937f1e1 100644
--- a/docs/content/en/contribute/documentation.md
+++ b/docs/content/en/contribute/documentation.md
@@ -86,7 +86,7 @@ Here is a review of the front matter fields automatically generated for you usin
`{{.Content}}`
: an extended description of the new function; examples are not only welcomed but encouraged.
-In the body of your function, expand the short description used in the front matter. Include as many examples as possible, and leverage the Hugo docs [`code` shortcode](#adding-code-blocks). If you are unable to add examples but would like to solicit help from the Hugo community, add `needsexample: true` to your front matter.
+In the body of your function, expand the short description used in the front matter. Include as many examples as possible, and leverage the Hugo docs [`code` shortcode](#add-code-blocks). If you are unable to add examples but would like to solicit help from the Hugo community, add `needsexample: true` to your front matter.
## Add Code Blocks
diff --git a/docs/content/en/documentation.md b/docs/content/en/documentation.md
index 77cf283fa..8364a42bb 100644
--- a/docs/content/en/documentation.md
+++ b/docs/content/en/documentation.md
@@ -19,3 +19,4 @@ layout: documentation-home
Hugo is the **world's fastest static website engine.** It's written in Go (aka Golang) and developed by [bep](https://github.com/bep), [spf13](https://github.com/spf13) and [friends](https://github.com/gohugoio/hugo/graphs/contributors).
Below you will find some of the most common and helpful pages from our documentation.
+foo
diff --git a/docs/content/en/functions/adddate.md b/docs/content/en/functions/adddate.md
index 56008c956..116ffa8de 100644
--- a/docs/content/en/functions/adddate.md
+++ b/docs/content/en/functions/adddate.md
@@ -1,6 +1,6 @@
---
title: .AddDate
-description: Returns the time corresponding to adding the given number of years, months, and days passed to the function.
+description: Returns the time corresponding to adding the given number of years, months, and days to the given time.Time value.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@@ -17,35 +17,29 @@ deprecated: false
aliases: []
---
+```go-html-template
+{{ $d := "2022-01-01" | time.AsTime }}
-The `AddDate` function takes three arguments in logical order of `years`, `months`, and `days`.
-
-## Example: Randomized Tweets from the Last 2 Years
-
-Let's assume you have a file at `data/tweets.toml` that contains a list of Tweets to display on your site's homepage. The file is filled with `[[tweet]]` blocks; e.g.---
-
-{{< code-toggle file="data/tweets" >}}
-[[tweet]]
-name = "Steve Francia"
-twitter_handle = "@spf13"
-quote = "I'm creator of Hugo. #metadocreference"
-link = "https://twitter.com/spf13"
-date = "2017-01-07T00:00:00Z"
-{{< /code-toggle >}}
-
-Let's assume you want to grab Tweets from the last two years and present them in a random order. In conjunction with the [`where`](/functions/where/) and [`now`](/functions/now/) functions, you can limit our range to the last two years via `now.AddDate -2 0 0`, which represents a point in time 2 years, 0 months, and 0 days before the time of your last site build.
-
-{{< code file="partials/templates/random-tweets.html" download="tweets.html" >}}
-{{ range where $.Site.Data.tweets.tweet "date" "ge" (now.AddDate -2 0 0) | shuffle }}
- <div class="item">
- <blockquote>
- <p>
- {{ .quote | safeHTML }}
- </p>
- &mdash; {{ .name }} ({{ .twitter_handle }}) <a href="{{ .link }}">
- {{ dateFormat "January 2, 2006" .date }}
- </a>
- </blockquote>
- </div>
-{{ end }}
-{{< /code >}}
+{{ $d.AddDate 0 0 1 | time.Format "2006-01-02" }} --> 2022-01-02
+{{ $d.AddDate 0 1 1 | time.Format "2006-01-02" }} --> 2022-02-02
+{{ $d.AddDate 1 1 1 | time.Format "2006-01-02" }} --> 2023-02-02
+
+{{ $d.AddDate -1 -1 -1 | time.Format "2006-01-02" }} --> 2020-11-30
+```
+
+{{% note %}}
+When adding months or years, Hugo normalizes the final `time.Time` value if the resulting day does not exist. For example, adding one month to 31 January produces 2 March or 3 March, depending on the year.
+
+See [this explanation](https://github.com/golang/go/issues/31145#issuecomment-479067967) from the Go team.
+{{% /note %}}
+
+```go-html-template
+{{ $d := "2023-01-31" | time.AsTime }}
+{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} --> 2023-03-03
+
+{{ $d := "2024-01-31" | time.AsTime }}
+{{ $d.AddDate 0 1 0 | time.Format "2006-01-02" }} --> 2024-03-02
+
+{{ $d := "2024-02-29" | time.AsTime }}
+{{ $d.AddDate 1 0 0 | time.Format "2006-01-02" }} --> 2025-03-01
+```
diff --git a/docs/content/en/functions/relLangURL.md b/docs/content/en/functions/relLangURL.md
index e624aa355..5cca28c69 100644
--- a/docs/content/en/functions/relLangURL.md
+++ b/docs/content/en/functions/relLangURL.md
@@ -17,7 +17,7 @@ deprecated: false
aliases: []
---
-`absLangURL` and `relLangURL` functions are similar to their [`absURL`](/functions/absurl/) and [`relURL`](/functions/relurl/) relatives but will add the correct language prefix when the site is configured with more than one language. (See [Configuring Multilingual][multiliconfig].)
+`absLangURL` and `relLangURL` functions are similar to their [`absURL`](/functions/absurl/) and [`relURL`](/functions/relurl/) relatives but will add the correct language prefix when the site is configured with more than one language. (See [Configure Languages][multiliconfig].)
So for a site `baseURL` set to `https://example.com/hugo/` and the current language is `en`:
@@ -26,4 +26,4 @@ So for a site `baseURL` set to `https://example.com/hugo/` and the current lang
{{ "blog/" | relLangURL }} → "/hugo/en/blog/"
```
-[multiliconfig]: /content-management/multilingual/#configuring-multilingual-mode
+[multiliconfig]: /content-management/multilingual/#configure-languages
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md
index d377487c5..cd57b371d 100644
--- a/docs/content/en/getting-started/configuration.md
+++ b/docs/content/en/getting-started/configuration.md
@@ -268,7 +268,7 @@ If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will
### imaging
-See [Image Processing Config](/content-management/image-processing/#image-processing-config).
+See [Image Processing Config](/content-management/image-processing/#imaging-configuration).
### languageCode
@@ -390,13 +390,13 @@ See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-f
See [Security Policy](/about/security-model/#security-policy)
### sitemap
-Default [sitemap configuration](/templates/sitemap-template/#configure-sitemapxml).
+Default [sitemap configuration](/templates/sitemap-template/#configuration).
### summaryLength
**Default value:** 70
-The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting).
+The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting).
### taxonomies
See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
diff --git a/docs/content/en/getting-started/directory-structure.md b/docs/content/en/getting-started/directory-structure.md
index 81b07272c..3fa66d4c5 100644
--- a/docs/content/en/getting-started/directory-structure.md
+++ b/docs/content/en/getting-started/directory-structure.md
@@ -48,7 +48,7 @@ By defa