diff --git a/archetypes/functions.md b/archetypes/functions.md
index c2bb3113e..34df3e3c0 100644
--- a/archetypes/functions.md
+++ b/archetypes/functions.md
@@ -5,8 +5,5 @@ categories: [functions]
tags: []
ns: ""
signature: []
-hugoversion: ""
-aliases: []
relatedfuncs: []
-toc: false
---
diff --git a/content/en/about/_index.md b/content/en/about/_index.md
index 8ed441b61..91260a4a6 100644
--- a/content/en/about/_index.md
+++ b/content/en/about/_index.md
@@ -2,19 +2,14 @@
title: About Hugo
linktitle: Overview
description: Hugo's features, roadmap, license, and motivation.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: []
keywords: []
menu:
docs:
- parent: "about"
+ parent: about
weight: 1
weight: 1
-draft: false
aliases: [/about-hugo/,/docs/]
-toc: false
---
Hugo is not your average static site generator.
diff --git a/content/en/about/benefits.md b/content/en/about/benefits.md
index 925da1732..91c243413 100644
--- a/content/en/about/benefits.md
+++ b/content/en/about/benefits.md
@@ -2,19 +2,12 @@
title: The Benefits of Static Site Generators
linktitle: The Benefits of Static
description: Improved performance, security and ease of use are just a few of the reasons static site generators are so appealing.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: [ssg,static,performance,security]
menu:
docs:
- parent: "about"
+ parent: about
weight: 30
weight: 30
-sections_weight: 30
-draft: false
-aliases: []
-toc: false
---
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.
diff --git a/content/en/about/features.md b/content/en/about/features.md
index fc3d5a030..6fac68cdd 100644
--- a/content/en/about/features.md
+++ b/content/en/about/features.md
@@ -1,17 +1,11 @@
---
title: Hugo Features
-linktitle: 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.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
menu:
docs:
- parent: "about"
+ parent: about
weight: 20
weight: 20
-sections_weight: 20
-draft: false
toc: true
---
diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md
index 2d4fba872..b1480f632 100644
--- a/content/en/about/hugo-and-gdpr.md
+++ b/content/en/about/hugo-and-gdpr.md
@@ -2,16 +2,13 @@
title: Hugo and the General Data Protection Regulation (GDPR)
linktitle: Hugo and GDPR
description: About how to configure your Hugo site to meet the new regulations.
-date: 2018-05-25
layout: single
keywords: ["GDPR", "Privacy", "Data Protection"]
menu:
docs:
- parent: "about"
+ parent: about
weight: 5
weight: 5
-sections_weight: 5
-draft: false
aliases: [/privacy/,/gdpr/]
toc: true
---
@@ -57,7 +54,6 @@ disable = false
privacyEnhanced = false
{{< /code-toggle >}}
-
## Disable All Services
An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter.
diff --git a/content/en/about/license.md b/content/en/about/license.md
index ae74b6047..e7e3ddce1 100644
--- a/content/en/about/license.md
+++ b/content/en/about/license.md
@@ -2,17 +2,13 @@
title: Apache License
linktitle: License
description: Hugo v0.15 and later are released under the Apache 2.0 license.
-date: 2016-02-01
-publishdate: 2016-02-01
-lastmod: 2016-03-02
categories: ["about hugo"]
keywords: ["License","apache"]
menu:
docs:
- parent: "about"
+ parent: about
weight: 60
weight: 60
-sections_weight: 60
aliases: [/meta/license]
toc: true
---
diff --git a/content/en/about/security-model/index.md b/content/en/about/security-model/index.md
index d4dacd9bf..a909a4236 100644
--- a/content/en/about/security-model/index.md
+++ b/content/en/about/security-model/index.md
@@ -1,15 +1,13 @@
---
title: Hugo's Security Model
description: A summary of Hugo's security model.
-date: 2019-10-01
layout: single
keywords: ["Security", "Privacy"]
menu:
docs:
- parent: "about"
+ parent: about
weight: 4
weight: 5
-sections_weight: 5
aliases: [/security/]
toc: true
---
diff --git a/content/en/about/what-is-hugo.md b/content/en/about/what-is-hugo.md
index d61f821cd..3097de50e 100644
--- a/content/en/about/what-is-hugo.md
+++ b/content/en/about/what-is-hugo.md
@@ -1,18 +1,12 @@
---
title: What is Hugo
-linktitle: What is Hugo
description: Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
layout: single
menu:
docs:
- parent: "about"
+ parent: about
weight: 10
weight: 10
-sections_weight: 10
-draft: false
aliases: [/overview/introduction/,/about/why-i-built-hugo/]
toc: true
---
diff --git a/content/en/content-management/_index.md b/content/en/content-management/_index.md
index 7cb6357c6..e87749d3a 100644
--- a/content/en/content-management/_index.md
+++ b/content/en/content-management/_index.md
@@ -8,7 +8,6 @@ menu:
weight: 10
keywords: [source, organization]
categories: [content management]
-toc: false
weight: 10
aliases: [/content/,/content/organization]
---
diff --git a/content/en/content-management/archetypes.md b/content/en/content-management/archetypes.md
index 1d2ba3179..0b61a9b75 100644
--- a/content/en/content-management/archetypes.md
+++ b/content/en/content-management/archetypes.md
@@ -1,7 +1,6 @@
---
title: Archetypes
-linkTitle: Archetypes
-description: Archetypes are templates used when creating new content.
+description: Archestypes are templates used when creating new content.
keywords: [archetypes,generators,metadata,front matter]
categories: [content management]
menu:
diff --git a/content/en/content-management/build-options.md b/content/en/content-management/build-options.md
index 07187e718..d5b594800 100644
--- a/content/en/content-management/build-options.md
+++ b/content/en/content-management/build-options.md
@@ -63,30 +63,26 @@ Setting this to false will still publish Resources on demand (when a resource's
Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/GetPage) methods.
{{% /note %}}
-------
-
### Illustrative use cases
#### Not publishing a page
Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else.
-```yaml
-# content/who-we-are.md`
+{{< code-toggle file="content/who-we-are.md" fm=true copy=false >}}
title: Who we are
_build:
list: false
render: false
-```
+{{< /code-toggle >}}
-```go-html-template
-{{/* layouts/index.html */}}
+{{< code file="layouts/index.html" copy="false" >}}
-{{ with site.GetPage "who-we-are" }}
- {{ .Content }}
-{{ end }}
+ {{ with site.GetPage "who-we-are" }}
+ {{ .Content }}
+ {{ end }}
-```
+{{< /code >}}
#### Listing pages without publishing them
@@ -104,12 +100,12 @@ cascade:
list: true # default
{{< /code-toggle >}}
-```go-html-template
-{{/* layouts/_defaults/testimonials.html */}}
+{{< code file="layouts/_defaults/testimonials.html" copy="false" >}}
-{{ range first 5 .Pages }}
-
- {{ .Content }}
-
-{{ end }}
+ {{ range first 5 .Pages }}
+
+ {{ .Content }}
+
+ {{ end }}
+{{< /code >}}
diff --git a/content/en/content-management/comments.md b/content/en/content-management/comments.md
index 41c20d48e..0543f47a7 100644
--- a/content/en/content-management/comments.md
+++ b/content/en/content-management/comments.md
@@ -1,6 +1,5 @@
---
title: Comments
-linkTitle: Comments
description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
keywords: [sections,content,organization]
categories: [project organization, fundamentals]
diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md
index 9f3f3800b..e664dd501 100644
--- a/content/en/content-management/diagrams.md
+++ b/content/en/content-management/diagrams.md
@@ -1,6 +1,5 @@
---
title: Diagrams
-LinkTitle: Diagrams
description: Use fenced code blocks and markdown render hooks to display diagrams.
categories: [content management]
keywords: [diagrams,drawing]
diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md
index 657302930..a7e74feb4 100644
--- a/content/en/content-management/front-matter.md
+++ b/content/en/content-management/front-matter.md
@@ -1,8 +1,6 @@
---
title: Front Matter
-linkTitle: Front Matter
description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
-lastmod: 2017-02-24
categories: [content management]
keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
menu:
diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md
index 388662856..0043f97b0 100644
--- a/content/en/content-management/image-processing/index.md
+++ b/content/en/content-management/image-processing/index.md
@@ -1,6 +1,5 @@
---
title: Image Processing
-linkTitle: Image Processing
description: Resize, crop, rotate, filter, and convert images.
categories: [content management]
keywords: [resources, images]
diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md
index 34f24c5cc..b4b97f2df 100644
--- a/content/en/content-management/menus.md
+++ b/content/en/content-management/menus.md
@@ -1,6 +1,5 @@
---
title: Menus
-linkTitle: Menus
description: Create menus by defining entries, localizing each entry, and rendering the resulting data structure.
categories: [content management]
keywords: [menus]
diff --git a/content/en/content-management/page-bundles.md b/content/en/content-management/page-bundles.md
index 28ab004c5..2a5147c21 100644
--- a/content/en/content-management/page-bundles.md
+++ b/content/en/content-management/page-bundles.md
@@ -1,14 +1,11 @@
---
title: Page Bundles
-linkTitle: Page Bundles
description: Content organization using Page Bundles
-linkTitle: Page Bundles
keywords: [page, bundle, leaf, branch]
categories: [content management]
menu :
docs:
- identifier: "page-bundles"
- parent: "content-management"
+ parent: content-management
weight: 30
toc: true
weight: 30
@@ -132,9 +129,9 @@ Explanation of the above example:
A leaf bundle can be made headless by adding below in the Front Matter
(in the `index.md`):
-```toml
+{{< code-toggle file="content/headless/index.md" fm=true copy=false >}}
headless = true
-```
+{{< /code-toggle >}}
There are many use cases of such headless page bundles:
diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md
index fc2426958..6f085f257 100644
--- a/content/en/content-management/page-resources.md
+++ b/content/en/content-management/page-resources.md
@@ -1,6 +1,5 @@
---
title: Page Resources
-linkTitle: 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]
diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md
index c25b0ed61..823e3035c 100644
--- a/content/en/content-management/related.md
+++ b/content/en/content-management/related.md
@@ -1,6 +1,5 @@
---
title: Related Content
-linkTitle: Related Content
description: List related content in "See Also" sections.
categories: [content management]
keywords: [content]
@@ -67,8 +66,7 @@ We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 di
Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration:
-
-```toml
+{{< code-toggle file="config" copy=false >}}
[related]
threshold = 20
includeNewer = true
@@ -78,7 +76,7 @@ name = "fragmentrefs"
type = "fragments"
applyFilter = false
weight = 80
-```
+{{< /code-toggle >}}
* The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level.
* If `applyFilter`is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
diff --git a/content/en/content-management/sections.md b/content/en/content-management/sections.md
index 4cfa19276..8d0549117 100644
--- a/content/en/content-management/sections.md
+++ b/content/en/content-management/sections.md
@@ -2,9 +2,6 @@
title: Content Sections
linkTitle: Sections
description: Hugo generates a **section tree** that matches your content.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [content management]
keywords: [lists,sections,content types,organization]
menu:
diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md
index 0a0f486e4..0697ab8ea 100644
--- a/content/en/content-management/shortcodes.md
+++ b/content/en/content-management/shortcodes.md
@@ -1,6 +1,5 @@
---
title: Shortcodes
-linkTitle: Shortcodes
description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
categories: [content management]
keywords: [markdown,content,shortcodes]
diff --git a/content/en/content-management/syntax-highlighting.md b/content/en/content-management/syntax-highlighting.md
index 5f8a44ee2..64345ad40 100644
--- a/content/en/content-management/syntax-highlighting.md
+++ b/content/en/content-management/syntax-highlighting.md
@@ -1,6 +1,5 @@
---
title: Syntax Highlighting
-linkTitle: Syntax Highlighting
description: Hugo comes with really fast syntax highlighting from Chroma.
keywords: [highlighting,chroma,code blocks,syntax]
categories: [content management]
diff --git a/content/en/content-management/taxonomies.md b/content/en/content-management/taxonomies.md
index 6d4655228..3d53e6148 100644
--- a/content/en/content-management/taxonomies.md
+++ b/content/en/content-management/taxonomies.md
@@ -1,6 +1,5 @@
---
title: Taxonomies
-linkTitle: Taxonomies
description: Hugo includes support for user-defined taxonomies.
keywords: [taxonomies,metadata,front matter,terms]
categories: [content management]
diff --git a/content/en/content-management/toc.md b/content/en/content-management/toc.md
index 9e1421dc7..0bf3a7c70 100644
--- a/content/en/content-management/toc.md
+++ b/content/en/content-management/toc.md
@@ -1,6 +1,5 @@
---
title: Table of Contents
-linkTitle: Table of Contents
description: Hugo can automatically parse Markdown content and create a Table of Contents you can use in your templates.
categories: [content management]
keywords: [table of contents, toc]
diff --git a/content/en/content-management/types.md b/content/en/content-management/types.md
index 8ad0d7f6c..fc79ca58c 100644
--- a/content/en/content-management/types.md
+++ b/content/en/content-management/types.md
@@ -1,6 +1,5 @@
---
title: Content Types
-linkTitle: Content Types
description: Hugo is built around content organized in sections.
categories: [content management]
keywords: [lists, sections, content types, types, organization]
diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md
index c9e78d419..4a90c78d5 100644
--- a/content/en/content-management/urls.md
+++ b/content/en/content-management/urls.md
@@ -1,6 +1,5 @@
---
title: URL Management
-linkTitle: URL Management
description: Control the structure and appearance of URLs through front matter entries and settings in your site configuration.
categories: [content management]
keywords: [aliases,redirects,permalinks,urls]
diff --git a/content/en/contribute/_index.md b/content/en/contribute/_index.md
index 5e46ae287..cb6ca2966 100644
--- a/content/en/contribute/_index.md
+++ b/content/en/contribute/_index.md
@@ -2,20 +2,14 @@
title: Contribute to the Hugo Project
linktitle: Contribute to Hugo
description: Contribute to Hugo development and documentation.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [contribute]
keywords: []
menu:
docs:
- parent: "contribute"
+ parent: contribute
weight: 01
-weight: 01 #rem
-draft: false
-slug:
+weight: 01
aliases: [/tutorials/how-to-contribute-to-hugo/,/community/contributing/]
-toc: false
---
Hugo relies heavily on the enthusiasm and participation of the open-source community. We need your support in both its development and documentation.
diff --git a/content/en/contribute/development.md b/content/en/contribute/development.md
index b11ef09de..2c24d8ddd 100644
--- a/content/en/contribute/development.md
+++ b/content/en/contribute/development.md
@@ -2,17 +2,13 @@
title: Contribute to Hugo Development
linktitle: Development
description: Hugo relies heavily on contributions from the open source community.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [contribute]
keywords: [dev,open source]
-authors: [digitalcraftsman]
menu:
docs:
- parent: "contribute"
+ parent: contribute
weight: 10
weight: 10
-sections_weight: 10
toc: true
---
diff --git a/content/en/contribute/documentation.md b/content/en/contribute/documentation.md
index c55a74b41..a72483dc0 100644
--- a/content/en/contribute/documentation.md
+++ b/content/en/contribute/documentation.md
@@ -2,16 +2,13 @@
title: Contribute to the Hugo Docs
linktitle: Documentation
description: Documentation is an integral part of any open source project. The Hugo docs are as much a work in progress as the source it attempts to cover.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [contribute]
keywords: [docs,documentation,community, contribute]
menu:
docs:
- parent: "contribute"
+ parent: contribute
weight: 20
weight: 20
-sections_weight: 20
aliases: [/contribute/docs/]
toc: true
---
@@ -72,19 +69,13 @@ Here is a review of the front matter fields automatically generated for you usin
`signature`
: this is a signature/syntax definition for calling the function (e.g., `apply SEQUENCE FUNCTION [PARAM...]`).
-`workson`
-: acceptable values include `lists`,`taxonomies`, `terms`, `groups`, and `files`.
-
-`hugoversion`
-: the version of Hugo that will ship with this new function.
-
`relatedfuncs`
: other [templating functions] you feel are related to your new function to help fellow Hugo users.
`{{.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](#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.
+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).
## Add Code Blocks
diff --git a/content/en/contribute/themes.md b/content/en/contribute/themes.md
index c515d1fcf..adfc38cc2 100644
--- a/content/en/contribute/themes.md
+++ b/content/en/contribute/themes.md
@@ -2,19 +2,14 @@
title: Add Your Hugo Theme to the Showcase
linktitle: Themes
description: If you've built a Hugo theme and want to contribute back to the Hugo Community, share it with us.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [contribute]
keywords: [contribute,themes,design]
-authors: [digitalcraftsman]
menu:
docs:
- parent: "contribute"
+ parent: contribute
weight: 30
weight: 30
-sections_weight: 30
aliases: [/contribute/theme/]
-wip: true
toc: true
---
diff --git a/content/en/documentation.md b/content/en/documentation.md
index 77cf283fa..221d7c392 100644
--- a/content/en/documentation.md
+++ b/content/en/documentation.md
@@ -2,17 +2,10 @@
title: Hugo Documentation
linktitle: Hugo
description: Hugo is the world's fastest static website engine. It's written in Go (aka Golang) and developed by bep, spf13 and friends.
-date: 2017-02-01
-publishdate: 2017-02-01
menu:
main:
- parent: "section name"
weight: 01
-weight: 01 #rem
-draft: false
-slug:
-aliases: []
-toc: false
+weight: 01
layout: documentation-home
---
diff --git a/content/en/functions/GetPage.md b/content/en/functions/GetPage.md
index 6a6262f75..f4f4405c6 100644
--- a/content/en/functions/GetPage.md
+++ b/content/en/functions/GetPage.md
@@ -1,20 +1,13 @@
---
title: .GetPage
description: "Gets a `Page` of a given `path`."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [sections,lists,indexes]
signature: [".GetPage PATH"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
`.GetPage` returns a page of a given `path`. Both `Site` and `Page` implements this method. The `Page` variant will, if given a relative path -- i.e. a path without a leading `/` -- try look for the page relative to the current page.
diff --git a/content/en/functions/RenderString.md b/content/en/functions/RenderString.md
index 25fdcf60e..47c914ca4 100644
--- a/content/en/functions/RenderString.md
+++ b/content/en/functions/RenderString.md
@@ -1,11 +1,10 @@
---
title: .RenderString
description: "Renders markup to HTML."
-date: 2019-12-18
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [markdown,goldmark,render]
signature: [".RenderString MARKUP"]
---
diff --git a/content/en/functions/_index.md b/content/en/functions/_index.md
index fa7974685..fd45fb6dd 100644
--- a/content/en/functions/_index.md
+++ b/content/en/functions/_index.md
@@ -1,16 +1,11 @@
---
title: Functions Quick Reference
-linktitle: Functions Quick Reference
description: Comprehensive list of Hugo templating functions, including basic and advanced usage examples.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: []
menu:
docs:
- parent: "functions"
-weight: 01 #rem
-draft: false
+ parent: functions
+weight: 01
aliases: [/layout/functions/,/templates/functions]
---
diff --git a/content/en/functions/adddate.md b/content/en/functions/adddate.md
index 116ffa8de..96a9df833 100644
--- a/content/en/functions/adddate.md
+++ b/content/en/functions/adddate.md
@@ -1,20 +1,13 @@
---
title: .AddDate
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
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dates,time]
signature: [".AddDate YEARS MONTHS DAYS"]
-workson: [times]
-hugoversion:
relatedfuncs: [now]
-deprecated: false
-aliases: []
---
```go-html-template
diff --git a/content/en/functions/after.md b/content/en/functions/after.md
index 9a2a68c5f..f182d913b 100644
--- a/content/en/functions/after.md
+++ b/content/en/functions/after.md
@@ -1,20 +1,13 @@
---
title: after
description: "`after` slices an array to only the items after the Nth item."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [iteration]
signature: ["after INDEX COLLECTION"]
-workson: []
-hugoversion:
relatedfuncs: [last,first,seq]
-deprecated: false
-aliases: []
---
The following shows `after` being used in conjunction with the [`slice` function][slice]:
diff --git a/content/en/functions/anchorize.md b/content/en/functions/anchorize.md
index 5530e193b..cf04a9640 100644
--- a/content/en/functions/anchorize.md
+++ b/content/en/functions/anchorize.md
@@ -1,15 +1,12 @@
---
title: anchorize
description: Takes a string and sanitizes it the same way as the [`defaultMarkdownHandler`](https://gohugo.io/getting-started/configuration-markup#configure-markup) does for markdown headers.
-date: 2018-10-13
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [markdown,strings]
signature: ["anchorize INPUT"]
-hugoversion: "0.39"
-workson: []
relatedfuncs: [humanize]
---
diff --git a/content/en/functions/append.md b/content/en/functions/append.md
index 3e2fc13cc..626bc1242 100644
--- a/content/en/functions/append.md
+++ b/content/en/functions/append.md
@@ -1,17 +1,13 @@
---
title: append
description: "`append` appends one or more values to a slice and returns the resulting slice."
-date: 2018-09-14
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [collections]
signature: ["COLLECTION | append VALUE [VALUE]...", "COLLECTION | append COLLECTION"]
-workson: []
-hugoversion: "0.49"
relatedfuncs: [last,first,where,slice]
-aliases: []
---
An example appending single values:
diff --git a/content/en/functions/apply.md b/content/en/functions/apply.md
index 0f02c1b4c..aa345d607 100644
--- a/content/en/functions/apply.md
+++ b/content/en/functions/apply.md
@@ -1,21 +1,13 @@
---
title: apply
description: Given a map, array, or slice, `apply` returns a new slice with a function applied over it.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [advanced]
signature: ["apply COLLECTION FUNCTION [PARAM...]"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
{{< todo >}}
@@ -59,19 +51,19 @@ If you have `post-tag-list.html` and `post-tag-link.html` as [partials], you *co
{{< code file="layouts/partials/post-tag-list.html" copy="false" >}}
{{ with .Params.tags }}
-
{{ end }}
{{< /code >}}
@@ -85,25 +77,25 @@ This first version of `layouts/partials/post-tag-list.html` separates all of the
```go-html-template
{{ with .Params.tags }}
-
- Tags:
- {{ $sort := sort . }}
- {{ $links := apply $sort "partial" "post-tag-link.html" "." }}
- {{ $clean := apply $links "chomp" "." }}
- {{ delimit $clean ", " }}
-
+
+ Tags:
+ {{ $sort := sort . }}
+ {{ $links := apply $sort "partial" "post-tag-link.html" "." }}
+ {{ $clean := apply $links "chomp" "." }}
+ {{ delimit $clean ", " }}
+
{{ end }}
```
Now in the completed version, you can sort the tags, convert the tags to links with `layouts/partials/post-tag-link.html`, [chomp] off stray newlines, and join the tags together in a delimited list for presentation. Here is an even DRYer version of the preceding example:
{{< code file="layouts/partials/post-tag-list.html" download="post-tag-list.html" >}}
- {{ with .Params.tags }}
-
- Tags:
- {{ delimit (apply (apply (sort .) "partial" "post-tag-link.html" ".") "chomp" ".") ", " }}
-
- {{ end }}
+{{ with .Params.tags }}
+
+ Tags:
+ {{ delimit (apply (apply (sort .) "partial" "post-tag-link.html" ".") "chomp" ".") ", " }}
+
+{{ end }}
{{< /code >}}
{{% note %}}
diff --git a/content/en/functions/base64.md b/content/en/functions/base64.md
index 2568c1f47..cade370b3 100644
--- a/content/en/functions/base64.md
+++ b/content/en/functions/base64.md
@@ -1,21 +1,13 @@
---
title: base64
description: "`base64Encode` and `base64Decode` let you easily decode content with a base64 encoding and vice versa through pipes."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
relatedfuncs: []
signature: ["base64Decode INPUT", "base64Encode INPUT"]
-workson: []
-hugoversion:
-deprecated: false
-draft: false
-aliases: []
---
An example:
@@ -32,7 +24,7 @@ An example:
You can also pass other data types as arguments to the template function which tries to convert them. The following will convert *42* from an integer to a string because both `base64Encode` and `base64Decode` always return a string.
-```
+```go-html-template
{{ 42 | base64Encode | base64Decode }}
=> "42" rather than 42
```
diff --git a/content/en/functions/chomp.md b/content/en/functions/chomp.md
index eb44f726c..d8f8bfe4f 100644
--- a/content/en/functions/chomp.md
+++ b/content/en/functions/chomp.md
@@ -2,21 +2,15 @@
title: chomp
toc: true
description: Removes any trailing newline characters.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [trim]
signature:
- "chomp INPUT"
- "strings.Chomp INPUT"
-workson: []
-hugoversion:
relatedfuncs: [truncate]
-deprecated: false
---
Useful in a pipeline to remove newlines added by other processing (e.g., [`markdownify`](/functions/markdownify/)).
diff --git a/content/en/functions/complement.md b/content/en/functions/complement.md
index 87bb3af62..e4cf01e77 100644
--- a/content/en/functions/complement.md
+++ b/content/en/functions/complement.md
@@ -10,7 +10,6 @@ signature:
- "complement COLLECTION [COLLECTION]..."
- "collections.Complement COLLECTION [COLLECTION]..."
relatedfuncs: [intersect,symdiff,union]
-aliases: []
---
To find the elements within `$c3` that do not exist in `$c1` or `$c2`:
diff --git a/content/en/functions/cond.md b/content/en/functions/cond.md
index b7b5e3d55..5327eadf4 100644
--- a/content/en/functions/cond.md
+++ b/content/en/functions/cond.md
@@ -1,16 +1,12 @@
---
-title: "cond"
-date: 2017-09-08
+title: cond
description: "Return one of two arguments, depending on the value of a third argument."
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["cond CONTROL VAR1 VAR2"]
-hugoversion: 0.27
relatedfuncs: [default]
-toc: false
-draft: false
---
`cond` returns *VAR1* if *CONTROL* is true, or *VAR2* if it is not.
diff --git a/content/en/functions/countrunes.md b/content/en/functions/countrunes.md
index e3add0d7f..0d89af857 100644
--- a/content/en/functions/countrunes.md
+++ b/content/en/functions/countrunes.md
@@ -1,21 +1,15 @@
---
title: countrunes
description: Determines the number of runes in a string excluding any whitespace.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [counting, word count]
signature:
- "countrunes INPUT"
- "strings.CountRunes INPUT"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
In contrast with `countwords` function, which counts every word in a string, the `countrunes` function determines the number of runes in the content and excludes any whitespace. This has specific utility if you are dealing with CJK-like languages.
diff --git a/content/en/functions/countwords.md b/content/en/functions/countwords.md
index c0ca72aa3..33dcbcaef 100644
--- a/content/en/functions/countwords.md
+++ b/content/en/functions/countwords.md
@@ -1,19 +1,13 @@
---
title: countwords
description: Counts the number of words in a string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [counting, word count]
signature: ["countwords INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [countrunes]
-deprecated: false
---
The template function works similar to the [.WordCount page variable][pagevars].
diff --git a/content/en/functions/crypto.FNV32a.md b/content/en/functions/crypto.FNV32a.md
index dddf7a9aa..9bcfff26f 100644
--- a/content/en/functions/crypto.FNV32a.md
+++ b/content/en/functions/crypto.FNV32a.md
@@ -4,10 +4,9 @@ description: Returns the FNV (Fowler–Noll–Vo) 32 bit hash of a given string.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [crypto hash FNV32 Fowler-Noll-Vo]
signature: ["crypto.FNV32a STRING"]
-aliases: []
---
This function calculates the 32 bit [FNV1a hash](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash) of a given string according to the [specification](https://datatracker.ietf.org/doc/html/draft-eastlake-fnv-12):
diff --git a/content/en/functions/dateformat.md b/content/en/functions/dateformat.md
index 210913b87..ddfb61296 100644
--- a/content/en/functions/dateformat.md
+++ b/content/en/functions/dateformat.md
@@ -1,21 +1,15 @@
---
title: time.Format
description: Converts a date/time to a localized string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dates,time,strings]
signature:
- "time.Format LAYOUT INPUT"
- "dateFormat LAYOUT INPUT"
-workson: []
-hugoversion:
relatedfuncs: [Format,now,Unix,time]
-deprecated: false
---
`time.Format` (alias `dateFormat`) converts either a `time.Time` object (e.g. `.Date`) or a timestamp string `INPUT` into the format specified by the `LAYOUT` string.
diff --git a/content/en/functions/default.md b/content/en/functions/default.md
index b187331de..a8bac86dd 100644
--- a/content/en/functions/default.md
+++ b/content/en/functions/default.md
@@ -2,22 +2,14 @@
title: default
description: Allows setting a default value that can be returned if a first value is not set.
qref: "Returns a default value if a value is not set when checked."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: [defaults]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: ["default DEFAULT INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
`default` checks whether a given value is set and returns a default value if it is not. *Set* in this context means different things depending on the data type:
diff --git a/content/en/functions/delimit.md b/content/en/functions/delimit.md
index 63207b268..3b30c58c6 100644
--- a/content/en/functions/delimit.md
+++ b/content/en/functions/delimit.md
@@ -1,22 +1,13 @@
---
title: delimit
description: Loops through any array, slice, or map and returns a string of all the values separated by a delimiter.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [iteration]
-toc: false
signature: ["delimit COLLECTION DELIMIT LAST"]
-workson: [lists,taxonomies,terms]
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
`delimit` called in your template takes the form of
diff --git a/content/en/functions/dict.md b/content/en/functions/dict.md
index dd1e2cd5b..344e56d20 100644
--- a/content/en/functions/dict.md
+++ b/content/en/functions/dict.md
@@ -1,19 +1,13 @@
---
title: dict
description: Creates a dictionary from a list of key and value pairs.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dictionary]
signature: ["dict KEY VALUE [KEY VALUE]..."]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
`dict` is especially useful for passing more than one value to a partial template.
diff --git a/content/en/functions/duration.md b/content/en/functions/duration.md
index bf771c0a9..4dc365ae5 100644
--- a/content/en/functions/duration.md
+++ b/content/en/functions/duration.md
@@ -4,10 +4,9 @@ description: Returns a `time.Duration` structure, using the given time unit and
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [time duration]
signature: ["duration TIME_UNIT DURATION_NUMBER"]
-aliases: []
---
`time.Duration` converts a given number into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields. E.g. you can perform [time operations](https://pkg.go.dev/time#Duration) on the returned `time.Duration` value:
diff --git a/content/en/functions/echoparam.md b/content/en/functions/echoparam.md
index abdd0072a..840acf51c 100644
--- a/content/en/functions/echoparam.md
+++ b/content/en/functions/echoparam.md
@@ -1,21 +1,13 @@
---
title: echoParam
description: Prints a parameter if it is set.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["echoParam DICTIONARY KEY"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
diff --git a/content/en/functions/emojify.md b/content/en/functions/emojify.md
index a323470b7..45753af13 100644
--- a/content/en/functions/emojify.md
+++ b/content/en/functions/emojify.md
@@ -1,19 +1,13 @@
---
title: emojify
description: Runs a string through the Emoji emoticons processor.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,emojis]
signature: ["emojify INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
`emojify` runs a passed string through the Emoji emoticons processor.
diff --git a/content/en/functions/eq.md b/content/en/functions/eq.md
index 47901f16e..98eca1aa5 100644
--- a/content/en/functions/eq.md
+++ b/content/en/functions/eq.md
@@ -1,21 +1,13 @@
---
title: eq
-linktitle: eq
description: Returns the boolean truth of arg1 == arg2.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["eq ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/errorf.md b/content/en/functions/errorf.md
index 4e5160b25..b3e0fd280 100644
--- a/content/en/functions/errorf.md
+++ b/content/en/functions/errorf.md
@@ -1,19 +1,13 @@
---
title: errorf and warnf
description: Log ERROR or WARNING from the templates.
-date: 2017-09-30
-publishdate: 2017-09-30
-lastmod: 2017-09-30
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings, log, error]
signature: ["errorf FORMAT INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [printf]
-deprecated: false
---
`errorf` or `warnf` will evaluate a format string, then output the result to the ERROR or WARNING log (and only once per error message to avoid flooding the log).
diff --git a/content/en/functions/fileExists.md b/content/en/functions/fileExists.md
index 0c12d7d84..5a365b7c1 100644
--- a/content/en/functions/fileExists.md
+++ b/content/en/functions/fileExists.md
@@ -1,20 +1,12 @@
---
-title: "fileExists"
-linktitle: "fileExists"
-date: 2017-08-31T22:38:22+02:00
+title: fileExists
description: Checks for file or directory existence.
-publishdate: 2017-08-31T22:38:22+02:00
-lastmod: 2021-11-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["os.FileExists PATH","fileExists PATH"]
-workson: []
-hugoversion:
relatedfuncs: ['os.ReadDir','os.ReadFile','os.Stat']
-deprecated: false
-aliases: []
---
The `os.FileExists` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
diff --git a/content/en/functions/findRe.md b/content/en/functions/findRe.md
index 3be6f5cd3..e84a0cf76 100644
--- a/content/en/functions/findRe.md
+++ b/content/en/functions/findRe.md
@@ -10,7 +10,6 @@ signature:
- "findRE PATTERN INPUT [LIMIT]"
- "strings.FindRE PATTERN INPUT [LIMIT]"
relatedfuncs: [replaceRE]
-aliases: []
---
By default, the `findRE` function finds all matches. You can limit the number of matches with an optional LIMIT parameter.
diff --git a/content/en/functions/first.md b/content/en/functions/first.md
index 98d162617..118c9c504 100644
--- a/content/en/functions/first.md
+++ b/content/en/functions/first.md
@@ -1,21 +1,13 @@
---
title: first
-linktitle: first
description: "Slices an array to only the first _N_ elements."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [iteration]
signature: ["first LIMIT COLLECTION"]
-workson: [lists,taxonomies,terms,groups]
-hugoversion:
relatedfuncs: [after,last]
-deprecated: false
-aliases: []
---
`first` works in a similar manner to the [`limit` keyword in
diff --git a/content/en/functions/float.md b/content/en/functions/float.md
index 1c589e317..60ebf949d 100644
--- a/content/en/functions/float.md
+++ b/content/en/functions/float.md
@@ -1,25 +1,17 @@
---
title: float
-linktitle: float
description: Creates a `float` from the argument passed into the function.
-date: 2017-09-28
-publishdate: 2017-09-28
-lastmod: 2017-09-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,floats]
signature: ["float INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
Useful for turning strings into floating point numbers.
-```
+```go-html-template
{{ float "1.23" }} → 1.23
```
diff --git a/content/en/functions/format.md b/content/en/functions/format.md
index 201a779cd..af34cbf7e 100644
--- a/content/en/functions/format.md
+++ b/content/en/functions/format.md
@@ -1,20 +1,13 @@
---
title: .Format
description: Formats built-in Hugo dates---`.Date`, `.PublishDate`, and `.Lastmod`---according to Go's layout string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dates,time]
signature: [".Format FORMAT"]
-workson: [times]
-hugoversion:
relatedfuncs: [dateFormat,now,Unix,time]
-deprecated: false
-aliases: []
toc: true
---
@@ -26,7 +19,7 @@ toc: true
Assuming a key-value of `date: 2017-03-03` in a content file's front matter, your can run the date through `.Format` followed by a layout string for your desired output at build time:
-```
+```go-html-template
{{ .PublishDate.Format "January 2, 2006" }} => March 3, 2017
```
diff --git a/content/en/functions/ge.md b/content/en/functions/ge.md
index 915930528..8306935f0 100644
--- a/content/en/functions/ge.md
+++ b/content/en/functions/ge.md
@@ -1,21 +1,13 @@
---
title: ge
-linktitle: ge
description: Returns the boolean truth of arg1 >= arg2.
-date: 2017-07-26
-publishdate: 2017-07-26
-lastmod: 2017-07-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["ge ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/get.md b/content/en/functions/get.md
index 27f348807..561a794c7 100644
--- a/content/en/functions/get.md
+++ b/content/en/functions/get.md
@@ -1,21 +1,13 @@
---
title: .Get
description: Accesses positional and ordered parameters in shortcode declaration.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [shortcodes]
signature: [".Get INDEX", ".Get KEY"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
-needsexample: true
---
`.Get` is specifically used when creating your own [shortcode template][sc], to access the [positional and named](/templates/shortcode-templates/#positional-vs-named-parameters) parameters passed to it. When used with a numeric INDEX, it queries positional parameters (starting with 0). With a string KEY, it queries named parameters.
diff --git a/content/en/functions/getenv.md b/content/en/functions/getenv.md
index 93e93a382..e014b7ad5 100644
--- a/content/en/functions/getenv.md
+++ b/content/en/functions/getenv.md
@@ -1,20 +1,13 @@
---
title: getenv
description: Returns the value of an environment variable, or an empty string if the environment variable is not set.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2021-11-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["os.Getenv VARIABLE", "getenv VARIABLE"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
Examples:
@@ -43,4 +36,3 @@ And then retrieve the values within a template:
```
With Hugo v0.91.0 and later, you must explicitly allow access to environment variables. For details, review [Hugo's Security Policy](/about/security-model/#security-policy). By default, environment variables beginning with `HUGO_` are allowed when using the `os.Getenv` function.
-
diff --git a/content/en/functions/group.md b/content/en/functions/group.md
index 203498cb1..617dcbb34 100644
--- a/content/en/functions/group.md
+++ b/content/en/functions/group.md
@@ -1,14 +1,12 @@
---
title: group
description: "`group` groups a list of pages."
-date: 2018-09-14
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [collections]
signature: ["PAGES | group KEY"]
-hugoversion: "0.49"
---
{{< code file="layouts/partials/groups.html" >}}
diff --git a/content/en/functions/gt.md b/content/en/functions/gt.md
index 9643ee36d..dba0d4dfc 100644
--- a/content/en/functions/gt.md
+++ b/content/en/functions/gt.md
@@ -1,21 +1,13 @@
---
title: gt
-linktitle: gt
description: Returns the boolean truth of arg1 > arg2.
-date: 2017-07-26
-publishdate: 2017-07-26
-lastmod: 2017-07-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["gt ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/hasPrefix.md b/content/en/functions/hasPrefix.md
index cf29315e2..37a15deed 100644
--- a/content/en/functions/hasPrefix.md
+++ b/content/en/functions/hasPrefix.md
@@ -1,21 +1,13 @@
---
title: hasprefix
-linktitle: hasPrefix
description: Tests whether a string begins with prefix.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["hasPrefix STRING PREFIX"]
-workson: []
-hugoversion:
relatedfuncs: [hasSuffix]
-deprecated: false
-aliases: []
---
* `{{ hasPrefix "Hugo" "Hu" }}` → true
diff --git a/content/en/functions/hasSuffix.md b/content/en/functions/hasSuffix.md
index 151b90ee3..994a3a572 100644
--- a/content/en/functions/hasSuffix.md
+++ b/content/en/functions/hasSuffix.md
@@ -1,21 +1,13 @@
---
title: hasSuffix
-linktitle: hasSuffix
description: Tests whether a string ends with suffix.
-date: 2023-03-01
-publishdate: 2023-03-01
-lastmod: 2023-03-01
categories: [functions]
menu:
docs:
-parent: "functions"
+parent: functions
keywords: [strings]
signature: ["hasSuffix STRING SUFFIX"]
-workson: []
-hugoversion:
relatedfuncs: [hasPrefix]
-deprecated: false
-aliases: []
---
* `{{ hasSuffix "Hugo" "go" }}` → true
diff --git a/content/en/functions/hasmenucurrent.md b/content/en/functions/hasmenucurrent.md
index fea980120..8605cf34e 100644
--- a/content/en/functions/hasmenucurrent.md
+++ b/content/en/functions/hasmenucurrent.md
@@ -1,22 +1,13 @@
---
title: .HasMenuCurrent
description:
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [menus]
signature: ["PAGE.HasMenuCurrent MENU MENUENTRY"]
-workson: [menus]
-hugoversion:
relatedfuncs: ["IsMenuCurrent"]
-deprecated: false
-toc: false
-draft: false
-aliases: []
---
`.HasMenuCurrent` is a method in `Page` object returning a _boolean_ value. It
diff --git a/content/en/functions/highlight.md b/content/en/functions/highlight.md
index 9edf9de3e..2ca125467 100644
--- a/content/en/functions/highlight.md
+++ b/content/en/functions/highlight.md
@@ -1,18 +1,13 @@
---
title: highlight
-linktitle: highlight
description: Renders code with a syntax highlighter.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2021-12-06
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [highlighting,code blocks,syntax]
signature: ["transform.Highlight INPUT LANG [OPTIONS]","highlight INPUT LANG [OPTIONS]"]
relatedfuncs: []
-deprecated: false
toc: true
---
The `highlight` function uses the [Chroma] syntax highlighter, supporting over 200 languages with more than 40 available styles.
diff --git a/content/en/functions/hmac.md b/content/en/functions/hmac.md
index b906e5abb..3b9675a0b 100644
--- a/content/en/functions/hmac.md
+++ b/content/en/functions/hmac.md
@@ -1,21 +1,13 @@
---
title: hmac
-linktitle: hmac
description: Returns a cryptographic hash that uses a key to sign a message.
-date: 2020-05-29
-publishdate: 2020-05-29
-lastmod: 2020-05-29
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [hmac,checksum]
signature: ["crypto.HMAC HASH_TYPE KEY MESSAGE [ENCODING]","hmac HASH_TYPE KEY MESSAGE [ENCODING]" ]
-workson: []
-hugoversion:
relatedfuncs: [hmac]
-deprecated: false
-aliases: []
---
Set the `HASH_TYPE` argument to `md5`, `sha1`, `sha256`, or `sha512`.
diff --git a/content/en/functions/htmlEscape.md b/content/en/functions/htmlEscape.md
index 652492c72..0ee8fa4d2 100644
--- a/content/en/functions/htmlEscape.md
+++ b/content/en/functions/htmlEscape.md
@@ -1,25 +1,17 @@
---
title: htmlEscape
-linktitle:
description: Returns the given string with the reserved HTML codes escaped.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings, html]
signature: ["htmlEscape INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [htmlUnescape]
-deprecated: false
-aliases: []
---
In the result `&` becomes `&` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`.
-```
+```go-html-template
{{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo & Caddy > WordPress & Apache"
```
diff --git a/content/en/functions/htmlUnescape.md b/content/en/functions/htmlUnescape.md
index 9533fde90..e4646b680 100644
--- a/content/en/functions/htmlUnescape.md
+++ b/content/en/functions/htmlUnescape.md
@@ -1,27 +1,19 @@
---
title: htmlUnescape
-linktitle: htmlUnescape
description: Returns the given string with HTML escape codes un-escaped.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["htmlUnescape INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [htmlEscape]
-deprecated: false
-aliases: []
---
`htmlUnescape` returns the given string with HTML escape codes un-escaped.
Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal.
-```
+```go-html-template
{{ htmlUnescape "Hugo & Caddy > WordPress & Apache" }} → "Hugo & Caddy > WordPress & Apache"
```
diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md
index 91f517be2..c7326242f 100644
--- a/content/en/functions/hugo.md
+++ b/content/en/functions/hugo.md
@@ -1,22 +1,14 @@
---
title: hugo
-linktitle: hugo
description: The `hugo` function provides easy access to Hugo-related data.
-date: 2019-01-31
-publishdate: 2019-01-31
keywords: []
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: ["hugo"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
`hugo` returns an instance that contains the following functions:
diff --git a/content/en/functions/humanize.md b/content/en/functions/humanize.md
index 444761c88..b6e2b8e2a 100644
--- a/content/en/functions/humanize.md
+++ b/content/en/functions/humanize.md
@@ -1,27 +1,19 @@
---
title: humanize
-linktitle:
description: Returns the humanized version of an argument with the first letter capitalized.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,casing]
signature: ["humanize INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [anchorize]
-deprecated: false
-aliases: []
---
If the input is either an int64 value or the string representation of an integer, humanize returns the number with the proper ordinal appended.
-```
+```go-html-template
{{ humanize "my-first-post"}} → "My first post"
{{ humanize "myCamelPost"}} → "My camel post"
{{ humanize "52"}} → "52nd"
diff --git a/content/en/functions/i18n.md b/content/en/functions/i18n.md
index 1dbbfcb76..d342339c3 100644
--- a/content/en/functions/i18n.md
+++ b/content/en/functions/i18n.md
@@ -1,24 +1,16 @@
---
title: i18n
-linktitle: i18n
description: Translates a piece of content based on your i18n configuration files.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [internationalization,i18n,multilingual]
signature:
- "i18n KEY"
- "T KEY"
- "lang.Translate KEY"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
This translates a piece of content based on your `i18n/en-US.toml` files. You can use the [go-i18n](https://github.com/nicksnyder/go-i18n) tools to manage your translations. The translations can exist in both the theme and at the root of your repository.
diff --git a/content/en/functions/images/index.md b/content/en/functions/images/index.md
index 7bc424048..4e16ef965 100644
--- a/content/en/functions/images/index.md
+++ b/content/en/functions/images/index.md
@@ -1,12 +1,11 @@
---
title: Image Filters
description: The images namespace provides a list of filters and other image related functions.
-date: 2017-02-01
categories: [functions]
aliases: [/functions/imageconfig/]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [images]
toc: true
---
diff --git a/content/en/functions/in.md b/content/en/functions/in.md
index c1ef45629..1baf7ce90 100644
--- a/content/en/functions/in.md
+++ b/content/en/functions/in.md
@@ -1,21 +1,13 @@
---
title: in
-linktitle:
description: Checks if an element is in an array or slice--or a substring in a string---and returns a boolean.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["in SET ITEM"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
The elements supported are strings, integers and floats, although only float64 will match as expected.
diff --git a/content/en/functions/index-function.md b/content/en/functions/index-function.md
index 970ee0c49..6fb9f0fec 100644
--- a/content/en/functions/index-function.md
+++ b/content/en/functions/index-function.md
@@ -1,22 +1,14 @@
---
title: index
-linktitle: index
description: Looks up the index(es) or key(s) of the data structure passed into it.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["index COLLECTION INDEXES", "index COLLECTION KEYS"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
aliases: [/functions/index/]
-needsexample: true
---
The `index` functions returns the result of indexing its first argument by the following arguments. Each indexed item must be a map or a slice, e.g.:
@@ -61,7 +53,7 @@ Assume you want to add a `location = ""` field to your front matter for every ar
Here is an example:
-{{< code-toggle file="data/locations/oslo" >}}
+{{< code-toggle file="data/locations/oslo" copy=false >}}
website = "https://www.oslo.kommune.no"
pop_city = 658390
pop_metro = 1717900
@@ -69,10 +61,10 @@ pop_metro = 1717900
The example we will use will be an article on Oslo, whose front matter should be set to exactly the same name as the corresponding file name in `data/locations/`:
-```toml
+{{< code-toggle file="content/articles/oslo.md" fm=true copy=false >}}
title = "My Norwegian Vacation"
location = "oslo"
-```
+{{< /code-toggle >}}
The content of `oslo.toml` can be accessed from your template using the following node path: `.Site.Data.locations.oslo`. However, the specific file you need is going to change according to the front matter.
@@ -87,14 +79,14 @@ This is where the `index` function is needed. `index` takes 2 parameters in this
The variable for `.Params.location` is a string and can therefore replace `oslo` in the example above:
-```
+```go-html-template
{{ index .Site.Data.locations .Params.location }}
=> map[website:https://www.oslo.kommune.no pop_city:658390 pop_metro:1717900]
```
Now the call will return the specific file according to the location specified in the content's front matter, but you will likely want to write specific properties to the template. You can do this by continuing down the node path via dot notation (`.`):
-```
+```go-html-template
{{ (index .Site.Data.locations .Params.location).pop_city }}
=> 658390
```
diff --git a/content/en/functions/int.md b/content/en/functions/int.md
index 74a22714b..1859bc346 100644
--- a/content/en/functions/int.md
+++ b/content/en/functions/int.md
@@ -1,26 +1,18 @@
---
title: int
-linktitle: int
description: Creates an `int` from the argument passed into the function.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,integers]
signature: ["int INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
Useful for turning strings into numbers.
-```
+```go-html-template
{{ int "123" }} → 123
```
diff --git a/content/en/functions/intersect.md b/content/en/functions/intersect.md
index 4a645234f..99ab0943e 100644
--- a/content/en/functions/intersect.md
+++ b/content/en/functions/intersect.md
@@ -1,21 +1,13 @@
---
title: intersect
-linktitle: intersect
description: Returns the common elements of two arrays or slices, in the same order as the first array.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [collections,intersect,union,complement,symdiff]
signature: ["intersect SET1 SET2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
A useful example is to use it as `AND` filters when combined with where:
diff --git a/content/en/functions/ismenucurrent.md b/content/en/functions/ismenucurrent.md
index 51c21721b..a27a174b6 100644
--- a/content/en/functions/ismenucurrent.md
+++ b/content/en/functions/ismenucurrent.md
@@ -1,22 +1,13 @@
---
title: .IsMenuCurrent
description:
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [menus]
signature: ["PAGE.IsMenuCurrent MENU MENUENTRY"]
-workson: [menus]
-hugoversion:
relatedfuncs: ["HasMenuCurrent"]
-deprecated: false
-draft: false
-aliases: []
-needsexample: true
---
`.IsMenuCurrent` is a method in `Page` object returning a _boolean_ value. It
diff --git a/content/en/functions/isset.md b/content/en/functions/isset.md
index 2be8a1587..bbedcd4bb 100644
--- a/content/en/functions/isset.md
+++ b/content/en/functions/isset.md
@@ -1,21 +1,13 @@
---
title: isset
-linktitle: isset
description: Returns true if the parameter is set.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["isset COLLECTION INDEX", "isset COLLECTION KEY"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
Takes either a slice, array, or channel and an index or a map and a key as input.
diff --git a/content/en/functions/jsonify.md b/content/en/functions/jsonify.md
index ecb5264ee..da40b8fcf 100644
--- a/content/en/functions/jsonify.md
+++ b/content/en/functions/jsonify.md
@@ -1,21 +1,13 @@
---
title: jsonify
-linktitle: jsonify
description: Encodes a given object to JSON.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2020-04-13
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,json]
signature: ["jsonify INPUT", "jsonify OPTIONS INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [plainify]
-deprecated: false
-aliases: []
---
Jsonify encodes a given object to JSON.
diff --git a/content/en/functions/lang.Merge.md b/content/en/functions/lang.Merge.md
index 78d658442..ab3e61940 100644
--- a/content/en/functions/lang.Merge.md
+++ b/content/en/functions/lang.Merge.md
@@ -1,20 +1,13 @@
---
title: lang.Merge
description: "Merge missing translations from other languages."
-date: 2018-03-16
categories: [functions]
keywords: [multilingual]
menu:
docs:
- parent: "functions"
-toc: false
+ parent: functions
signature: ["lang.Merge FROM TO"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
comments:
---
diff --git a/content/en/functions/lang.md b/content/en/functions/lang.md
index db353383c..af55c92bf 100644
--- a/content/en/functions/lang.md
+++ b/content/en/functions/lang.md
@@ -2,12 +2,11 @@
title: lang
package: lang
description: "TODO.."
-date: 2021-07-28
categories: [functions]
keywords: [numbers]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["lang.NumFmt PRECISION NUMBER [OPTIONS [DELIMITER]]"]
aliases: ['/functions/numfmt/']
type: 'template-func'
diff --git a/content/en/functions/last.md b/content/en/functions/last.md
index 63fdfa129..72e6a4c0d 100644
--- a/content/en/functions/last.md
+++ b/content/en/functions/last.md
@@ -1,27 +1,18 @@
---
title: last
-linktitle: last
description: "slices an array to only the last Nth elements."
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: []
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: ["last INDEX COLLECTION"]
-workson: [lists, taxonomies, terms, groups]
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
```go-html-template
{{ range last 10 .Pages }}
- {{ .Render "summary" }}
+ {{ .Render "summary" }}
{{ end }}
```
diff --git a/content/en/functions/le.md b/content/en/functions/le.md
index 8df2f2479..632e43a0e 100644
--- a/content/en/functions/le.md
+++ b/content/en/functions/le.md
@@ -1,21 +1,13 @@
---
title: le
-linktitle: le
description: Returns the boolean truth of arg1 <= arg2.
-date: 2017-07-26
-publishdate: 2017-07-26
-lastmod: 2017-07-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["le ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/len.md b/content/en/functions/len.md
index 1d7f9caf4..f621f8c90 100644
--- a/content/en/functions/len.md
+++ b/content/en/functions/len.md
@@ -1,22 +1,13 @@
---
title: len
-linktitle: len
description: Returns the length of a variable according to its type.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-18
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["len INPUT"]
-workson: [lists,taxonomies,terms]
-hugoversion:
relatedfuncs: []
-deprecated: false
-toc: false
-aliases: []
---
`len` is a built-in function in Go that returns the length of a variable according to its type. From the Go documentation:
diff --git a/content/en/functions/lower.md b/content/en/functions/lower.md
index 3fbfc919b..9accf999e 100644
--- a/content/en/functions/lower.md
+++ b/content/en/functions/lower.md
@@ -1,23 +1,15 @@
---
title: lower
-linktitle: lower
description: Converts all characters in the provided string to lowercase.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,casing]
signature:
- "lower INPUT"
- "strings.ToLower INPUT"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/lt.md b/content/en/functions/lt.md
index 1e82270c3..08cad7904 100644
--- a/content/en/functions/lt.md
+++ b/content/en/functions/lt.md
@@ -1,21 +1,13 @@
---
title: lt
-linktitle: lt
description: Returns the boolean truth of arg1 < arg2.
-date: 2017-07-26
-publishdate: 2017-07-26
-lastmod: 2017-07-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["lt ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/markdownify.md b/content/en/functions/markdownify.md
index 44e4c9af6..9f1f3329e 100644
--- a/content/en/functions/markdownify.md
+++ b/content/en/functions/markdownify.md
@@ -1,18 +1,13 @@
---
title: markdownify
-linktitle: markdownify
description: Renders markdown to HTML.
keywords: [markdown,content]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["markdownify INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
```go-html-template
diff --git a/content/en/functions/math.md b/content/en/functions/math.md
index 4abf34d1d..e84bb5f1f 100644
--- a/content/en/functions/math.md
+++ b/content/en/functions/math.md
@@ -1,22 +1,14 @@
---
title: Math
description: Hugo provides mathematical operators in templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2023-03-11
keywords: [math, operators]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: []
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
| Function | Description | Example |
diff --git a/content/en/functions/md5.md b/content/en/functions/md5.md
index 0c9cabbdc..cc5fd31ea 100644
--- a/content/en/functions/md5.md
+++ b/content/en/functions/md5.md
@@ -1,21 +1,13 @@
---
title: md5
-linktitle: md5
description: hashes the given input and returns its MD5 checksum.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["md5 INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [sha]
-deprecated: false
-aliases: []
---
```go-html-template
diff --git a/content/en/functions/merge.md b/content/en/functions/merge.md
index a73644dcb..68e561450 100644
--- a/content/en/functions/merge.md
+++ b/content/en/functions/merge.md
@@ -1,17 +1,13 @@
---
title: merge
description: "Returns the result of merging two or more maps."
-date: 2019-08-08
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dictionary]
signature: ["collections.Merge MAP MAP...", "merge MAP MAP..."]
-workson: []
-hugoversion: "0.56.0"
relatedfuncs: [dict, append, reflect.IsMap, reflect.IsSlice]
-aliases: []
---
Returns the result of merging two or more maps from left to right. If a key already exists, `merge` updates its value. If a key is absent, `merge` inserts the value under the new key.
diff --git a/content/en/functions/ne.md b/content/en/functions/ne.md
index e0fc93bbd..54f66823c 100644
--- a/content/en/functions/ne.md
+++ b/content/en/functions/ne.md
@@ -1,21 +1,13 @@
---
title: ne
-linktitle: ne
description: Returns the boolean truth of arg1 != arg2.
-date: 2017-07-26
-publishdate: 2017-07-26
-lastmod: 2017-07-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [operators,logic]
signature: ["ne ARG1 ARG2"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
diff --git a/content/en/functions/now.md b/content/en/functions/now.md
index e54f952e8..47afdc64d 100644
--- a/content/en/functions/now.md
+++ b/content/en/functions/now.md
@@ -1,21 +1,13 @@
---
title: now
-linktitle: now
description: Returns the current local time
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-30
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dates,time]
signature: ["now"]
-workson: []
-hugoversion:
relatedfuncs: [Unix,dateFormat]
-deprecated: false
-aliases: []
---
See [`time.Time`](https://godoc.org/time#Time).
diff --git a/content/en/functions/os.Stat.md b/content/en/functions/os.Stat.md
index 14adc0ba1..9ace3b8bf 100644
--- a/content/en/functions/os.Stat.md
+++ b/content/en/functions/os.Stat.md
@@ -1,20 +1,13 @@
---
title: os.Stat
description: Returns a FileInfo structure describing a file or directory.
-date: 2018-08-07
-publishdate: 2018-08-07
-lastmod: 2021-11-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [files]
signature: ["os.Stat PATH"]
-workson: []
-hugoversion:
relatedfuncs: ['os.FileExists','os.ReadDir','os.ReadFile']
-deprecated: false
-aliases: []
---
The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
diff --git a/content/en/functions/param.md b/content/en/functions/param.md
index 96cdfe73b..fb695d0e1 100644
--- a/content/en/functions/param.md
+++ b/content/en/functions/param.md
@@ -6,8 +6,7 @@ categories: [functions]
keywords: ['front matter', 'params']
menu:
docs:
- parent: 'functions'
-aliases: []
+ parent: functions
---
The `.Param` method on `.Page` looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY` in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the `.Param` method returns `nil`.
diff --git a/content/en/functions/partialCached.md b/content/en/functions/partialCached.md
index ef29ae8a9..06b14573a 100644
--- a/content/en/functions/partialCached.md
+++ b/content/en/functions/partialCached.md
@@ -1,21 +1,13 @@
---
title: partialCached
-linktitle: partialCached
description: Allows for caching of partials that do not need to be re-rendered on every invocation.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [performance]
signature: ["partialCached LAYOUT INPUT [VARIANT...]"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
The `partialCached` template function can offer significant performance gains for complex templates that don't need to be re-rendered on every invocation.
@@ -26,7 +18,7 @@ The `partialCached` template function can offer significant performance gains fo
Here is the simplest usage:
-```
+```go-html-template
{{ partialCached "footer.html" . }}
```
diff --git a/content/en/functions/path.Base.md b/content/en/functions/path.Base.md
index fff411ad3..5ea0564fa 100644
--- a/content/en/functions/path.Base.md
+++ b/content/en/functions/path.Base.md
@@ -1,19 +1,13 @@
---
title: path.Base
description: Base returns the last element of a path.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, base]
signature: ["path.Base PATH"]
-workson: []
-hugoversion: "0.40"
relatedfuncs: [path.BaseName, path.Clean, path.Dir, path.Ext, path.Join, path.Split]
-deprecated: false
---
`path.Base` returns the last element of `PATH`.
diff --git a/content/en/functions/path.BaseName.md b/content/en/functions/path.BaseName.md
index 6a5b9f0a0..95a521a1a 100644
--- a/content/en/functions/path.BaseName.md
+++ b/content/en/functions/path.BaseName.md
@@ -1,15 +1,13 @@
---
title: path.BaseName
description: BaseName returns the last element of a path, removing the extension if present.
-date: 2022-06-04
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, base]
signature: ["path.BaseName PATH"]
relatedfuncs: [path.Base, path.Clean, path.Dir, path.Ext, path.Join, path.Split]
-deprecated: false
---
If `PATH` is empty, `.` is returned.
diff --git a/content/en/functions/path.Clean.md b/content/en/functions/path.Clean.md
index 852de65fd..ce53cc9ff 100644
--- a/content/en/functions/path.Clean.md
+++ b/content/en/functions/path.Clean.md
@@ -1,13 +1,10 @@
---
title: path.Clean
description: Replaces path separators with slashes (`/`) and removes extraneous separators.
-date: 2021-10-08
-# publishdate: 2018-11-28
-# lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, clean]
signature: ["path.Clean PATH"]
relatedfuncs: [path.Base, path.BaseName, path.Dir, path.Ext, path.Join, path.Split]
@@ -15,13 +12,13 @@ relatedfuncs: [path.Base, path.BaseName, path.Dir, path.Ext, path.Join, path.Spl
`path.Clean` replaces path separators with slashes (`/`) and removes extraneous separators, including trailing separators.
-```
+```go-html-template
{{ path.Clean "foo//bar" }} → "foo/bar"
{{ path.Clean "/foo/bar/" }} → "/foo/bar"
```
On a Windows system, if `.File.Path` is `foo\bar.md`, then:
-```
+```go-html-template
{{ path.Clean .File.Path }} → "foo/bar.md"
```
diff --git a/content/en/functions/path.Dir.md b/content/en/functions/path.Dir.md
index 161a0daa8..0083a1efa 100644
--- a/content/en/functions/path.Dir.md
+++ b/content/en/functions/path.Dir.md
@@ -1,19 +1,13 @@
---
title: path.Dir
description: Dir returns all but the last element of a path.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, dir]
signature: ["path.Dir PATH"]
-workson: []
-hugoversion: "0.40"
relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Ext, path.Join, path.Split]
-deprecated: false
---
`path.Dir` returns all but the last element of `PATH`, typically `PATH`'s directory.
@@ -23,7 +17,7 @@ If `PATH` is empty, `.` is returned.
**Note:** On Windows, `PATH` is converted to slash (`/`) separators.
-```
+```go-html-template
{{ path.Dir "a/news.html" }} → "a"
{{ path.Dir "news.html" }} → "."
{{ path.Dir "a/b/c" }} → "a/b"
diff --git a/content/en/functions/path.Ext.md b/content/en/functions/path.Ext.md
index 8c6fe907c..2e1946608 100644
--- a/content/en/functions/path.Ext.md
+++ b/content/en/functions/path.Ext.md
@@ -1,19 +1,13 @@
---
title: path.Ext
description: Ext returns the file name extension of a path.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, ext, extension]
signature: ["path.Ext PATH"]
-workson: []
-hugoversion: "0.40"
relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Join, path.Split]
-deprecated: false
---
`path.Ext` returns the file name extension `PATH`.
@@ -23,6 +17,6 @@ it is empty if there is no dot.
**Note:** On Windows, `PATH` is converted to slash (`/`) separators.
-```
+```go-html-template
{{ path.Ext "a/b/c/news.html" }} → ".html"
```
diff --git a/content/en/functions/path.Join.md b/content/en/functions/path.Join.md
index 579e8667e..5ac5ac469 100644
--- a/content/en/functions/path.Join.md
+++ b/content/en/functions/path.Join.md
@@ -1,19 +1,13 @@
---
title: path.Join
description: Join path elements into a single path.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, join]
signature: ["path.Join ELEMENT..."]
-workson: []
-hugoversion: "0.39"
relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Ext, path.Split]
-deprecated: false
---
`path.Join` joins path elements into a single path, adding a separating slash if necessary.
@@ -21,7 +15,7 @@ All empty strings are ignored.
**Note:** All path elements on Windows are converted to slash ('/') separators.
-```
+```go-html-template
{{ path.Join "partial" "news.html" }} → "partial/news.html"
{{ path.Join "partial/" "news.html" }} → "partial/news.html"
{{ path.Join "foo/baz" "bar" }} → "foo/baz/bar"
diff --git a/content/en/functions/path.Split.md b/content/en/functions/path.Split.md
index 7737b77d3..aa915788e 100644
--- a/content/en/functions/path.Split.md
+++ b/content/en/functions/path.Split.md
@@ -1,19 +1,13 @@
---
title: path.Split
description: Split path immediately following the final slash.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [path, split]
signature: ["path.Split PATH"]
-workson: []
-hugoversion: "0.39"
relatedfuncs: [path.Base, path.BaseName, path.Clean, path.Dir, path.Ext, path.Join]
-deprecated: false
---
`path.Split` splits `PATH` immediately following the final slash, separating it into a directory and a base component.
@@ -23,7 +17,7 @@ If there is no slash in `PATH`, it returns an empty directory and the base is se
**Note:** On Windows, `PATH` is converted to slash (`/`) separators.
-```
+```go-html-template
{{ $dirFile := path.Split "a/news.html" }} → $dirFile.Dir → "a/", $dirFile.File → "news.html"
{{ $dirFile := path.Split "news.html" }} → $dirFile.Dir → "", $dirFile.File → "news.html"
{{ $dirFile := path.Split "a/b/c" }} → $dirFile.Dir → "a/b/", $dirFile.File → "c"
diff --git a/content/en/functions/plainify.md b/content/en/functions/plainify.md
index 1258c139a..78f52683b 100644
--- a/content/en/functions/plainify.md
+++ b/content/en/functions/plainify.md
@@ -1,24 +1,16 @@
---
title: plainify
-linktitle: plainify
description: Strips any HTML and returns the plain text version of the provided string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-30
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["plainify INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [jsonify]
-deprecated: false
-aliases: []
---
-```
+```go-html-template
{{ "BatMan" | plainify }} → "BatMan"
```
diff --git a/content/en/functions/pluralize.md b/content/en/functions/pluralize.md
index 9c5040934..bd0860802 100644
--- a/content/en/functions/pluralize.md
+++ b/content/en/functions/pluralize.md
@@ -1,23 +1,15 @@
---
title: pluralize
-linktitle: pluralize
description: Pluralizes the given word according to a set of common English pluralization rules
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["pluralize INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
-```
+```go-html-template
{{ "cat" | pluralize }} → "cats"
```
diff --git a/content/en/functions/print.md b/content/en/functions/print.md
index 42b8dcb75..4af0b6b96 100644
--- a/content/en/functions/print.md
+++ b/content/en/functions/print.md
@@ -1,25 +1,18 @@
---
title: print
-linktitle: print
description: Prints the default representation of the given arguments using the standard `fmt.Print` function.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["print INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
See [the go doc](https://golang.org/pkg/fmt/) for additional information.
-```
+```go-html-template
{{ print "foo" }} → "foo"
{{ print "foo" "bar" }} → "foobar"
{{ print (slice 1 2 3) }} → [1 2 3]
diff --git a/content/en/functions/printf.md b/content/en/functions/printf.md
index 41e6524ff..66f85e159 100644
--- a/content/en/functions/printf.md
+++ b/content/en/functions/printf.md
@@ -1,20 +1,13 @@
---
title: printf
-linktitle: printf
description: Formats a string using the standard `fmt.Sprintf` function.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["printf FORMAT INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
See [the go doc](https://golang.org/pkg/fmt/) for additional information.
diff --git a/content/en/functions/println.md b/content/en/functions/println.md
index 1ea70cbad..6ad57f402 100644
--- a/content/en/functions/println.md
+++ b/content/en/functions/println.md
@@ -1,24 +1,17 @@
---
title: println
-linktitle: println
description: Prints the default representation of the given argument using the standard `fmt.Print` function and enforces a linebreak.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["println INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
See [the go doc](https://golang.org/pkg/fmt/) for additional information. `\n` denotes the linebreak but isn't printed in the templates as seen below:
-```
+```go-html-template
{{ println "foo" }} → "foo\n"
```
diff --git a/content/en/functions/querify.md b/content/en/functions/querify.md
index 9e8c4b83f..b21b3a0b2 100644
--- a/content/en/functions/querify.md
+++ b/content/en/functions/querify.md
@@ -1,21 +1,13 @@
---
title: querify
-linktitle: querify
description: Takes a set or slice of key-value pairs and returns a query string to be appended to URLs.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [urls]
signature: ["querify KEY VALUE [KEY VALUE]...", "querify COLLECTION"]
-hugoversion:
-deprecated: false
-workson: []
relatedfuncs: []
-aliases: []
---
`querify` takes a set or slice of key-value pairs and returns a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a URL.
diff --git a/content/en/functions/range.md b/content/en/functions/range.md
index 599e2ad25..da0a4d7ef 100644
--- a/content/en/functions/range.md
+++ b/content/en/functions/range.md
@@ -1,22 +1,13 @@
---
title: range
-linktitle:
description: Iterates over a map, array, or slice.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [iteration]
signature: ["range COLLECTION"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
Just like in the Go programming language, Go and Hugo templates make heavy use of `range` to iterate over a map, array or slice. Other templating languages use a foreach for the equivalent functionality.
diff --git a/content/en/functions/readdir.md b/content/en/functions/readdir.md
index ef4e39e71..3ad43126a 100644
--- a/content/en/functions/readdir.md
+++ b/content/en/functions/readdir.md
@@ -1,19 +1,13 @@
---
title: readDir
description: Returns an array of FileInfo structures sorted by filename, one element for each directory entry.
-publishdate: 2017-02-01
-lastmod: 2021-11-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [files]
signature: ["os.ReadDir PATH", "readDir PATH"]
-workson: []
-hugoversion:
relatedfuncs: ['os.FileExists','os.ReadFile','os.Stat']
-deprecated: false
-aliases: []
---
The `os.ReadDir` function resolves the path relative to the root of your project directory. A leading path separator (`/`) is optional.
diff --git a/content/en/functions/readfile.md b/content/en/functions/readfile.md
index ab782f1df..c700d7aa0 100644
--- a/content/en/functions/readfile.md
+++ b/content/en/functions/readfile.md
@@ -1,20 +1,13 @@
---
title: readFile
description: Returns the contents of a file.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2021-11-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [files]
signature: ["os.ReadFile PATH", "readFile PATH"]
-workson: []
-hugoversion:
relatedfuncs: ['os.FileExists','os.ReadDir','os.Stat']
-deprecated: false
-aliases: []
---
The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.
diff --git a/content/en/functions/ref.md b/content/en/functions/ref.md
index 3387ce6d0..32bf79ca1 100644
--- a/content/en/functions/ref.md
+++ b/content/en/functions/ref.md
@@ -1,21 +1,13 @@
---
title: ref
-linktitle: ref
description: Returns the absolute permalink to a page.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2020-09-05
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [cross references, anchors]
signature: ["ref . PAGE"]
-workson: []
-hugoversion:
relatedfuncs: [relref]
-deprecated: false
-aliases: []
---
This function takes two parameters:
diff --git a/content/en/functions/reflect.IsMap.md b/content/en/functions/reflect.IsMap.md
index 9ad50b599..aa8da7d53 100644
--- a/content/en/functions/reflect.IsMap.md
+++ b/content/en/functions/reflect.IsMap.md
@@ -1,24 +1,18 @@
---
title: reflect.IsMap
description: Reports if a value is a map.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [reflect, reflection, kind]
signature: ["reflect.IsMap INPUT"]
-workson: []
-hugoversion: "v0.53"
relatedfuncs: [reflect.IsSlice]
-deprecated: false
---
`reflect.IsMap` reports if `VALUE` is a map. Returns a boolean.
-```
+```go-html-template
{{ reflect.IsMap (dict "key" "value") }} → true
{{ reflect.IsMap "yo" }} → false
```
diff --git a/content/en/functions/reflect.IsSlice.md b/content/en/functions/reflect.IsSlice.md
index 38640918a..0a29d8f3e 100644
--- a/content/en/functions/reflect.IsSlice.md
+++ b/content/en/functions/reflect.IsSlice.md
@@ -1,24 +1,18 @@
---
title: reflect.IsSlice
description: Reports if a value is a slice.
-date: 2018-11-28
-publishdate: 2018-11-28
-lastmod: 2018-11-28
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [reflect, reflection, kind]
signature: ["reflect.IsSlice INPUT"]
-workson: []
-hugoversion: "0.53"
relatedfuncs: [reflect.IsMap]
-deprecated: false
---
`reflect.IsSlice` reports if `VALUE` is a slice. Returns a boolean.
-```
+```go-html-template
{{ reflect.IsSlice (slice 1 2 3) }} → true
{{ reflect.IsSlice "yo" }} → false
```
diff --git a/content/en/functions/relref.md b/content/en/functions/relref.md
index 1f32f60a2..f60d5559b 100644
--- a/content/en/functions/relref.md
+++ b/content/en/functions/relref.md
@@ -1,21 +1,13 @@
---
title: relref
-linktitle: relref
description: Returns the relative permalink to a page.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2020-09-05
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [cross references, anchors]
signature: ["relref . PAGE"]
-workson: []
-hugoversion:
relatedfuncs: [ref]
-deprecated: false
-aliases: []
---
This function takes two parameters:
diff --git a/content/en/functions/render.md b/content/en/functions/render.md
index 158721a27..7086fd96b 100644
--- a/content/en/functions/render.md
+++ b/content/en/functions/render.md
@@ -1,20 +1,13 @@
---
title: .Render
description: Takes a view to apply when rendering content.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [views]
signature: [".Render LAYOUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
The view is an alternative layout and should be a file name that points to a template in one of the locations specified in the documentation for [Content Views](/templates/views).
@@ -25,7 +18,7 @@ This example could render a piece of content using the content view located at `
```go-html-template
{{ range .Pages }}
- {{ .Render "summary"}}
+ {{ .Render "summary"}}
{{ end }}
```
diff --git a/content/en/functions/replace.md b/content/en/functions/replace.md
index 36e392015..fea92ab68 100644
--- a/content/en/functions/replace.md
+++ b/content/en/functions/replace.md
@@ -1,22 +1,15 @@
---
title: replace
description: Replaces all occurrences of the search string with the replacement string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2020-09-07
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [replace]
signature:
- "replace INPUT OLD NEW [LIMIT]"
- "strings.Replace INPUT OLD NEW [LIMIT]"
-workson: []
-hugoversion:
relatedfuncs: [replaceRE]
-deprecated: false
-aliases: []
---
Replace returns a copy of `INPUT` with all occurrences of `OLD` replaced with `NEW`.
diff --git a/content/en/functions/replacere.md b/content/en/functions/replacere.md
index cc4eb5dc2..ef0ffb4fa 100644
--- a/content/en/functions/replacere.md
+++ b/content/en/functions/replacere.md
@@ -10,7 +10,6 @@ signature:
- "replaceRE PATTERN REPLACEMENT INPUT [LIMIT]"
- "strings.ReplaceRE PATTERN REPLACEMENT INPUT [LIMIT]"
relatedfuncs: [replace,findRE]
-aliases: []
---
By default, the `replaceRE` function replaces all matches. You can limit the number of matches with an optional LIMIT parameter.
diff --git a/content/en/functions/safeCSS.md b/content/en/functions/safeCSS.md
index 835ad3065..1d3708be3 100644
--- a/content/en/functions/safeCSS.md
+++ b/content/en/functions/safeCSS.md
@@ -1,20 +1,13 @@
---
title: safeCSS
description: Declares the provided string as a known "safe" CSS string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-26
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [style,css,strings]
signature: ["safeCSS INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [safeHTML,safeHTMLAttr,]
-deprecated: false
-aliases: []
---
In this context, *safe* means CSS content that matches any of the following:
diff --git a/content/en/functions/safeHTML.md b/content/en/functions/safeHTML.md
index 904547446..182633e46 100644
--- a/content/en/functions/safeHTML.md
+++ b/content/en/functions/safeHTML.md
@@ -1,20 +1,13 @@
---
title: safeHTML
-# linktitle:
description: Declares a provided string as a "safe" HTML document to avoid escaping by Go templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["safeHTML INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
It should not be used for HTML from a third-party, or HTML with unclosed tags or comments.
diff --git a/content/en/functions/safeHTMLAttr.md b/content/en/functions/safeHTMLAttr.md
index 7e730412a..8d1d7efbc 100644
--- a/content/en/functions/safeHTMLAttr.md
+++ b/content/en/functions/safeHTMLAttr.md
@@ -8,7 +8,6 @@ menu:
keywords: [strings]
signature: ["safeHTMLAttr INPUT"]
relatedfuncs: []
-aliases: []
---
Given a site configuration that contains this menu entry:
diff --git a/content/en/functions/safeJS.md b/content/en/functions/safeJS.md
index c67bfa61c..48c2c363b 100644
--- a/content/en/functions/safeJS.md
+++ b/content/en/functions/safeJS.md
@@ -1,22 +1,13 @@
---
title: safeJS
-# linktitle:
description: Declares the provided string as a known safe JavaScript string.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["safeJS INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
In this context, *safe* means the string encapsulates a known safe EcmaScript5 Expression (e.g., `(x + y * z())`).
diff --git a/content/en/functions/safeURL.md b/content/en/functions/safeURL.md
index 285542ea9..178f2a15f 100644
--- a/content/en/functions/safeURL.md
+++ b/content/en/functions/safeURL.md
@@ -1,20 +1,13 @@
---
title: safeURL
description: Declares the provided string as a safe URL or URL substring.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: [strings,urls]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["safeURL INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
`safeURL` declares the provided string as a "safe" URL or URL substring (see [RFC 3986]). A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` from a trusted source should go in the page, but by default dynamic `javascript:` URLs are filtered out since they are a frequently exploited injection vector.
diff --git a/content/en/functions/scratch.md b/content/en/functions/scratch.md
index 20f1ba14a..2e00f41bd 100644
--- a/content/en/functions/scratch.md
+++ b/content/en/functions/scratch.md
@@ -1,21 +1,14 @@
---
title: .Scratch
description: Acts as a "scratchpad" to store and manipulate data.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: [iteration]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: []
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
aliases: [/extras/scratch/,/doc/scratch/]
---
diff --git a/content/en/functions/seq.md b/content/en/functions/seq.md
index 0314595d5..bd9befd86 100644
--- a/content/en/functions/seq.md
+++ b/content/en/functions/seq.md
@@ -1,22 +1,13 @@
---
title: seq
-# linktitle:
description: Creates a sequence of integers.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["seq LAST", "seq FIRST LAST", "seq FIRST INCREMENT LAST"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
It's named and used in the model of [GNU's seq].
@@ -34,15 +25,15 @@ It's named and used in the model of [GNU's seq].
You can use `seq` in combination with `range` and `after`. The following will return 19 elements:
```go-html-template
-{{ range after 1 (seq 20)}}
+{{ range after 1 (seq 20) }}
{{ end }}
```
However, when ranging with an index, the following may be less confusing in that `$indexStartingAt1` and `$num` will return `1,2,3 ... 20`:
```go-html-template
-{{ range $index, $num := (seq 20) }}
-$indexStartingAt1 := (add $index 1)
+{{ range $index, $num := seq 20 }}
+ {{ $indexStartingAt1 := add $index 1 }}
{{ end }}
```
diff --git a/content/en/functions/sha.md b/content/en/functions/sha.md
index ba344fddf..1f6cf8da0 100644
--- a/content/en/functions/sha.md
+++ b/content/en/functions/sha.md
@@ -1,20 +1,13 @@
---
title: sha
-# linktitle: sha
description: Hashes the given input and returns either an SHA1 or SHA256 checksum.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [sha,checksum]
signature: ["sha1 INPUT", "sha256 INPUT"]
-workson: []
-hugoversion:
relatedfuncs: [md5]
-deprecated: false
aliases: [sha1, sha256]
---
diff --git a/content/en/functions/shuffle.md b/content/en/functions/shuffle.md
index 95a586e44..4380664dd 100644
--- a/content/en/functions/shuffle.md
+++ b/content/en/functions/shuffle.md
@@ -1,22 +1,13 @@
---
title: shuffle
-# linktitle:
description: Returns a random permutation of a given array or slice.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-30
keywords: [ordering]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: ["shuffle COLLECTION"]
-workson: []
-hugoversion:
relatedfuncs: [seq]
-deprecated: false
-draft: false
-aliases: []
---
{{< code file="shuffle-input.html" >}}
diff --git a/content/en/functions/singularize.md b/content/en/functions/singularize.md
index 8ca46d433..4e56684b9 100644
--- a/content/en/functions/singularize.md
+++ b/content/en/functions/singularize.md
@@ -1,21 +1,13 @@
---
title: singularize
-# linktitle: singularize
description: Converts a word according to a set of common English singularization rules.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings,singular]
signature: ["singularize INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
`{{ "cats" | singularize }}` → "cat"
diff --git a/content/en/functions/site.md b/content/en/functions/site.md
index 30b8d6505..b408f7141 100644
--- a/content/en/functions/site.md
+++ b/content/en/functions/site.md
@@ -1,23 +1,14 @@
---
title: site
-linktitle: site
description: The `site` function provides global access to the same data as the `.Site` page method.
-date: 2021-02-11
-publishdate: 2021-02-11
-lastmod: 2021-02-11
keywords: []
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature: ["site"]
-workson: []
-hugoversion:
relatedfuncs: ["hugo"]
-deprecated: false
-draft: false
-aliases: []
---
`site` is a global function which returns the same data as the `.Site` page method. See: [Site Variables](/variables/site).
diff --git a/content/en/functions/slice.md b/content/en/functions/slice.md
index 9b5580d44..d2ef62861 100644
--- a/content/en/functions/slice.md
+++ b/content/en/functions/slice.md
@@ -1,23 +1,13 @@
---
title: slice
-# linktitle: slice
description: Creates a slice (array) of all passed arguments.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [slice, array, interface]
signature: ["slice ITEM..."]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
-toc: false
---
One use case is the concatenation of elements in combination with the [`delimit` function]:
diff --git a/content/en/functions/slicestr.md b/content/en/functions/slicestr.md
index d6e4b3439..bbdf95696 100644
--- a/content/en/functions/slicestr.md
+++ b/content/en/functions/slicestr.md
@@ -1,23 +1,15 @@
---
title: slicestr
-# linktitle:
description: Creates a slice of a half-open range, including start and end indices.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature:
- "slicestr STRING START [END]"
- "strings.SliceString STRING START [END]"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
For example, 1 and 4 creates a slice including elements 1 through 3.
diff --git a/content/en/functions/sort.md b/content/en/functions/sort.md
index bbaf98bab..c7b869b39 100644
--- a/content/en/functions/sort.md
+++ b/content/en/functions/sort.md
@@ -5,10 +5,9 @@ categories: [functions]
signature: ["sort COLLECTION [KEY] [ORDER]"]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [ordering,sorting,lists]
toc: true
-aliases: []
---
The `KEY` is optional when sorting slices in ascending order, otherwise it is required. When sorting slices, use the literal `value` in place of the `KEY`. See examples below.
diff --git a/content/en/functions/split.md b/content/en/functions/split.md
index 8d54521b6..d2f3cc8b3 100644
--- a/content/en/functions/split.md
+++ b/content/en/functions/split.md
@@ -1,20 +1,13 @@
---
title: split
description: Returns a slice of strings by splitting STRING by DELIM.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2022-11-06
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["split STRING DELIM"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
Examples:
diff --git a/content/en/functions/store.md b/content/en/functions/store.md
index 4723a9d26..d57194d80 100644
--- a/content/en/functions/store.md
+++ b/content/en/functions/store.md
@@ -4,7 +4,7 @@ description: Returns a Scratch that is not reset on server rebuilds.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [scratch]
signature: []
---
diff --git a/content/en/functions/string.md b/content/en/functions/string.md
index 4905765aa..6c2211daf 100644
--- a/content/en/functions/string.md
+++ b/content/en/functions/string.md
@@ -1,21 +1,13 @@
---
title: string
-# linktitle: string
description: Creates a string from the argument passed to the function
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["string INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
* `{{ string "BatMan"}}` → "BatMan"
diff --git a/content/en/functions/strings.Contains.md b/content/en/functions/strings.Contains.md
index 8ebd9ad33..44cb73b81 100644
--- a/content/en/functions/strings.Contains.md
+++ b/content/en/functions/strings.Contains.md
@@ -4,10 +4,9 @@ description: Reports whether a string contains a substring.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [string strings substring contains]
signature: ["strings.Contains STRING SUBSTRING"]
-aliases: []
relatedfuncs: [strings.ContainsAny]
---
diff --git a/content/en/functions/strings.ContainsAny.md b/content/en/functions/strings.ContainsAny.md
index bfbc2242b..36fa8701b 100644
--- a/content/en/functions/strings.ContainsAny.md
+++ b/content/en/functions/strings.ContainsAny.md
@@ -4,10 +4,9 @@ description: Reports whether a string contains any character from a given string
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [string strings substring contains any]
signature: ["strings.ContainsAny STRING CHARACTERS"]
-aliases: []
relatedfuncs: [strings.Contains]
---
diff --git a/content/en/functions/strings.Count.md b/content/en/functions/strings.Count.md
index c0b11233c..7c3945693 100644
--- a/content/en/functions/strings.Count.md
+++ b/content/en/functions/strings.Count.md
@@ -1,20 +1,13 @@
---
title: strings.Count
description: Returns the number of non-overlapping instances of a substring within a string.
-date: 2020-09-07
-publishdate: 2020-09-07
-lastmod: 2020-09-07
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [count, counting, character count]
signature: ["strings.Count SUBSTR STRING"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
If `SUBSTR` is an empty string, this function returns 1 plus the number of Unicode code points in `STRING`.
diff --git a/content/en/functions/strings.FirstUpper.md b/content/en/functions/strings.FirstUpper.md
index b97d00f29..fab82a2dc 100644
--- a/content/en/functions/strings.FirstUpper.md
+++ b/content/en/functions/strings.FirstUpper.md
@@ -4,11 +4,9 @@ description: Capitalizes the first character of a given string.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings capitalize uppercase first]
signature: ["strings.FirstUpper STRING"]
-hugoversion:
-aliases: []
---
{{ strings.FirstUpper "foo" }} → "Foo"
diff --git a/content/en/functions/strings.HasSuffix.md b/content/en/functions/strings.HasSuffix.md
index 78688a5cb..086cac548 100644
--- a/content/en/functions/strings.HasSuffix.md
+++ b/content/en/functions/strings.HasSuffix.md
@@ -1,20 +1,13 @@
---
title: strings.HasSuffix
description: Determine whether a given string ends with the provided trailing suffix string.
-date: 2019-08-13
-publishdate: 2019-08-13
-lastmod: 2019-08-13
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.HasSuffix STRING SUFFIX"]
-workson: []
-hugoversion:
relatedfuncs: [hasPrefix]
-deprecated: false
-aliases: []
---
{{ $pdfPath := "/path/to/some.pdf" }}
diff --git a/content/en/functions/strings.Repeat.md b/content/en/functions/strings.Repeat.md
index 7cba6d075..99b2fe5a5 100644
--- a/content/en/functions/strings.Repeat.md
+++ b/content/en/functions/strings.Repeat.md
@@ -1,23 +1,16 @@
---
title: strings.Repeat
-# linktitle:
description: Returns INPUT repeated COUNT times.
-date: 2018-05-31
-publishdate: 2018-05-31
-lastmod: 2018-05-31
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.Repeat COUNT INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
-```
+```go-html-template
{{ strings.Repeat 3 "yo" }} → "yoyoyo"
{{ "yo" | strings.Repeat 3 }} → "yoyoyo"
```
diff --git a/content/en/functions/strings.RuneCount.md b/content/en/functions/strings.RuneCount.md
index 69c581746..3a72e339a 100644
--- a/content/en/functions/strings.RuneCount.md
+++ b/content/en/functions/strings.RuneCount.md
@@ -1,20 +1,13 @@
---
title: strings.RuneCount
description: Determines the number of runes in a string.
-date: 2018-06-01
-publishdate: 2018-06-01
-lastmod: 2018-06-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [counting, character count, length, rune length, rune count]
signature: ["strings.RuneCount INPUT"]
-workson: []
-hugoversion:
relatedfuncs: ["len", "countrunes"]
-deprecated: false
-aliases: []
---
In contrast with `strings.CountRunes` function, which strips HTML and whitespace before counting runes, `strings.RuneCount` simply counts all the runes in a string. It relies on the Go [`utf8.RuneCountInString`] function.
diff --git a/content/en/functions/strings.TrimLeft.md b/content/en/functions/strings.TrimLeft.md
index 2d71a1367..b0271c8a8 100644
--- a/content/en/functions/strings.TrimLeft.md
+++ b/content/en/functions/strings.TrimLeft.md
@@ -1,20 +1,13 @@
---
title: strings.TrimLeft
description: Returns a slice of a given string with all leading characters contained in the cutset removed.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.TrimLeft CUTSET STRING"]
-workson: []
-hugoversion:
relatedfuncs: [strings.TrimRight]
-deprecated: false
-aliases: []
---
Given the string `"abba"`, leading `"a"`'s can be removed a follows:
diff --git a/content/en/functions/strings.TrimPrefix.md b/content/en/functions/strings.TrimPrefix.md
index a66bbe3db..c3f702961 100644
--- a/content/en/functions/strings.TrimPrefix.md
+++ b/content/en/functions/strings.TrimPrefix.md
@@ -1,20 +1,13 @@
---
title: strings.TrimPrefix
description: Returns a given string s without the provided leading prefix string. If s doesn't start with prefix, s is returned unchanged.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.TrimPrefix PREFIX STRING"]
-workson: []
-hugoversion:
relatedfuncs: [strings.TrimSuffix]
-deprecated: false
-aliases: []
---
Given the string `"aabbaa"`, the specified prefix is only removed if `"aabbaa"` starts with it:
diff --git a/content/en/functions/strings.TrimRight.md b/content/en/functions/strings.TrimRight.md
index 05084a4c0..e61b884cd 100644
--- a/content/en/functions/strings.TrimRight.md
+++ b/content/en/functions/strings.TrimRight.md
@@ -1,20 +1,13 @@
---
title: strings.TrimRight
description: Returns a slice of a given string with all trailing characters contained in the cutset removed.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.TrimRight CUTSET STRING"]
-workson: []
-hugoversion:
relatedfuncs: [strings.TrimRight]
-deprecated: false
-aliases: []
---
Given the string `"abba"`, trailing `"a"`'s can be removed a follows:
diff --git a/content/en/functions/strings.TrimSuffix.md b/content/en/functions/strings.TrimSuffix.md
index 916038054..05bb92400 100644
--- a/content/en/functions/strings.TrimSuffix.md
+++ b/content/en/functions/strings.TrimSuffix.md
@@ -1,20 +1,13 @@
---
title: strings.TrimSuffix
description: Returns a given string s without the provided trailing suffix string. If s doesn't end with suffix, s is returned unchanged.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature: ["strings.TrimSuffix SUFFIX STRING"]
-workson: []
-hugoversion:
relatedfuncs: [strings.TrimPrefix]
-deprecated: false
-aliases: []
---
Given the string `"aabbaa"`, the specified suffix is only removed if `"aabbaa"` ends with it:
diff --git a/content/en/functions/substr.md b/content/en/functions/substr.md
index 4a00b6eb1..6a5f15592 100644
--- a/content/en/functions/substr.md
+++ b/content/en/functions/substr.md
@@ -1,23 +1,15 @@
---
title: substr
-# linktitle:
description: Extracts parts of a string from a specified character's position and returns the specified number of characters.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
-aliases: []
signature:
- "substr STRING START [LENGTH]"
- "strings.Substr STRING START [LENGTH]"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
It normally takes two parameters: `start` and `length`. It can also take one parameter: `start`, i.e. `length` is omitted, in which case the substring starting from start until the end of the string will be returned.
@@ -26,7 +18,7 @@ To extract characters from the end of the string, use a negative start number.
If `length` is given and is negative, that number of characters will be omitted from the end of string.
-```
+```go-html-template
{{ substr "abcdef" 0 }} → "abcdef"
{{ substr "abcdef" 1 }} → "bcdef"
diff --git a/content/en/functions/symdiff.md b/content/en/functions/symdiff.md
index bac1f1ffe..ffc309418 100644
--- a/content/en/functions/symdiff.md
+++ b/content/en/functions/symdiff.md
@@ -1,15 +1,12 @@
---
-title: "symdiff"
+title: symdiff
description: "`collections.SymDiff` (alias `symdiff`) returns the symmetric difference of two collections."
-date: 2018-11-07
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [collections,intersect,union,complement]
signature: ["COLLECTION | symdiff COLLECTION" ]
-hugoversion: "0.51"
-aliases: []
---
Example:
diff --git a/content/en/functions/templates.Exists.md b/content/en/functions/templates.Exists.md
index 36fa0ea60..b9f340c21 100644
--- a/content/en/functions/templates.Exists.md
+++ b/content/en/functions/templates.Exists.md
@@ -1,24 +1,15 @@
---
title: templates.Exists
-linktitle: ""
description: "Checks whether a template file exists under the given path relative to the `layouts` directory."
-date: 2018-11-01
-publishdate: 2018-11-01
-lastmod: 2018-11-01
categories: [functions]
tags: []
menu:
docs:
- parent: "functions"
+ parent: functions
ns: ""
keywords: ["templates", "template", "layouts"]
signature: ["templates.Exists PATH"]
-workson: []
-hugoversion: "0.46"
-aliases: []
relatedfuncs: []
-toc: false
-deprecated: false
---
A template file is any file living below the `layouts` directories of either the project or any of its theme components including partials and shortcodes.
@@ -32,5 +23,4 @@ The function is particularly handy with dynamic path. The following example ensu
{{ else }}
{{ partial "headers/default.html" . }}
{{ end }}
-
```
diff --git a/content/en/functions/time.ParseDuration.md b/content/en/functions/time.ParseDuration.md
index aabba601a..0332c1706 100644
--- a/content/en/functions/time.ParseDuration.md
+++ b/content/en/functions/time.ParseDuration.md
@@ -4,11 +4,9 @@ description: Parses a given duration string into a `time.Duration` structure.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [time parse duration]
signature: ["time.ParseDuration DURATION"]
-hugoversion:
-aliases: []
---
`time.ParseDuration` parses a duration string into a [`time.Duration`](https://pkg.go.dev/time#Duration) structure so you can access its fields.
diff --git a/content/en/functions/time.md b/content/en/functions/time.md
index b995f78f2..7cb55f6f1 100644
--- a/content/en/functions/time.md
+++ b/content/en/functions/time.md
@@ -1,27 +1,19 @@
---
title: time
-linktitle:
description: Converts a timestamp string into a `time.Time` structure.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [dates,time,location]
signature: ["time INPUT [TIMEZONE]"]
-workson: []
-hugoversion: "v0.77.0"
relatedfuncs: []
-deprecated: false
-aliases: []
---
`time` converts a timestamp string with an optional default location into a [`time.Time`](https://godoc.org/time#Time) structure so you can access its fields:
-```
+```go-html-template
{{ time "2016-05-28" }} → "2016-05-28T00:00:00Z"
{{ (time "2016-05-28").YearDay }} → 149
{{ mul 1000 (time "2016-05-28T10:30:00.00+10:00").Unix }} → 1464395400000, or Unix time in milliseconds
@@ -35,7 +27,7 @@ The list of valid locations may be system dependent, but should include `UTC`, `
If no `TIMEZONE` is set, the `timeZone` from site configuration will be used.
-```
+```go-html-template
{{ time "2020-10-20" }} → 2020-10-20 00:00:00 +0000 UTC
{{ time "2020-10-20" "America/Los_Angeles" }} → 2020-10-20 00:00:00 -0700 PDT
{{ time "2020-01-20" "America/Los_Angeles" }} → 2020-01-20 00:00:00 -0800 PST
diff --git a/content/en/functions/title.md b/content/en/functions/title.md
index b6f752ac8..2e7d891ea 100644
--- a/content/en/functions/title.md
+++ b/content/en/functions/title.md
@@ -1,27 +1,18 @@
---
title: title
-# linktitle:
description: Converts all characters in the provided string to title case.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature:
- "title INPUT"
- "strings.Title INPUT"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-aliases: []
---
-
-```
+```go-html-template
{{ title "BatMan"}}` → "Batman"
```
@@ -29,7 +20,7 @@ Can be combined in pipes. In the following snippet, the link text is cleaned up
```go-html-template
{{ range $name, $items := .Site.Taxonomies.categories }}
- {{ $name | humanize | title }} ({{ len $items }})
+ {{ $name | humanize | title }} ({{ len $items }})
{{ end }}
```
diff --git a/content/en/functions/transform.Unmarshal.md b/content/en/functions/transform.Unmarshal.md
index cefee1503..d238565e2 100644
--- a/content/en/functions/transform.Unmarshal.md
+++ b/content/en/functions/transform.Unmarshal.md
@@ -1,15 +1,12 @@
---
-title: "transform.Unmarshal"
+title: transform.Unmarshal
description: "`transform.Unmarshal` (alias `unmarshal`) parses the input and converts it into a map or an array. Supported formats are JSON, TOML, YAML, XML and CSV."
-date: 2018-12-23
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: []
signature: ["RESOURCE or STRING | transform.Unmarshal [OPTIONS]"]
-hugoversion: "0.53"
-aliases: []
---
The function accepts either a `Resource` created in [Hugo Pipes](/hugo-pipes/) or via [Page Bundles](/content-management/page-bundles/), or simply a string. The two examples below will produce the same map:
diff --git a/content/en/functions/trim.md b/content/en/functions/trim.md
index e688924bb..3d664abea 100644
--- a/content/en/functions/trim.md
+++ b/content/en/functions/trim.md
@@ -1,25 +1,18 @@
---
title: trim
-# linktitle:
description: Returns a slice of a passed string with all leading and trailing characters from cutset removed.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature:
- "trim INPUT CUTSET"
- "strings.Trim INPUT CUTSET"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
-```
+```go-html-template
{{ trim "++Batman--" "+-" }} → "Batman"
```
diff --git a/content/en/functions/truncate.md b/content/en/functions/truncate.md
index 54cfb3612..cf38a2dfd 100644
--- a/content/en/functions/truncate.md
+++ b/content/en/functions/truncate.md
@@ -1,27 +1,20 @@
---
title: truncate
-# linktitle: truncate
description: Truncates a text to a max length without cutting words or leaving unclosed HTML tags.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [strings]
signature:
- "truncate SIZE [ELLIPSIS] INPUT"
- "strings.Truncate SIZE [ELLIPSIS] INPUT"
-workson: []
-hugoversion: 19
relatedfuncs: []
-deprecated: false
---
Since Go templates are HTML-aware, `truncate` will intelligently handle normal strings vs HTML strings:
-```
+```go-html-template
{{ "Keep my HTML" | safeHTML | truncate 10 }}` → Keep my …`
```
diff --git a/content/en/functions/union.md b/content/en/functions/union.md
index 312bc5e65..b73e06d38 100644
--- a/content/en/functions/union.md
+++ b/content/en/functions/union.md
@@ -1,21 +1,13 @@
---
title: union
-# linktitle: union
description: Given two arrays or slices, returns a new array that contains the elements or objects that belong to either or both arrays/slices.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-03-12
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [collections,intersect,union,complement]
signature: ["union SET1 SET2"]
-workson: []
-hugoversion: 0.20
relatedfuncs: [intersect,where]
-deprecated: false
-aliases: []
---
Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. The elements supported are strings, integers, and floats (only float64).
diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md
index 73ca32488..4584ec5ad 100644
--- a/content/en/functions/uniq.md
+++ b/content/en/functions/uniq.md
@@ -1,6 +1,5 @@
---
title: uniq
-linktitle: uniq
description: Takes in a slice or array and returns a slice with duplicate elements removed.
categories: [functions]
menu:
@@ -8,11 +7,9 @@ menu:
parent: functions
keywords: [multilingual,i18n,urls]
signature: [uniq SET]
-aliases: []
---
-```
+```go-html-template
{{ slice 1 3 2 1 | uniq }} --> [1 3 2]
-
```
diff --git a/content/en/functions/unix.md b/content/en/functions/unix.md
index 98fcc74a4..60fae9248 100644
--- a/content/en/functions/unix.md
+++ b/content/en/functions/unix.md
@@ -1,12 +1,11 @@
---
title: .Unix
description: Converts a time.Time value to the number of seconds elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.
-date: 2017-02-01
keywords: [dates,time]
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
signature: [".Unix",".UnixMilli",".UnixMicro",".UnixNano"]
relatedfuncs: [Format,dateFormat,now,time]
---
diff --git a/content/en/functions/upper.md b/content/en/functions/upper.md
index 02f4cd578..e11065f79 100644
--- a/content/en/functions/upper.md
+++ b/content/en/functions/upper.md
@@ -1,25 +1,16 @@
---
title: upper
-# linktitle: upper
description: Converts all characters in a string to uppercase
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: []
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
toc:
signature:
- "upper INPUT"
- "strings.ToUpper INPUT"
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
-draft: false
-aliases: []
---
Note that `upper` can be applied in your templates in more than one way:
diff --git a/content/en/functions/urlize.md b/content/en/functions/urlize.md
index ad5a79ee5..1b953452b 100644
--- a/content/en/functions/urlize.md
+++ b/content/en/functions/urlize.md
@@ -1,19 +1,12 @@
---
title: urlize
-# linktitle: urlize
description: Takes a string, sanitizes it for usage in URLs, and converts spaces to hyphens.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [urls,strings]
signature: ["urlize INPUT"]
-hugoversion:
-deprecated: false
-workson: []
relatedfuncs: []
---
diff --git a/content/en/functions/urlquery.md b/content/en/functions/urlquery.md
index ca00e6e6d..11ada38c4 100644
--- a/content/en/functions/urlquery.md
+++ b/content/en/functions/urlquery.md
@@ -1,21 +1,13 @@
---
title: urlquery
-linktitle: urlquery
description: Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.
-date: 2022-01-18
-publishdate: 2022-01-18
-lastmod: 2022-01-18
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [urls]
signature: ["urlquery INPUT [INPUT]..."]
-hugoversion:
-deprecated: false
-workson: []
relatedfuncs: []
-aliases: []
---
diff --git a/content/en/functions/urls.Parse.md b/content/en/functions/urls.Parse.md
index 6714c8e00..b2d781e7f 100644
--- a/content/en/functions/urls.Parse.md
+++ b/content/en/functions/urls.Parse.md
@@ -4,10 +4,9 @@ description: Parses a URL into a URL structure.
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [urls]
signature: ["urls.Parse URL"]
-aliases: []
---
The `urls.Parse` function parses a URL into a [URL structure](https://godoc.org/net/url#URL). The URL may be relative (a path, without a host) or absolute (starting with a [scheme]). Hugo throws an error when parsing an invalid URL.
diff --git a/content/en/functions/where.md b/content/en/functions/where.md
index 67888fae7..b05e21cc0 100644
--- a/content/en/functions/where.md
+++ b/content/en/functions/where.md
@@ -1,22 +1,14 @@
---
title: where
-# linktitle: where
description: Filters an array to only the elements containing a matching value for a given field.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [filtering]
signature: ["where COLLECTION KEY [OPERATOR] MATCH"]
-workson: [lists,taxonomies,terms,groups]
-hugoversion:
relatedfuncs: [intersect,first,after,last]
-deprecated: false
toc: true
-needsexample: true
---
`where` filters an array to only the elements containing a matching
diff --git a/content/en/functions/with.md b/content/en/functions/with.md
index bfd58bcf2..24707457a 100644
--- a/content/en/functions/with.md
+++ b/content/en/functions/with.md
@@ -1,20 +1,13 @@
---
title: with
-# linktitle: with
description: Rebinds the context (`.`) within its scope and skips the block if the variable is absent or empty.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-03-12
categories: [functions]
menu:
docs:
- parent: "functions"
+ parent: functions
keywords: [conditionals]
signature: ["with INPUT"]
-workson: []
-hugoversion:
relatedfuncs: []
-deprecated: false
---
An alternative way of writing an `if` statement and then referencing the same value is to use `with` instead. `with` rebinds the context (`.`) within its scope and skips the block if the variable is absent, unset or empty.
diff --git a/content/en/getting-started/_index.md b/content/en/getting-started/_index.md
index f953abb22..b08a949fb 100644
--- a/content/en/getting-started/_index.md
+++ b/content/en/getting-started/_index.md
@@ -2,17 +2,14 @@
title: Get Started
linktitle: Get Started Overview
description: Quick start and guides for installing Hugo on your preferred operating system.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [getting started]
keywords: [usage,docs]
menu:
docs:
- parent: "getting-started"
+ parent: getting-started
weight: 1
-weight: 0001 #rem
+weight: 0001
aliases: [/overview/introduction/]
-toc: false
---
If this is your first time using Hugo and you've [already installed Hugo on your machine][installed], we recommend the [quick start]. You can also use [external learning resources] to learn Hugo.
diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md
index d1d237b2a..4ab6b84a0 100644
--- a/content/en/getting-started/configuration-markup.md
+++ b/content/en/getting-started/configuration-markup.md
@@ -1,11 +1,9 @@
---
title: Configure Markup
description: How to handle Markdown and other markup related configuration.
-date: 2019-11-15
categories: [getting started,fundamentals]
keywords: [configuration,highlighting]
weight: 65
-sections_weight: 65
slug: configuration-markup
toc: true
---
diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md
index 568481848..e8268baab 100644
--- a/content/en/getting-started/configuration.md
+++ b/content/en/getting-started/configuration.md
@@ -2,16 +2,13 @@
title: Configure Hugo
linktitle: Configuration
description: How to configure your Hugo site.
-date: 2013-07-01
-publishdate: 2017-01-02
categories: [getting started,fundamentals]
keywords: [configuration,toml,yaml,json]
menu:
docs:
- parent: "getting-started"
+ parent: getting-started
weight: 60
weight: 60
-sections_weight: 60
aliases: [/overview/source-directory/,/overview/configuration/]
toc: true
---
@@ -39,7 +36,7 @@ Multiple site config files can be specified as a comma-separated string to the `
## hugo.toml vs config.toml
-In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project.
+In Hugo 0.110.0 we changed the default config base filename to `hugo`, e.g. `hugo.toml`. We will still look for `config.toml` etc., but we recommend you eventually rename it (but you need to wait if you want to support older Hugo versions). The main reason we're doing this is to make it easier code editors and build tools to identify this as a Hugo configuration file and project.
{{< new-in "0.110.0" >}}
@@ -571,12 +568,12 @@ Setting `force=true` will make a redirect even if there is existing content in t
Hugo will, by default, render all 404 errors when running `hugo server` with the `404.html` template. Note that if you have already added one or more redirects to your [Server Config](#configure-server), you need to add the 404 redirect explicitly, e.g:
-```toml
+{{< code-toggle file="config/development/server" copy=false >}}
[[redirects]]
- from = "/**"
- to = "/404.html"
- status = 404
-```
+from = "/**"
+to = "/404.html"
+status = 404
+{{< /code-toggle >}}
## Configure Title Case
diff --git a/content/en/getting-started/directory-structure.md b/content/en/getting-started/directory-structure.md
index 3c74a3d58..da0f9c761 100644
--- a/content/en/getting-started/directory-structure.md
+++ b/content/en/getting-started/directory-structure.md
@@ -1,17 +1,13 @@
---
title: Directory Structure
-linktitle: Directory Structure
description: Hugo's CLI scaffolds a project directory structure and then takes that single directory and uses it as the input to create a complete website.
-date: 2017-01-02
-publishdate: 2017-02-01
categories: [getting started,fundamentals]
keywords: [source, organization, directories]
menu:
docs:
- parent: "getting-started"
+ parent: getting-started
weight: 50
weight: 50
-sections_weight: 50
aliases: [/overview/source-directory/]
toc: true
---
diff --git a/content/en/getting-started/external-learning-resources/index.md b/content/en/getting-started/external-learning-resources/index.md
index 61e7ed649..7f993736a 100644
--- a/content/en/getting-started/external-learning-resources/index.md
+++ b/content/en/getting-started/external-learning-resources/index.md
@@ -1,19 +1,12 @@
---
title: External Learning Resources
-linktitle: External Learning Resources
description: A list of tutorials and books on Hugo.
-date: 2019-10-20
-publishdate: 2019-10-20
-lastmod: 2019-10-20
keywords: [books, tutorials, learning, usage]
menu:
docs:
- parent: "getting-started"
+ parent: getting-started
weight: 70
weight: 70
-sections_weight: 70
-draft: false
-toc: false
---
## Books
diff --git a/content/en/getting-started/quick-start.md b/content/en/getting-started/quick-start.md
index d49997570..da35c314c 100644
--- a/content/en/getting-started/quick-start.md
+++ b/content/en/getting-started/quick-start.md
@@ -1,6 +1,5 @@
---
title: Quick Start
-linktitle: Quick Start
description: Learn to create a Hugo site in minutes.
categories: [getting started]
keywords: [quick start,usage]
diff --git a/content/en/getting-started/usage.md b/content/en/getting-started/usage.md
index 15cf46cbf..908edca7e 100644
--- a/content/en/getting-started/usage.md
+++ b/content/en/getting-started/usage.md
@@ -1,15 +1,13 @@
---
title: Basic usage
-linktitle: Basic usage
description: Hugo's command line interface (CLI) is fully featured but simple to use, even for those with limited experience working from the command line.
categories: [getting started]
keywords: [usage,livereload,command,flags]
menu:
docs:
- parent: "getting-started"
+ parent: getting-started
weight: 40
weight: 40
-sections_weight: 40
aliases: [/overview/usage/,/extras/livereload/,/doc/usage/,/usage/]
toc: true
---
diff --git a/content/en/hosting-and-deployment/_index.md b/content/en/hosting-and-deployment/_index.md
index ea9f60f17..0d5ada297 100644
--- a/content/en/hosting-and-deployment/_index.md
+++ b/content/en/hosting-and-deployment/_index.md
@@ -2,19 +2,13 @@
title: Hosting & Deployment
linktitle: Hosting & Deployment Overview
description: Site builds, automated deployments, and popular hosting solutions.
-date: 2016-11-01
-publishdate: 2016-11-01
-lastmod: 2016-11-01
categories: [hosting and deployment]
keywords: []
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 01
-weight: 01 #rem
-draft: false
-aliases: []
-toc: false
+weight: 01
---
Because Hugo renders *static* websites, you can host your new Hugo website virtually anywhere. The following represent only a few of the more popular hosting and automated deployment solutions used by the Hugo community.
diff --git a/content/en/hosting-and-deployment/deployment-with-rclone.md b/content/en/hosting-and-deployment/deployment-with-rclone.md
index 868278740..27cd312ef 100644
--- a/content/en/hosting-and-deployment/deployment-with-rclone.md
+++ b/content/en/hosting-and-deployment/deployment-with-rclone.md
@@ -1,23 +1,15 @@
---
title: Deployment with Rclone
-linktitle: Deployment with Rclone
description: If you have access to your web host with SFTP/FTP/SSH/HTTP(DAV), you can use rclone to incrementally deploy your entire Hugo website.
-date: 2021-08-09
-publishdate: 2021-08-09
-lastmod: 2021-08-09
categories: [hosting and deployment]
keywords: [rclone,sftp,deployment]
-authors: [Daniel F. Dickinson]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 80
weight: 80
-sections_weight: 80
-draft: false
aliases: [/tutorials/deployment-with-rclone/]
toc: true
-notesforauthors:
---
## Assumptions
diff --git a/content/en/hosting-and-deployment/deployment-with-rsync.md b/content/en/hosting-and-deployment/deployment-with-rsync.md
index dec0556cf..0bb23d044 100644
--- a/content/en/hosting-and-deployment/deployment-with-rsync.md
+++ b/content/en/hosting-and-deployment/deployment-with-rsync.md
@@ -1,22 +1,15 @@
---
title: Deployment with Rsync
-linktitle: Deployment with Rsync
description: If you have access to your web host with SSH, you can use a simple rsync one-liner to incrementally deploy your entire Hugo website.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [hosting and deployment]
keywords: [rsync,deployment]
-authors: [Adrien Poupin]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 70
weight: 70
-sections_weight: 70
-draft: false
aliases: [/tutorials/deployment-with-rsync/]
toc: true
-notesforauthors:
---
## Assumptions
@@ -37,7 +30,7 @@ As you will see, we'll put this command in a shell script file, which makes buil
To make logging in to your server more secure and less interactive, you can upload your SSH key. If you have already installed your SSH key to your server, you can move on to the next section.
-First, install the ssh client. On Debian/Ubuntu/derivates, use the following command:
+First, install the ssh client. On Debian distributions, use the following command:
{{< code file="install-openssh.sh" >}}
sudo apt-get install openssh-client
diff --git a/content/en/hosting-and-deployment/hosting-on-21yunbox.md b/content/en/hosting-and-deployment/hosting-on-21yunbox.md
index fa5bb41df..62eb331a1 100644
--- a/content/en/hosting-and-deployment/hosting-on-21yunbox.md
+++ b/content/en/hosting-and-deployment/hosting-on-21yunbox.md
@@ -1,20 +1,13 @@
---
title: Host on 21YunBox
-linktitle: Host on 21YunBox
description: Host your Hugo site with 21YunBox's blazing fast Chinese CDN, fully-managed SSL and auto deploys from Gitee.
-date: 2021-01-06
-publishdate: 2021-01-06
categories: [hosting and deployment]
keywords: [21yunbox,hosting,deployment]
-authors: [Toby Glei]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 10
weight: 10
-sections_weight: 10
-draft: false
-aliases: []
toc: true
---
diff --git a/content/en/hosting-and-deployment/hosting-on-aws-amplify.md b/content/en/hosting-and-deployment/hosting-on-aws-amplify.md
index 803a73e46..90fb5c083 100644
--- a/content/en/hosting-and-deployment/hosting-on-aws-amplify.md
+++ b/content/en/hosting-and-deployment/hosting-on-aws-amplify.md
@@ -1,19 +1,13 @@
---
title: Host on AWS Amplify
-linktitle: Host on AWS Amplify
description: Develop and deploy a cloud-powered web app with AWS Amplify.
-date: 2018-01-31
-publishdate: 2018-01-31
categories: [hosting and deployment]
keywords: [amplify,hosting,deployment]
-authors: [Nikhil Swaminathan]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 10
weight: 10
-sections_weight: 10
-aliases: []
toc: true
---
diff --git a/content/en/hosting-and-deployment/hosting-on-azure-static-web-apps.md b/content/en/hosting-and-deployment/hosting-on-azure-static-web-apps.md
index cf06580e7..f0d1d5de4 100644
--- a/content/en/hosting-and-deployment/hosting-on-azure-static-web-apps.md
+++ b/content/en/hosting-and-deployment/hosting-on-azure-static-web-apps.md
@@ -1,21 +1,14 @@
---
title: Hosting on Azure Static Web Apps
-linktitle: Hosting on Azure Static Web Apps
description: Learn how to deploy a Hugo application to Azure Static Web Apps.
-date: 2022-05-09
-publishdate: 2022-05-09
categories: [hosting and deployment]
keywords: [hosting,Azure Static Web Apps]
-authors: [Azure Static Web Apps]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 200
weight: 200
-sections_weight: 200
-draft: false
toc: true
-aliases: []
---
You can create and deploy a Hugo web application to Azure Static Web Apps. The final result is a new Azure Static Web App with associated GitHub Actions that give you control over how the app is built and published. You'll learn how to create a Hugo app, set up an Azure Static Web App and deploy the Hugo app to Azure.
diff --git a/content/en/hosting-and-deployment/hosting-on-azure.md b/content/en/hosting-and-deployment/hosting-on-azure.md
index fd48ac9ad..d5f3ba63b 100644
--- a/content/en/hosting-and-deployment/hosting-on-azure.md
+++ b/content/en/hosting-and-deployment/hosting-on-azure.md
@@ -1,18 +1,13 @@
---
title: Host on Azure Static Web Apps
-linktitle: Host on Azure Static Web Apps
description: Deploy Hugo to Azure Static Web Apps and automate the whole process with Github Action Workflow
-date: 2021-03-12
-publishdate: 2021-03-12
categories: [hosting and deployment]
keywords: [azure,git,deployment,hosting]
-authors: [Aaron Powell]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 10
weight: 10
-sections_weight: 10
toc: true
---
diff --git a/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md b/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md
index f001d8662..5ae035567 100644
--- a/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md
+++ b/content/en/hosting-and-deployment/hosting-on-cloudflare-pages.md
@@ -1,16 +1,12 @@
---
title: Host on Cloudflare Pages
-linktitle: Host on Cloudflare Pages
description: Cloudflare Pages can host your Hugo site with CDN, continuous deployment, 1-click HTTPS, an admin GUI, and its own environment variables.
-date: 2022-04-07
-publishdate: 2022-04-07
categories: [hosting and deployment]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 50
weight: 50
-sections_weight: 50
toc: true
---
diff --git a/content/en/hosting-and-deployment/hosting-on-firebase.md b/content/en/hosting-and-deployment/hosting-on-firebase.md
index 4e31f1cd0..aab97f69f 100644
--- a/content/en/hosting-and-deployment/hosting-on-firebase.md
+++ b/content/en/hosting-and-deployment/hosting-on-firebase.md
@@ -1,20 +1,14 @@
---
title: Host on Firebase
-linktitle: Host on Firebase
description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NOSQL API.
-date: 2017-03-12
-publishdate: 2017-03-12
categories: [hosting and deployment]
keywords: [hosting,firebase]
-authors: [Michel Racic]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 20
weight: 20
-sections_weight: 20
toc: true
-aliases: []
---
## Assumptions
diff --git a/content/en/hosting-and-deployment/hosting-on-github/index.md b/content/en/hosting-and-deployment/hosting-on-github/index.md
index fb28922f1..e5cbe1922 100644
--- a/content/en/hosting-and-deployment/hosting-on-github/index.md
+++ b/content/en/hosting-and-deployment/hosting-on-github/index.md
@@ -1,12 +1,11 @@
---
title: Host on GitHub
-linktitle: Host on GitHub
description: Deploy Hugo as a GitHub Pages project or personal/organizational site and automate the whole process with Github Actions
categories: [hosting and deployment]
keywords: [github,git,deployment,hosting]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 30
weight: 30
toc: true
diff --git a/content/en/hosting-and-deployment/hosting-on-gitlab.md b/content/en/hosting-and-deployment/hosting-on-gitlab.md
index 6eb816171..1e43e5975 100644
--- a/content/en/hosting-and-deployment/hosting-on-gitlab.md
+++ b/content/en/hosting-and-deployment/hosting-on-gitlab.md
@@ -1,22 +1,14 @@
---
title: Host on GitLab
-linktitle: Host on GitLab
description: GitLab makes it easy to build, deploy, and host your Hugo website via their free GitLab Pages service, which provides native support for Hugo.
-date: 2016-06-23
-publishdate: 2016-06-23
-lastmod: 2017-11-16
categories: [hosting and deployment]
keywords: [hosting,deployment,git,gitlab]
-authors: [Riku-Pekka Silvola]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 40
weight: 40
-sections_weight: 40
-draft: false
toc: true
-wip: false
aliases: [/tutorials/hosting-on-gitlab/]
---
diff --git a/content/en/hosting-and-deployment/hosting-on-keycdn.md b/content/en/hosting-and-deployment/hosting-on-keycdn.md
index 85a5ab5f4..1d6c3e28d 100644
--- a/content/en/hosting-and-deployment/hosting-on-keycdn.md
+++ b/content/en/hosting-and-deployment/hosting-on-keycdn.md
@@ -1,16 +1,12 @@
---
title: "Host on KeyCDN"
-date: 2017-09-12
description: "Accelerate your Hugo site globally with a KeyCDN integration. This tutorial shows you how to set up your static site as a GitLab page behind a KeyCDN pull zone."
categories: [hosting and deployment]
keywords: [keycdn,hosting,deployment,cdn]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 40
-slug: ""
-aliases: []
-toc: false
---
[KeyCDN](https://www.keycdn.com/) provides a multitude of features to help accelerate and secure your Hugo site globally including Brotli compression, Let's Encrypt support, Origin Shield, and more.
diff --git a/content/en/hosting-and-deployment/hosting-on-netlify.md b/content/en/hosting-and-deployment/hosting-on-netlify.md
index ac9777a3a..bba9d445f 100644
--- a/content/en/hosting-and-deployment/hosting-on-netlify.md
+++ b/content/en/hosting-and-deployment/hosting-on-netlify.md
@@ -1,19 +1,13 @@
---
title: Host on Netlify
-linktitle: Host on Netlify
description: Netlify can host your Hugo site with CDN, continuous deployment, 1-click HTTPS, an admin GUI, and its own CLI.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [hosting and deployment]
keywords: [netlify,hosting,deployment]
-authors: [Ryan Watters, Seth MacLeod]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 10
weight: 10
-sections_weight: 10
-aliases: []
toc: true
---
diff --git a/content/en/hosting-and-deployment/hosting-on-render.md b/content/en/hosting-and-deployment/hosting-on-render.md
index f099f2168..c7ce18817 100644
--- a/content/en/hosting-and-deployment/hosting-on-render.md
+++ b/content/en/hosting-and-deployment/hosting-on-render.md
@@ -1,20 +1,13 @@
---
title: Host on Render
-linktitle: Host on Render
description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
-date: 2019-06-06
-publishdate: 2019-06-06
categories: [hosting and deployment]
keywords: [hosting,deployment]
-authors: [Anurag Goel]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 10
weight: 10
-sections_weight: 10
-draft: false
-aliases: []
toc: true
---
diff --git a/content/en/hosting-and-deployment/hugo-deploy.md b/content/en/hosting-and-deployment/hugo-deploy.md
index 02a23fe12..e0c98de2a 100644
--- a/content/en/hosting-and-deployment/hugo-deploy.md
+++ b/content/en/hosting-and-deployment/hugo-deploy.md
@@ -1,21 +1,13 @@
---
title: Hugo Deploy
-linktitle: Hugo Deploy
description: You can upload your site to GCS, S3, or Azure using the Hugo CLI.
-date: 2019-05-30
-publishdate: 2019-05-30
-lastmod: 2021-05-03
categories: [hosting and deployment]
keywords: [s3,gcs,azure,hosting,deployment]
-authors: [Robert van Gent]
menu:
docs:
- parent: "hosting-and-deployment"
+ parent: hosting-and-deployment
weight: 2
weight: 2
-sections_weight: 2
-draft: false
-aliases: []
toc: true
---
diff --git a/content/en/hugo-modules/_index.md b/content/en/hugo-modules/_index.md
index b2951da9a..76f21d43f 100644
--- a/content/en/hugo-modules/_index.md
+++ b/content/en/hugo-modules/_index.md
@@ -2,17 +2,13 @@
title: Hugo Modules
linktitle: Hugo Modules Overview
description: How to use Hugo Modules.
-date: 2017-02-01
-publishdate: 2017-02-01
menu:
docs:
- parent: "modules"
+ parent: modules
weight: 01
weight: 01
-sections_weight: 01
categories: [hugo modules]
keywords: [themes,modules]
-draft: false
aliases: [/themes/overview/,/themes/]
toc: true
---
diff --git a/content/en/hugo-modules/configuration.md b/content/en/hugo-modules/configuration.md
index 5b19d2419..df957bf2f 100644
--- a/content/en/hugo-modules/configuration.md
+++ b/content/en/hugo-modules/configuration.md
@@ -1,16 +1,13 @@
---
title: Configure Modules
-linktitle: Configure Modules
description: This page describes the configuration options for a module.
-date: 2019-07-24
categories: [hugo modules]
keywords: [themes, source, organization, directories]
menu:
docs:
- parent: "modules"
+ parent: modules
weight: 10
weight: 10
-sections_weight: 10
toc: true
---
diff --git a/content/en/hugo-modules/theme-components.md b/content/en/hugo-modules/theme-components.md
index 5b01e98e9..10aa1277f 100644
--- a/content/en/hugo-modules/theme-components.md
+++ b/content/en/hugo-modules/theme-components.md
@@ -1,17 +1,13 @@
---
title: Theme Components
-linktitle: Theme Components
description: Hugo provides advanced theming support with Theme Components.
-date: 2017-02-01
categories: [hugo modules]
keywords: [themes, theme, source, organization, directories]
menu:
docs:
- parent: "modules"
+ parent: modules
weight: 50
weight: 50
-sections_weight: 50
-draft: false
aliases: [/themes/customize/,/themes/customizing/]
toc: true
---
diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md
index 977a52bd6..99c1229b5 100644
--- a/content/en/hugo-modules/use-modules.md
+++ b/content/en/hugo-modules/use-modules.md
@@ -1,17 +1,13 @@
---
title: Use Hugo Modules
-linktitle: Use Hugo Modules
description: How to use Hugo Modules to build and manage your site.
-date: 2019-07-24
categories: [hugo modules]
keywords: [install, themes, source, organization, directories,usage,modules]
menu:
docs:
- parent: "modules"
+ parent: modules
weight: 20
weight: 20
-sections_weight: 20
-draft: false
aliases: [/themes/usage/,/themes/installing/,/installing-and-using-themes/]
toc: true
---
@@ -164,4 +160,3 @@ HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
```
The `--ignoreVendorPaths` flag is added above to ignore any of the vendored dependencies inside `_vendor`. If you don't use vendoring, you don't need that flag. But now the server is set up watching the files and directories in the workspace and you can see your local edits reloaded.
-
diff --git a/content/en/hugo-pipes/_index.md b/content/en/hugo-pipes/_index.md
index 078e1f186..438ee2fe0 100755
--- a/content/en/hugo-pipes/_index.md
+++ b/content/en/hugo-pipes/_index.md
@@ -1,13 +1,10 @@
---
title: Hugo Pipes Overview
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 10
weight: 10
-sections_weight: 10
----
\ No newline at end of file
+---
diff --git a/content/en/hugo-pipes/babel.md b/content/en/hugo-pipes/babel.md
index 5dab9f1c6..1762f85e5 100755
--- a/content/en/hugo-pipes/babel.md
+++ b/content/en/hugo-pipes/babel.md
@@ -1,16 +1,13 @@
---
title: Babel
description: Hugo Pipes can process JS files with Babel.
-date: 2019-03-21
-publishdate: 2019-03-21
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 48
weight: 48
-sections_weight: 48
signature: ["resources.Babel RESOURCE [OPTIONS]", "babel RESOURCE [OPTIONS]"]
---
diff --git a/content/en/hugo-pipes/bundling.md b/content/en/hugo-pipes/bundling.md
index 8eeeeb8e7..ae625537a 100755
--- a/content/en/hugo-pipes/bundling.md
+++ b/content/en/hugo-pipes/bundling.md
@@ -2,17 +2,13 @@
title: Concat
linkTitle: Concatenating assets
description: Bundle any number of assets into one resource.
-date: 2018-07-14
-publishdate: 2018-07-14
-lastmod: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 60
weight: 60
-sections_weight: 60
signature: ["resources.Concat TARGET_PATH SLICE_RESOURCES"]
---
diff --git a/content/en/hugo-pipes/fingerprint.md b/content/en/hugo-pipes/fingerprint.md
index 71f0b914f..d002dd3e2 100755
--- a/content/en/hugo-pipes/fingerprint.md
+++ b/content/en/hugo-pipes/fingerprint.md
@@ -2,16 +2,13 @@
title: Fingerprint
linkTitle: Fingerprinting and SRI
description: Process a given resource, adding a hash string of the resource's content.
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 70
weight: 70
-sections_weight: 70
signature: ["resources.Fingerprint RESOURCE [ALGORITHM]", "fingerprint RESOURCE [ALGORITHM]"]
---
diff --git a/content/en/hugo-pipes/introduction.md b/content/en/hugo-pipes/introduction.md
index 879565358..b213f2e38 100755
--- a/content/en/hugo-pipes/introduction.md
+++ b/content/en/hugo-pipes/introduction.md
@@ -2,17 +2,13 @@
title: Hugo Pipes Introduction
linkTitle: Hugo Pipes
description: Hugo Pipes is Hugo's asset processing set of functions.
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 20
weight: 01
-sections_weight: 01
-draft: false
toc: true
aliases: [/assets/]
---
diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md
index 097c17b0f..c880ac6fa 100644
--- a/content/en/hugo-pipes/js.md
+++ b/content/en/hugo-pipes/js.md
@@ -2,16 +2,13 @@
title: js.Build
linkTitle: JavaScript Building
description: Process a JavaScript file with [ESBuild](https://github.com/evanw/esbuild).
-date: 2020-07-20
-publishdate: 2020-07-20
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 45
weight: 45
-sections_weight: 45
signature: ["js.Build RESOURCE [OPTIONS]"]
---
diff --git a/content/en/hugo-pipes/minification.md b/content/en/hugo-pipes/minification.md
index 2453152e8..100bd3353 100755
--- a/content/en/hugo-pipes/minification.md
+++ b/content/en/hugo-pipes/minification.md
@@ -2,16 +2,13 @@
title: Minify
linkTitle: Asset minification
description: Minifies a given resource.
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 50
weight: 50
-sections_weight: 50
signature: ["resources.Minify RESOURCE", "minify RESOURCE"]
---
diff --git a/content/en/hugo-pipes/postcss.md b/content/en/hugo-pipes/postcss.md
index 030481bd9..0804c1072 100755
--- a/content/en/hugo-pipes/postcss.md
+++ b/content/en/hugo-pipes/postcss.md
@@ -5,7 +5,7 @@ categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 40
toc: true
weight: 40
diff --git a/content/en/hugo-pipes/postprocess.md b/content/en/hugo-pipes/postprocess.md
index 4098f3e16..8d26ec06a 100755
--- a/content/en/hugo-pipes/postprocess.md
+++ b/content/en/hugo-pipes/postprocess.md
@@ -1,15 +1,13 @@
---
title: PostProcess
description: Allows delaying of resource transformations to after the build.
-date: 2020-04-09
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 39
weight: 39
-sections_weight: 39
signature: ["resources.PostProcess RESOURCE"]
---
@@ -97,4 +95,3 @@ These will get environment variables named on the form `HUGO_FILE_:filename:` wh
```js
let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.config.js';
```
-
diff --git a/content/en/hugo-pipes/resource-from-string.md b/content/en/hugo-pipes/resource-from-string.md
index 43e890597..221898dba 100755
--- a/content/en/hugo-pipes/resource-from-string.md
+++ b/content/en/hugo-pipes/resource-from-string.md
@@ -2,16 +2,13 @@
title: FromString
linkTitle: Resource from String
description: Creates a resource from a string.
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 90
weight: 90
-sections_weight: 90
signature: ["resources.FromString TARGET_PATH CONTENT"]
---
diff --git a/content/en/hugo-pipes/resource-from-template.md b/content/en/hugo-pipes/resource-from-template.md
index 5d690779f..778eb0341 100755
--- a/content/en/hugo-pipes/resource-from-template.md
+++ b/content/en/hugo-pipes/resource-from-template.md
@@ -2,16 +2,13 @@
title: ExecuteAsTemplate
linkTitle: Resource from Template
description: Creates a resource from a template
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 80
weight: 80
-sections_weight: 80
signature: ["resources.ExecuteAsTemplate TARGET_PATH CONTEXT RESOURCE"]
---
diff --git a/content/en/hugo-pipes/transform-to-css.md b/content/en/hugo-pipes/transform-to-css.md
index 4fd804b2b..9af649acb 100644
--- a/content/en/hugo-pipes/transform-to-css.md
+++ b/content/en/hugo-pipes/transform-to-css.md
@@ -2,16 +2,13 @@
title: ToCSS
linkTitle: Transpile Sass to SCSS
description: Transpile Sass to CSS.
-date: 2018-07-14
-publishdate: 2018-07-14
categories: [asset management]
keywords: []
menu:
docs:
- parent: "pipes"
+ parent: pipes
weight: 30
weight: 02
-sections_weight: 02
signature: ["resources.ToCSS RESOURCE [OPTIONS]", "toCSS RESOURCE [OPTIONS]"]
---
diff --git a/content/en/installation/_index.md b/content/en/installation/_index.md
index e5a34b1f2..3a7713dd5 100644
--- a/content/en/installation/_index.md
+++ b/content/en/installation/_index.md
@@ -9,7 +9,6 @@ menu:
docs:
parent: installation
weight: 10
-toc: false
---
{{% param "description" %}}
diff --git a/content/en/installation/bsd.md b/content/en/installation/bsd.md
index 2728e91cb..5fbc4bfad 100644
--- a/content/en/installation/bsd.md
+++ b/content/en/installation/bsd.md
@@ -1,6 +1,5 @@
---
title: BSD
-linkTitle: BSD
description: Install Hugo on BSD derivatives.
categories: [installation]
menu:
diff --git a/content/en/installation/linux.md b/content/en/installation/linux.md
index 03ffe9430..fa08ed9ce 100644
--- a/content/en/installation/linux.md
+++ b/content/en/installation/linux.md
@@ -1,6 +1,5 @@
---
title: Linux
-linkTitle: Linux
description: Install Hugo on Linux.
categories: [installation]
menu:
diff --git a/content/en/installation/macos.md b/content/en/installation/macos.md
index c614f39ba..9d10642de 100644
--- a/content/en/installation/macos.md
+++ b/content/en/installation/macos.md
@@ -1,6 +1,5 @@
---
title: macOS
-linkTitle: macOS
description: Install Hugo on macOS.
categories: [installation]
menu:
diff --git a/content/en/installation/windows.md b/content/en/installation/windows.md
index 2b4615235..9959f590a 100644
--- a/content/en/installation/windows.md
+++ b/content/en/installation/windows.md
@@ -1,6 +1,5 @@
---
title: Windows
-linkTitle: Windows
description: Install Hugo on Windows.
categories: [installation]
menu:
diff --git a/content/en/maintenance/_index.md b/content/en/maintenance/_index.md
index 691a5d47c..fd8828bb2 100644
--- a/content/en/maintenance/_index.md
+++ b/content/en/maintenance/_index.md
@@ -1,14 +1,10 @@
---
title: Maintenance
description: Some lists useful for the maintenance of the Hugo docs site.
-date: 2018-02-09
categories: [maintenance]
keywords: [maintenance]
menu:
docs:
weight: 200
-slug:
-aliases: []
toc: true
---
-
diff --git a/content/en/news/0.17-relnotes/index.md b/content/en/news/0.17-relnotes/index.md
index 034e8e891..d2f9068a9 100644
--- a/content/en/news/0.17-relnotes/index.md
+++ b/content/en/news/0.17-relnotes/index.md
@@ -1,11 +1,9 @@
---
-author: bep
categories: ["Releases"]
date: 2016-10-07T13:54:06-04:00
description: "Hugo now supports multilingual sites with the most simple and elegant experience."
link: ""
title: "0.17: Hugo is going global"
-draft: false
aliases: [/0-17/]
---
Hugo is going global with our 0.17 release. We put a lot of thought into how we could extend Hugo
diff --git a/content/en/news/0.18-relnotes/index.md b/content/en/news/0.18-relnotes/index.md
index 5aaab9ffe..3720c7929 100644
--- a/content/en/news/0.18-relnotes/index.md
+++ b/content/en/news/0.18-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "The primary new feature in Hugo 0.18 is that every piece of content is now a Page."
link: ""
title: "Hugo 0.18"
-draft: false
-author: bep
aliases: [/0-18/]
---
diff --git a/content/en/news/0.19-relnotes/index.md b/content/en/news/0.19-relnotes/index.md
index 073b47495..7068020b8 100644
--- a/content/en/news/0.19-relnotes/index.md
+++ b/content/en/news/0.19-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.19 brings native Emacs Org-mode content support, and Hugo has its own Twitter account"
link: ""
title: "Hugo 0.19"
-draft: false
-author: budparr
aliases: [/0-19/]
---
diff --git a/content/en/news/0.20-relnotes/index.md b/content/en/news/0.20-relnotes/index.md
index 2f598a33f..239230d6b 100644
--- a/content/en/news/0.20-relnotes/index.md
+++ b/content/en/news/0.20-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.20 introduces the powerful and long sought after feature Custom Output Formats"
link: ""
title: "Hugo 0.20"
-draft: false
-author: bep
aliases: [/0-20/]
---
diff --git a/content/en/news/0.20.1-relnotes/index.md b/content/en/news/0.20.1-relnotes/index.md
index 563f2e031..9e1a96373 100644
--- a/content/en/news/0.20.1-relnotes/index.md
+++ b/content/en/news/0.20.1-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.20.1 is a bug fix release, fixing some important regressions introduced in 0.20"
link: ""
title: "Hugo 0.20.1"
-draft: false
-author: bep
aliases: [/0-20-1/]
---
diff --git a/content/en/news/0.20.2-relnotes/index.md b/content/en/news/0.20.2-relnotes/index.md
index 214fe01a5..584a0f788 100644
--- a/content/en/news/0.20.2-relnotes/index.md
+++ b/content/en/news/0.20.2-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.20.2 adds support for plain text partials included into HTML templates"
link: ""
title: "Hugo 0.20.2"
-draft: false
-author: bep
aliases: [/0-20-2/]
---
diff --git a/content/en/news/0.20.3-relnotes/index.md b/content/en/news/0.20.3-relnotes/index.md
index c79d9b202..77a3511f2 100644
--- a/content/en/news/0.20.3-relnotes/index.md
+++ b/content/en/news/0.20.3-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "This is a bug-fix release with one important fix. But it also adds some harness around GoReleaser"
link: ""
title: "Hugo 0.20.3"
-draft: false
-author: bep
aliases: [/0-20-3/]
---
@@ -23,4 +21,4 @@ Hugo now has:
## Fix
-* Fix handling of zero-length files [9bf5c381](https://github.com/gohugoio/hugo/commit/9bf5c381b6b3e69d4d8dbfd7a40074ac44792bbf) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355)
\ No newline at end of file
+* Fix handling of zero-length files [9bf5c381](https://github.com/gohugoio/hugo/commit/9bf5c381b6b3e69d4d8dbfd7a40074ac44792bbf) [@bep](https://github.com/bep) [#3355](https://github.com/gohugoio/hugo/issues/3355)
diff --git a/content/en/news/0.20.4-relnotes/index.md b/content/en/news/0.20.4-relnotes/index.md
index 2fde30e14..59903b816 100644
--- a/content/en/news/0.20.4-relnotes/index.md
+++ b/content/en/news/0.20.4-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "This is the second bug-fix release of the day, fixing a couple of issues related to the new release scripts"
link: ""
title: "Hugo 0.20.4"
-draft: false
-author: bep
aliases: [/0-20-4/]
---
@@ -21,4 +19,4 @@ Hugo now has:
* Fix statically linked binaries [275bcf56](https://github.com/gohugoio/hugo/commit/275bcf566c7cb72367d4423cf4810319311ff680) [@munnerz](https://github.com/munnerz) [#3382](https://github.com/gohugoio/hugo/issues/3382)
* Filename change in Hugo 0.20.3 binaries [#3385](https://github.com/gohugoio/hugo/issues/3385)
-* Fix version calculation [cb3c6b6f](https://github.com/gohugoio/hugo/commit/cb3c6b6f7670f85189a4a3637e7132901d1ed6e9) [@bep](https://github.com/bep)
\ No newline at end of file
+* Fix version calculation [cb3c6b6f](https://github.com/gohugoio/hugo/commit/cb3c6b6f7670f85189a4a3637e7132901d1ed6e9) [@bep](https://github.com/bep)
diff --git a/content/en/news/0.20.5-relnotes/index.md b/content/en/news/0.20.5-relnotes/index.md
index eaed27832..86a260161 100644
--- a/content/en/news/0.20.5-relnotes/index.md
+++ b/content/en/news/0.20.5-relnotes/index.md
@@ -4,9 +4,7 @@ categories: ["Releases"]
description: ""
link: ""
title: "Hugo 0.20.5"
-draft: false
-author: bep
aliases: [/0-20-5/]
---
-This is a bug-fix release which fixes the version number of `0.20.4` (which wrongly shows up as `0.21-DEV`) ([#3388](https://github.com/gohugoio/hugo/issues/3388)).
\ No newline at end of file
+This is a bug-fix release which fixes the version number of `0.20.4` (which wrongly shows up as `0.21-DEV`) ([#3388](https://github.com/gohugoio/hugo/issues/3388)).
diff --git a/content/en/news/0.20.6-relnotes/index.md b/content/en/news/0.20.6-relnotes/index.md
index 52189092a..848eb1347 100644
--- a/content/en/news/0.20.6-relnotes/index.md
+++ b/content/en/news/0.20.6-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: ""
link: ""
title: "Hugo 0.20.6"
-draft: false
-author: bep
aliases: [/0-20-6/]
---
@@ -21,4 +19,4 @@ Hugo now has:
* Avoid index.md in /index/index.html [#3396](https://github.com/gohugoio/hugo/issues/3396)
* Make missing GitInfo a WARNING [b30ca4be](https://github.com/gohugoio/hugo/commit/b30ca4bec811dbc17e9fd05925544db2b75e0e49) [@bep](https://github.com/bep) [#3376](https://github.com/gohugoio/hugo/issues/3376)
-* Fix some of the fpm fields for deb [3bd1d057](https://github.com/gohugoio/hugo/commit/3bd1d0571d5f2f6bf0dc8f90a8adf2dbfcb2fdfd) [@anthonyfok](https://github.com/anthonyfok)
\ No newline at end of file
+* Fix some of the fpm fields for deb [3bd1d057](https://github.com/gohugoio/hugo/commit/3bd1d0571d5f2f6bf0dc8f90a8adf2dbfcb2fdfd) [@anthonyfok](https://github.com/anthonyfok)
diff --git a/content/en/news/0.20.7-relnotes/index.md b/content/en/news/0.20.7-relnotes/index.md
index 50ac365d5..ff6460234 100644
--- a/content/en/news/0.20.7-relnotes/index.md
+++ b/content/en/news/0.20.7-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "This just fixes an issue with the release scripts, no change in the binaries"
link: ""
title: "Hugo 0.20.7"
-draft: false
-author: bep
aliases: [/0-20-7/]
---
@@ -20,4 +18,4 @@ Hugo now has:
## Fix
-* Push the tag before goreleaser is run [3682bf52](https://github.com/gohugoio/hugo/commit/3682bf527989e86d9da32d76809306cb576383e8) [@bep](https://github.com/bep) [#3405](https://github.com/gohugoio/hugo/issues/3405)
\ No newline at end of file
+* Push the tag before goreleaser is run [3682bf52](https://github.com/gohugoio/hugo/commit/3682bf527989e86d9da32d76809306cb576383e8) [@bep](https://github.com/bep) [#3405](https://github.com/gohugoio/hugo/issues/3405)
diff --git a/content/en/news/0.21-relnotes/index.md b/content/en/news/0.21-relnotes/index.md
index aae1fd0b4..444b819cb 100644
--- a/content/en/news/0.21-relnotes/index.md
+++ b/content/en/news/0.21-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.21 brings full support for shortcodes per Output Format, the last vital piece of that puzzle"
link: ""
title: "Hugo 0.21"
-draft: false
-author: bep
aliases: [/0-21/]
---
@@ -102,4 +100,4 @@ On a more technical side, [@moorereason](https://github.com/moorereason) and [@b
### Other
* Fix data race in live-reload close, avoiding some rare panics [355736ec](https://github.com/gohugoio/hugo/commit/355736ec357c81dfb2eb6851ee019d407090c5ec) [@bep](https://github.com/bep) [#2625](https://github.com/gohugoio/hugo/issues/2625)
-* Skip `.git` directories in file scan [94b5be67](https://github.com/gohugoio/hugo/commit/94b5be67fc73b87d114d94a7bb1a33ab997f30f1) [@bogem](https://github.com/bogem) [#3468](https://github.com/gohugoio/hugo/issues/3468)
\ No newline at end of file
+* Skip `.git` directories in file scan [94b5be67](https://github.com/gohugoio/hugo/commit/94b5be67fc73b87d114d94a7bb1a33ab997f30f1) [@bogem](https://github.com/bogem) [#3468](https://github.com/gohugoio/hugo/issues/3468)
diff --git a/content/en/news/0.22-relnotes/index.md b/content/en/news/0.22-relnotes/index.md
index fefb501f6..db8d5de85 100644
--- a/content/en/news/0.22-relnotes/index.md
+++ b/content/en/news/0.22-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.22 brings nested sections, by popular demand and a long sought after feature"
link: ""
title: "Hugo 0.22"
-draft: false
-author: bep
aliases: [/0-22/]
---
@@ -86,4 +84,4 @@ Also, considerable work has been put into writing automated benchmark tests for
### Docs
-* Fix parameter name in `YouTube` shortcode section [37e37877](https://github.com/gohugoio/hugo/commit/37e378773fbc127863f2b7a389d5ce3a14674c73) [@zivbk1](https://github.com/zivbk1)
\ No newline at end of file
+* Fix parameter name in `YouTube` shortcode section [37e37877](https://github.com/gohugoio/hugo/commit/37e378773fbc127863f2b7a389d5ce3a14674c73) [@zivbk1](https://github.com/zivbk1)
diff --git a/content/en/news/0.22.1-relnotes/index.md b/content/en/news/0.22.1-relnotes/index.md
index ceb207d70..3b076fd0b 100644
--- a/content/en/news/0.22.1-relnotes/index.md
+++ b/content/en/news/0.22.1-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.22.1 fixes a couple of issues reported after the 0.22 release"
link: ""
title: "Hugo 0.22.1"
-draft: false
-author: bep
aliases: [/0-22-1/]
---
@@ -34,4 +32,4 @@ blog = ":sections/:title"
* Support sub-sections in permalink settings [1f26420d](https://github.com/gohugoio/hugo/commit/1f26420d392a5ab4c7b7fe1911c0268b45d01ab8) [@bep](https://github.com/bep) [#3580](https://github.com/gohugoio/hugo/issues/3580)
* Adjust rlimit to 64000 [ff54b6bd](https://github.com/gohugoio/hugo/commit/ff54b6bddcefab45339d8dc2b13776b92bdc04b9) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
* Make error on setting rlimit a warning only [629e1439](https://github.com/gohugoio/hugo/commit/629e1439e819a7118ae483381d4634f16d3474dd) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
-* Revert: Remove the rlimit tweaking on macOS [26aa06a3](https://github.com/gohugoio/hugo/commit/26aa06a3db57ab7134a900d641fa2976f7971520) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
\ No newline at end of file
+* Revert: Remove the rlimit tweaking on macOS [26aa06a3](https://github.com/gohugoio/hugo/commit/26aa06a3db57ab7134a900d641fa2976f7971520) [@bep](https://github.com/bep) [#3582](https://github.com/gohugoio/hugo/issues/3582)
diff --git a/content/en/news/0.23-relnotes/index.md b/content/en/news/0.23-relnotes/index.md
index fdf6e9e73..e0e500d38 100644
--- a/content/en/news/0.23-relnotes/index.md
+++ b/content/en/news/0.23-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.23 is mainly a release that handles all the small changes needed to get Hugo moved to a GitHub organisation"
link: ""
title: "Hugo 0.23"
-draft: false
-author: bep
aliases: [/0-23/]
---
@@ -43,4 +41,4 @@ Hugo now has:
* Update README to point to gohugoio/hugo [93643860](https://github.com/gohugoio/hugo/commit/93643860c9db10c6c32176b17cc83f1c317279bd) [@bep](https://github.com/bep)
* Update examples to point to gohugoio/hugo [db46bcf8](https://github.com/gohugoio/hugo/commit/db46bcf82d060656d4bc731550e63ec9cf8576f2) [@bep](https://github.com/bep)
* Update textual references in Go source to point to gohugoio/hugo [c17ad675](https://github.com/gohugoio/hugo/commit/c17ad675e8fcdb2db40fc50816b8f016bc14294c) [@bep](https://github.com/bep)
-* Update import paths to gohugoio/hugo [d8717cd4](https://github.com/gohugoio/hugo/commit/d8717cd4c74e80ea8e20adead9321412a2d76022) [@bep](https://github.com/bep)
\ No newline at end of file
+* Update import paths to gohugoio/hugo [d8717cd4](https://github.com/gohugoio/hugo/commit/d8717cd4c74e80ea8e20adead9321412a2d76022) [@bep](https://github.com/bep)
diff --git a/content/en/news/0.24-relnotes/index.md b/content/en/news/0.24-relnotes/index.md
index ec71e246f..458b9dded 100644
--- a/content/en/news/0.24-relnotes/index.md
+++ b/content/en/news/0.24-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "The Revival of the Archetypes!"
link: ""
title: "Hugo 0.24"
-draft: false
-author: bep
aliases: [/0-24/]
---
@@ -71,4 +69,4 @@ Hugo now has:
## Fixes
* Fix error handling for `JSON` front matter [fb53987a](https://github.com/gohugoio/hugo/commit/fb53987a4ff2acb9da8dec6ec7b11924d37352ce) [@bep](https://github.com/bep) [#3610](https://github.com/gohugoio/hugo/issues/3610)
-* Fix handling of quoted brackets in `JSON` front matter [3183b9a2](https://github.com/gohugoio/hugo/commit/3183b9a29d8adac962fbc73f79b04542f4c4c55d) [@bep](https://github.com/bep) [#3511](https://github.com/gohugoio/hugo/issues/3511)
\ No newline at end of file
+* Fix handling of quoted brackets in `JSON` front matter [3183b9a2](https://github.com/gohugoio/hugo/commit/3183b9a29d8adac962fbc73f79b04542f4c4c55d) [@bep](https://github.com/bep) [#3511](https://github.com/gohugoio/hugo/issues/3511)
diff --git a/content/en/news/0.24.1-relnotes/index.md b/content/en/news/0.24.1-relnotes/index.md
index 2ec2cef55..19e69ce0a 100644
--- a/content/en/news/0.24.1-relnotes/index.md
+++ b/content/en/news/0.24.1-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "This release fixes some important archetype-related regressions from Hugo 0.24"
link: ""
title: "Hugo 0.24.1"
-draft: false
-author: bep
aliases: [/0-24-1/]
---
@@ -19,4 +17,4 @@ This release fixes some important **archetype-related regressions** from the rec
## Enhancements
-* Create default archetype on new site [bfa336d9](https://github.com/gohugoio/hugo/commit/bfa336d96173377b9bbe2298dbd101f6a718c174) [@bep](https://github.com/bep) [#3626](https://github.com/gohugoio/hugo/issues/3626)
\ No newline at end of file
+* Create default archetype on new site [bfa336d9](https://github.com/gohugoio/hugo/commit/bfa336d96173377b9bbe2298dbd101f6a718c174) [@bep](https://github.com/bep) [#3626](https://github.com/gohugoio/hugo/issues/3626)
diff --git a/content/en/news/0.25-relnotes/index.md b/content/en/news/0.25-relnotes/index.md
index 9527c911a..6ceef445d 100644
--- a/content/en/news/0.25-relnotes/index.md
+++ b/content/en/news/0.25-relnotes/index.md
@@ -4,8 +4,6 @@ categories: ["Releases"]
description: "Hugo 0.25 automatically opens the page you're working on in the browser"
link: ""
title: "Hugo 0.25"
-draft: false
-author: bep
aliases: [/0-25/]
---
@@ -75,4 +73,4 @@ Hugo now has:
### Other
* Fix handling of `JSON` front matter with escaped quotes [e10e51a0](https://github.com/gohugoio/hugo/commit/e10e51a00827b9fdc1bee51439fef05afc529831) [@bep](https://github.com/bep) [#3661](https://github.com/gohugoio/hugo/issues/3661)
-* Fix typo in code comment [56d82aa0](https://github.com/gohugoio/hugo/commit/56d82aa025f4d2edb1dc6315132cd7ab52df649a) [@dvic](https://github.com/dvic)
\ No newline at end of file
+* Fix typo in code comment [56d82aa0](https://github.com/gohugoio/hugo/commit/56d82aa025f4d2edb1dc6315132cd7ab52df649a) [@dvic](https://github.com/dvic)
diff --git a/content/en/news/0.25.1-relnotes/index.md b/content/en/news/0.25.1-relnotes/index.md
index 7d70d87a5..16f5892b7 100644
--- a/content/en/news/0.25.1-relnotes/index.md
+++ b/content/en/news/0.25.1-relnotes/index.md
@@ -1,11 +1,8 @@
---
-date: 2017-07-10T17:53:58-04:00
categories: ["Releases"]
description: "This is a bug-fix release with a couple of important fixes"
link: ""
title: "Hugo 0.25.1"
-draft: false
-author: bep
aliases: [/0-25-1/]
---
@@ -22,4 +19,4 @@ Hugo now has:
* Fix union when the first slice is empty [dbbc5c48](https://github.com/gohugoio/hugo/commit/dbbc5c4810a04ac06fad7500d88cf5c3bfe0c7fd) [@bep](https://github.com/bep) [#3686](https://github.com/gohugoio/hugo/issues/3686)
* Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE". [7bcc1ce6](https://github.com/gohugoio/hugo/commit/7bcc1ce659710f2220b400ce3b76e50d2e48b241) [@miltador](https://github.com/miltador)
* Final (!) fix for issue with escaped JSON front matter [7f82b41a](https://github.com/gohugoio/hugo/commit/7f82b41a24af0fd04d28fbfebf9254766a3c6e6f) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682)
-* Fix issue with escaped JSON front matter [84db6c74](https://github.com/gohugoio/hugo/commit/84db6c74a084d2b52117b999d4ec343cd3389a68) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682)
\ No newline at end of file
+* Fix issue with escaped JSON front matter [84db6c74](https://github.com/gohugoio/hugo/commit/84db6c74a084d2b52117b999d4ec343cd3389a68) [@bep](https://github.com/bep) [#3682](https://github.com/gohugoio/hugo/issues/3682)
diff --git a/content/en/news/lets-celebrate-hugos-5th-birthday/index.md b/content/en/news/lets-celebrate-hugos-5th-birthday/index.md
index 08e1fbabd..a54f01115 100644
--- a/content/en/news/lets-celebrate-hugos-5th-birthday/index.md
+++ b/content/en/news/lets-celebrate-hugos-5th-birthday/index.md
@@ -3,7 +3,6 @@ date: 2018-07-04
title: "Let’s celebrate Hugo’s 5th birthday"
description: "How a side project became one of the most popular frameworks for building websites."
categories: [blog]
-author: bep
---
_By Bjørn Erik Pedersen ([@bepsays](https://twitter.com/bepsays) / [@bep](https://github.com/bep)), Hugo Lead_
diff --git a/content/en/templates/404.md b/content/en/templates/404.md
index f0d2ecd9a..e1249b9b9 100644
--- a/content/en/templates/404.md
+++ b/content/en/templates/404.md
@@ -2,18 +2,13 @@
title: Custom 404 Page
linktitle: 404 Page
description: If you know how to create a single page template, you have unlimited options for creating a custom 404.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [templates]
keywords: [404, page not found]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 120
-weight: 120 #rem
-draft: false
-aliases: []
-toc: false
+weight: 120
---
When using Hugo with [GitHub Pages](https://pages.github.com/), you can provide your own template for a [custom 404 error page](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site) by creating a 404.html template file in the root of your `layouts` folder. When Hugo generates your site, the `404.html` file will be placed in the root.
diff --git a/content/en/templates/_index.md b/content/en/templates/_index.md
index 18ae40eac..aad680a76 100644
--- a/content/en/templates/_index.md
+++ b/content/en/templates/_index.md
@@ -2,18 +2,12 @@
title: Templates
linktitle: Templates Overview
description: Go templating, template types and lookup order, shortcodes, and data.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 01
-weight: 01 #rem
+weight: 01
categories: [templates]
keywords: []
-draft: false
aliases: [/templates/overview/,/templates/content]
-toc: false
-notesforauthors:
---
diff --git a/content/en/templates/base.md b/content/en/templates/base.md
index 6488b6b48..93f5110ef 100644
--- a/content/en/templates/base.md
+++ b/content/en/templates/base.md
@@ -1,18 +1,13 @@
---
title: Base Templates and Blocks
-linktitle:
description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [templates,fundamentals]
keywords: [blocks,base]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 20
weight: 20
-sections_weight: 20
-draft: false
aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
toc: true
---
diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md
index 8051e554d..8ecde7b88 100644
--- a/content/en/templates/data-templates.md
+++ b/content/en/templates/data-templates.md
@@ -1,17 +1,13 @@
---
title: Data Templates
-linktitle:
description: In addition to Hugo's built-in variables, you can specify your own custom data in templates or shortcodes that pull from both local and dynamic sources.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [templates]
keywords: [data,dynamic,csv,json,toml,yaml,xml]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 80
weight: 80
-sections_weight: 80
aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/]
toc: true
---
diff --git a/content/en/templates/files.md b/content/en/templates/files.md
index 697863c4c..2170f9a7e 100644
--- a/content/en/templates/files.md
+++ b/content/en/templates/files.md
@@ -1,19 +1,13 @@
---
title: Local File Templates
-linktitle: Local File Templates
description: Hugo's `readDir` and `readFile` functions make it easy to traverse your project's directory structure and write file contents to your templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [files,directories]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 110
weight: 110
-sections_weight: 110
-draft: false
aliases: [/extras/localfiles/,/templates/local-files/]
toc: true
---
diff --git a/content/en/templates/homepage.md b/content/en/templates/homepage.md
index b72889301..c55b758f6 100644
--- a/content/en/templates/homepage.md
+++ b/content/en/templates/homepage.md
@@ -2,18 +2,13 @@
title: Homepage Template
linktitle: Homepage Template
description: The homepage of a website is often formatted differently than the other pages. For this reason, Hugo makes it easy for you to define your new site's homepage as a unique template.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [homepage]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 30
weight: 30
-sections_weight: 30
-draft: false
aliases: [/layout/homepage/,/templates/homepage-template/]
toc: true
---
diff --git a/content/en/templates/internal.md b/content/en/templates/internal.md
index 05a6c862f..5cfd1fe11 100644
--- a/content/en/templates/internal.md
+++ b/content/en/templates/internal.md
@@ -1,22 +1,14 @@
---
title: Internal Templates
-linktitle: Internal Templates
description: Hugo ships with a group of boilerplate templates that cover the most common use cases for static websites.
-date: 2017-03-06
-publishdate: 2017-03-06
-lastmod: 2017-03-06
categories: [templates]
keywords: [internal, analytics,]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 168
weight: 168
-sections_weight: 168
-draft: false
-aliases: []
toc: true
-wip: true
---
diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md
index 682a9cce0..8b1ae8428 100644
--- a/content/en/templates/introduction.md
+++ b/content/en/templates/introduction.md
@@ -2,18 +2,13 @@
title: Introduction to Hugo Templating
linktitle: Templating
description: Hugo uses Go's `html/template` and `text/template` libraries as the basis for the templating.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2022-09-20
categories: [templates,fundamentals]
keywords: [go]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 10
weight: 10
-sections_weight: 10
-draft: false
aliases: [/layouts/introduction/,/layout/introduction/, /templates/go-templates/]
toc: true
---
diff --git a/content/en/templates/lists/index.md b/content/en/templates/lists/index.md
index c78555d39..d23477ac2 100644
--- a/content/en/templates/lists/index.md
+++ b/content/en/templates/lists/index.md
@@ -2,18 +2,13 @@
title: Lists of Content in Hugo
linktitle: List Templates
description: Lists have a specific meaning and usage in Hugo when it comes to rendering your site homepage, section page, taxonomy list, or taxonomy terms list.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [lists,sections,rss,taxonomies,terms]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 22
weight: 22
-sections_weight: 22
-draft: false
aliases: [/templates/list/,/layout/indexes/]
toc: true
---
diff --git a/content/en/templates/lookup-order.md b/content/en/templates/lookup-order.md
index edb03839e..431c32c52 100644
--- a/content/en/templates/lookup-order.md
+++ b/content/en/templates/lookup-order.md
@@ -2,21 +2,14 @@
title: Hugo's Lookup Order
linktitle: Template Lookup Order
description: Hugo searches for the layout to use for a given page in a well defined order, starting from the most specific.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-07-05
categories: [templates,fundamentals]
keywords: [templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 15
quicklinks:
weight: 15
-sections_weight: 15
-draft: false
-aliases: [/templates/lookup/]
-toc: true
---
## Hugo Layouts Lookup Rules
diff --git a/content/en/templates/menu-templates.md b/content/en/templates/menu-templates.md
index 9cb92459a..6dadbdcc0 100644
--- a/content/en/templates/menu-templates.md
+++ b/content/en/templates/menu-templates.md
@@ -1,12 +1,11 @@
---
title: Menu Templates
-linkTitle: Menu Templates
description: Use menu variables and methods in your templates to render a menu.
categories: [templates]
keywords: [lists,sections,menus]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 130
toc: true
weight: 130
diff --git a/content/en/templates/output-formats.md b/content/en/templates/output-formats.md
index 5f257d91a..f8448b097 100644
--- a/content/en/templates/output-formats.md
+++ b/content/en/templates/output-formats.md
@@ -1,19 +1,13 @@
---
title: Custom Output Formats
-linktitle: Custom Output Formats
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
-date: 2017-03-22
-publishdate: 2017-03-22
-lastmod: 2023-03-31
categories: [templates]
keywords: ["amp", "outputs", "rss"]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 18
weight: 18
-sections_weight: 18
-draft: false
aliases: [/templates/outputs/,/extras/output-formats/,/content-management/custom-outputs/]
toc: true
---
diff --git a/content/en/templates/pagination.md b/content/en/templates/pagination.md
index 32c130b72..445264f95 100644
--- a/content/en/templates/pagination.md
+++ b/content/en/templates/pagination.md
@@ -2,16 +2,13 @@
title: Pagination
linktitle: Pagination
description: Hugo supports pagination for your homepage, section pages, and taxonomies.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [templates]
keywords: [lists,sections,pagination]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 140
weight: 140
-sections_weight: 140
aliases: [/extras/pagination,/doc/pagination/]
toc: true
---
diff --git a/content/en/templates/partials.md b/content/en/templates/partials.md
index 85aa33a50..e03908f6c 100644
--- a/content/en/templates/partials.md
+++ b/content/en/templates/partials.md
@@ -1,19 +1,13 @@
---
title: Partial Templates
-linktitle: Partial Templates
description: Partials are smaller, context-aware components in your list and page templates that can be used economically to keep your templating DRY.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [lists,sections,partials]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 90
weight: 90
-sections_weight: 90
-draft: false
aliases: [/templates/partial/,/layout/chrome/,/extras/analytics/]
toc: true
---
diff --git a/content/en/templates/render-hooks.md b/content/en/templates/render-hooks.md
index a0534d20e..395cb9240 100644
--- a/content/en/templates/render-hooks.md
+++ b/content/en/templates/render-hooks.md
@@ -2,14 +2,12 @@
title: "Markdown Render Hooks"
linkTitle: "Render Hooks"
description: "Render Hooks allow custom templates to override markdown rendering functionality."
-date: 2017-03-11
categories: [templates]
keywords: [markdown]
toc: true
menu:
docs:
- title: "Markdown Render Hooks"
- parent: "templates"
+ parent: templates
weight: 20
---
diff --git a/content/en/templates/robots.md b/content/en/templates/robots.md
index 52a77314b..df935d31a 100644
--- a/content/en/templates/robots.md
+++ b/content/en/templates/robots.md
@@ -2,20 +2,14 @@
title: Robots.txt File
linktitle: Robots.txt
description: Hugo can generate a customized robots.txt in the same way as any other template.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [robots,search engines]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 165
weight: 165
-sections_weight: 165
-draft: false
aliases: [/extras/robots-txt/]
-toc: false
---
To generate a robots.txt file from a template, change the [site configuration][config]:
diff --git a/content/en/templates/rss.md b/content/en/templates/rss.md
index 28ccafa56..e1bd19e54 100644
--- a/content/en/templates/rss.md
+++ b/content/en/templates/rss.md
@@ -1,19 +1,13 @@
---
title: RSS Templates
-linktitle: RSS Templates
description: Hugo ships with its own RSS 2.0 template that requires almost no configuration, or you can create your own RSS templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
keywords: [rss, xml, templates]
categories: [templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 150
weight: 150
-sections_weight: 150
-draft: false
toc: true
---
diff --git a/content/en/templates/section-templates.md b/content/en/templates/section-templates.md
index 3ca732e4b..94f1df865 100644
--- a/content/en/templates/section-templates.md
+++ b/content/en/templates/section-templates.md
@@ -2,18 +2,13 @@
title: Section Page Templates
linktitle: Section Templates
description: Templates used for section pages are **lists** and therefore have all the variables and methods available to list pages.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [lists,sections,templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 40
weight: 40
-sections_weight: 40
-draft: false
aliases: [/templates/sections/]
toc: true
---
diff --git a/content/en/templates/shortcode-templates.md b/content/en/templates/shortcode-templates.md
index 6cfb6d460..8d2a09f5b 100644
--- a/content/en/templates/shortcode-templates.md
+++ b/content/en/templates/shortcode-templates.md
@@ -2,19 +2,13 @@
title: Create Your Own Shortcodes
linktitle: Shortcode Templates
description: You can extend Hugo's built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [shortcodes,templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 100
weight: 100
-sections_weight: 100
-draft: false
-aliases: []
toc: true
---
diff --git a/content/en/templates/single-page-templates.md b/content/en/templates/single-page-templates.md
index 9fac42c02..2a06d74db 100644
--- a/content/en/templates/single-page-templates.md
+++ b/content/en/templates/single-page-templates.md
@@ -1,19 +1,13 @@
---
title: Single Page Templates
-linktitle:
description: The primary view of content in Hugo is the single view. Hugo will render every Markdown file provided with a corresponding single template.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-06
categories: [templates]
keywords: [page, templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 60
weight: 60
-sections_weight: 60
-draft: false
aliases: [/layout/content/]
toc: true
---
diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md
index b9469e0fa..d0738a362 100644
--- a/content/en/templates/sitemap-template.md
+++ b/content/en/templates/sitemap-template.md
@@ -1,16 +1,13 @@
---
title: Sitemap Templates
description: Hugo provides built-in sitemap templates.
-date: 2017-02-01
categories: [templates]
keywords: [sitemap, xml, templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 160
weight: 160
-sections_weight: 160
-draft: false
aliases: [/layout/sitemap/,/templates/sitemap/]
toc: true
---
diff --git a/content/en/templates/taxonomy-templates.md b/content/en/templates/taxonomy-templates.md
index 0cf7ea729..6642a528b 100644
--- a/content/en/templates/taxonomy-templates.md
+++ b/content/en/templates/taxonomy-templates.md
@@ -1,19 +1,13 @@
---
title: Taxonomy Templates
-# linktitle:
description: Taxonomy templating includes taxonomy list pages, taxonomy terms pages, and using taxonomies in your single page templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [taxonomies,metadata,front matter,terms,templates]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 50
weight: 50
-sections_weight: 50
-draft: false
aliases: [/taxonomies/displaying/,/templates/terms/,/indexes/displaying/,/taxonomies/templates/,/indexes/ordering/, /templates/taxonomies/, /templates/taxonomy/]
toc: true
---
diff --git a/content/en/templates/template-debugging.md b/content/en/templates/template-debugging.md
index b8938890f..0f32fa732 100644
--- a/content/en/templates/template-debugging.md
+++ b/content/en/templates/template-debugging.md
@@ -1,18 +1,13 @@
---
title: Template Debugging
description: You can use Go templates' `printf` function to debug your Hugo templates. These snippets provide a quick and easy visualization of the variables available to you in different contexts.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [templates]
keywords: [debugging,troubleshooting]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 180
weight: 180
-sections_weight: 180
-aliases: []
-toc: false
---
Here are some snippets you can add to your template to answer some common questions.
diff --git a/content/en/templates/views.md b/content/en/templates/views.md
index 495f701bd..e7d681021 100644
--- a/content/en/templates/views.md
+++ b/content/en/templates/views.md
@@ -1,20 +1,13 @@
---
title: Content View Templates
-# linktitle: Content Views
description: Hugo can render alternative views of your content, which is especially useful in list and summary views.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [templates]
keywords: [views]
menu:
docs:
- parent: "templates"
+ parent: templates
weight: 70
weight: 70
-sections_weight: 70
-draft: false
-aliases: []
toc: true
---
diff --git a/content/en/tools/_index.md b/content/en/tools/_index.md
index 93a6debc5..b553dac9c 100644
--- a/content/en/tools/_index.md
+++ b/content/en/tools/_index.md
@@ -2,17 +2,13 @@
title: Developer Tools
linktitle: Developer Tools Overview
description: In addition to Hugo's powerful CLI, there is a large number of community-developed tool chains for Hugo developers.
-date: 2016-12-05
-publishdate: 2016-12-05
-lastmod: 2017-02-26
categories: [developer tools]
keywords: []
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 01
weight: 01
-sections_weight: 01
---
One of Hugo's greatest strengths is its passionate---and always evolving---developer community. With the exception of the `highlight` shortcode mentioned in [Syntax Highlighting][syntax], the tools and other projects featured in this section are offerings from both commercial services and open-source projects, many of which are developed by Hugo developers just like you.
diff --git a/content/en/tools/editors.md b/content/en/tools/editors.md
index ed67885fc..55ab47090 100644
--- a/content/en/tools/editors.md
+++ b/content/en/tools/editors.md
@@ -2,19 +2,13 @@
title: Editor Plug-ins for Hugo
linktitle: Editor Plug-ins
description: The Hugo community uses a wide range of preferred tools and has developed plug-ins for some of the most popular text editors to help automate parts of your workflow.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [developer tools]
keywords: [editor, plug-ins]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 50
weight: 50
-sections_weight: 50
-draft: false
-aliases: []
-toc: false
---
The Hugo community uses a wide range of preferred tools and has developed plug-ins for some of the most popular text editors to help automate parts of your workflow.
diff --git a/content/en/tools/frontends.md b/content/en/tools/frontends.md
index 7ad44df53..1bfaf0995 100644
--- a/content/en/tools/frontends.md
+++ b/content/en/tools/frontends.md
@@ -2,20 +2,13 @@
title: Frontend Interfaces with Hugo
linktitle: Frontends
description: Do you prefer a graphical user interface over a text editor? Give these frontends a try.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [developer tools]
keywords: [frontend, gui]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 40
weight: 40
-sections_weight: 40
-draft: false
-aliases: []
-toc: false
---
- [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
diff --git a/content/en/tools/migrations.md b/content/en/tools/migrations.md
index d6ca14ab5..06c722718 100644
--- a/content/en/tools/migrations.md
+++ b/content/en/tools/migrations.md
@@ -2,17 +2,12 @@
title: Migrate to Hugo
linktitle: Migrations
description: A list of community-developed tools for migrating from your existing static site generator or content management system to Hugo.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2022-03-26
keywords: [migrations, jekyll, wordpress, drupal, ghost, contentful]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 10
weight: 10
-sections_weight: 10
-draft: false
aliases: [/developer-tools/migrations/, /developer-tools/migrated/]
toc: true
---
diff --git a/content/en/tools/other.md b/content/en/tools/other.md
index ed7c530d0..3f8aeebbb 100644
--- a/content/en/tools/other.md
+++ b/content/en/tools/other.md
@@ -2,18 +2,13 @@
title: Other Hugo Community Projects
linktitle: Other Projects
description: Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [developer tools]
keywords: [frontend, gui]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 70
weight: 70
-sections_weight: 70
-aliases: []
-toc: false
---
And for all the other small things around Hugo:
diff --git a/content/en/tools/search.md b/content/en/tools/search.md
index 464aa9107..688012550 100644
--- a/content/en/tools/search.md
+++ b/content/en/tools/search.md
@@ -2,17 +2,11 @@
title: Search for your Hugo Website
linktitle: Search
description: See some of the open-source and commercial search options for your newly created Hugo website.
-date: 2017-02-01
-publishdate: 2017-02-01
-categories: [developer tools]
-keywords: [search,tools]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 60
weight: 60
-sections_weight: 60
-aliases: []
toc: true
---
diff --git a/content/en/tools/starter-kits.md b/content/en/tools/starter-kits.md
index 8399e99df..deaa3411c 100644
--- a/content/en/tools/starter-kits.md
+++ b/content/en/tools/starter-kits.md
@@ -1,20 +1,13 @@
---
title: Starter Kits
-linktitle: Starter Kits
description: A list of community-developed projects designed to help you get up and running with Hugo.
-date: 2017-02-22
-publishdate: 2017-02-01
-lastmod: 2018-08-11
keywords: [starters,assets,pipeline]
menu:
docs:
- parent: "tools"
+ parent: tools
weight: 30
weight: 30
-sections_weight: 30
-draft: false
aliases: [/developer-tools/migrations/,/developer-tools/migrated/]
-toc: false
---
Know of a Hugo-related starter kit that isn't mentioned here? [Please add it to the list.][addkit]
diff --git a/content/en/troubleshooting/_index.md b/content/en/troubleshooting/_index.md
index 3170dc7d8..51f1791a3 100644
--- a/content/en/troubleshooting/_index.md
+++ b/content/en/troubleshooting/_index.md
@@ -1,21 +1,12 @@
---
title: Troubleshoot
-linktitle: Troubleshoot
description: Frequently asked questions and known issues pulled from the Hugo Discuss forum.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
menu:
docs:
- parent: "troubleshooting"
+ parent: troubleshooting
weight: 1
weight: 1
-draft: false
-hidesectioncontents: false
-slug:
aliases: [/troubleshooting/faqs/,/faqs/]
-toc: false
-notesforauthors:
---
The Troubleshooting section includes known issues, recent workarounds, and FAQs pulled from the [Hugo Discussion Forum][forum].
diff --git a/content/en/troubleshooting/build-performance.md b/content/en/troubleshooting/build-performance.md
index e17f41072..5fc6fef69 100644
--- a/content/en/troubleshooting/build-performance.md
+++ b/content/en/troubleshooting/build-performance.md
@@ -1,17 +1,10 @@
---
title: Build Performance
-linktitle: Build Performance
description: An overview of features used for diagnosing and improving performance issues in site builds.
-date: 2017-03-12
-publishdate: 2017-03-12
-keywords: [performance, build]
-categories: [troubleshooting]
menu:
docs:
- parent: "troubleshooting"
+ parent: troubleshooting
weight: 3
-slug:
-aliases: []
toc: true
---
diff --git a/content/en/troubleshooting/faq.md b/content/en/troubleshooting/faq.md
index 998f9bbbe..04e857acb 100644
--- a/content/en/troubleshooting/faq.md
+++ b/content/en/troubleshooting/faq.md
@@ -2,11 +2,10 @@
title: Frequently Asked Questions
linktitle: FAQ
description: Solutions to some common Hugo problems.
-date: 2018-02-10
categories: [troubleshooting]
menu:
docs:
- parent: "troubleshooting"
+ parent: troubleshooting
keywords: [faqs]
weight: 2
toc: true
diff --git a/content/en/variables/_index.md b/content/en/variables/_index.md
index 382ee25d4..9b5289573 100644
--- a/content/en/variables/_index.md
+++ b/content/en/variables/_index.md
@@ -2,20 +2,14 @@
title: Variables and Params
linktitle: Variables Overview
description: Page-, file-, taxonomy-, and site-level variables and parameters available in templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [variables and params]
keywords: [variables,params,values,globals]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 1
-weight: 01 #rem
-sections_weight: 01
+weight: 01
aliases: [/templates/variables/]
-toc: false
---
Hugo's templates are context aware and make a large number of values available to you as you're creating views for your website.
diff --git a/content/en/variables/files.md b/content/en/variables/files.md
index 049c47396..784ab7c64 100644
--- a/content/en/variables/files.md
+++ b/content/en/variables/files.md
@@ -3,10 +3,9 @@ title: File Variables
description: "Use File variables to access file-related values for each page that is backed by a file."
categories: [variables and params]
keywords: [files]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 40
toc: true
weight: 40
diff --git a/content/en/variables/git.md b/content/en/variables/git.md
index 24878e350..293acf72c 100644
--- a/content/en/variables/git.md
+++ b/content/en/variables/git.md
@@ -2,21 +2,14 @@
title: Git Info Variables
linktitle: Git Variables
description: Get the last Git revision information for every content file.
-date: 2017-03-12
-publishdate: 2017-03-12
-lastmod: 2017-03-12
categories: [variables and params]
keywords: [git]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 70
weight: 70
-sections_weight: 70
aliases: [/extras/gitinfo/]
-toc: false
-wip: false
---
{{% note "`.GitInfo` Performance Considerations" %}}
diff --git a/content/en/variables/menus.md b/content/en/variables/menus.md
index 735121949..9a6fe517a 100644
--- a/content/en/variables/menus.md
+++ b/content/en/variables/menus.md
@@ -1,15 +1,12 @@
---
title: Menu Variables
-linktitle: Menu Variables
description: Use these variables and methods in your menu templates.
categories: [variables and params]
keywords: [menus]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 50
-toc: false
weight: 50
aliases: [/variables/menu/]
---
diff --git a/content/en/variables/page.md b/content/en/variables/page.md
index 6704075f4..20e7c004f 100644
--- a/content/en/variables/page.md
+++ b/content/en/variables/page.md
@@ -1,20 +1,13 @@
---
title: Page Variables
-linktitle:
description: Page-level variables are defined in a content file's front matter, derived from the content's file location, or extracted from the content body itself.
-date: 2017-02-01
-publishdate: 2017-02-01
categories: [variables and params]
keywords: [pages]
-draft: false
menu:
docs:
- title: "variables defined by a page"
- parent: "variables"
+ parent: variables
weight: 20
weight: 20
-sections_weight: 20
-aliases: []
toc: true
---
diff --git a/content/en/variables/pages.md b/content/en/variables/pages.md
index de8017945..5ca1f2758 100644
--- a/content/en/variables/pages.md
+++ b/content/en/variables/pages.md
@@ -1,18 +1,13 @@
---
title: Pages Methods
-linktitle:
description: Pages is the core page collection in Hugo and has many useful methods.
-date: 2019-10-20
categories: [variables and params]
keywords: [pages]
-draft: false
menu:
docs:
- title: "methods defined on a page collection"
- parent: "variables"
+ parent: variables
weight: 21
weight: 21
-sections_weight: 20
aliases: [/pages]
toc: true
---
diff --git a/content/en/variables/shortcodes.md b/content/en/variables/shortcodes.md
index 483973eb0..3d4185b45 100644
--- a/content/en/variables/shortcodes.md
+++ b/content/en/variables/shortcodes.md
@@ -1,19 +1,13 @@
---
title: Shortcode Variables
-linktitle: Shortcode Variables
description: Shortcodes can access page variables and also have their own specific built-in variables.
-date: 2017-03-12
-publishdate: 2017-03-12
categories: [variables and params]
keywords: [shortcodes]
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 20
weight: 20
-sections_weight: 20
-aliases: []
-toc: false
---
[Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields:
@@ -48,4 +42,4 @@ toc: false
[getfunction]: /functions/get/
[markdownshortcode]: /content-management/shortcodes/#shortcodes-with-markdown
[shortcodes]: /templates/shortcode-templates/
-[scratch]: /functions/scratch
\ No newline at end of file
+[scratch]: /functions/scratch
diff --git a/content/en/variables/site.md b/content/en/variables/site.md
index ffa728510..8b7003eeb 100644
--- a/content/en/variables/site.md
+++ b/content/en/variables/site.md
@@ -1,19 +1,13 @@
---
title: Site Variables
-linktitle: Site Variables
description: Many, but not all, site-wide variables are defined in your site's configuration. However, Hugo provides a number of built-in variables for convenient access to global values in your templates.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
categories: [variables and params]
keywords: [global,site]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 10
weight: 10
-sections_weight: 10
aliases: [/variables/site-variables/]
toc: true
---
diff --git a/content/en/variables/sitemap.md b/content/en/variables/sitemap.md
index 24700182a..b0b080d00 100644
--- a/content/en/variables/sitemap.md
+++ b/content/en/variables/sitemap.md
@@ -2,19 +2,13 @@
title: Sitemap Variables
linktitle: Sitemap Variables
description:
-date: 2017-03-12
-publishdate: 2017-03-12
categories: [variables and params]
keywords: [sitemap]
-draft: false
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 80
weight: 80
-sections_weight: 80
-aliases: []
-toc: false
---
A sitemap is a `Page` and therefore has all the [page variables][pagevars] available to use sitemap templates. They also have the following sitemap-specific variables available to them:
diff --git a/content/en/variables/taxonomy.md b/content/en/variables/taxonomy.md
index 336930672..63b552328 100644
--- a/content/en/variables/taxonomy.md
+++ b/content/en/variables/taxonomy.md
@@ -1,16 +1,14 @@
---
title: Taxonomy Variables
-linktitle:
description: Hugo's taxonomy system exposes variables to taxonomy and term templates.
categories: [variables and params]
keywords: [taxonomy,term]
menu:
docs:
- parent: "variables"
+ parent: variables
weight: 30
toc: true
weight: 30
-aliases: []
---
## Taxonomy templates