Squashed 'docs/' changes from 63386081c..4c5edacfe

4c5edacfe cSpell config update (#1700)
9df788b25 Fix broken link (hugo modules) (#1710)
9928a70d6 Fix workspace formatting (#1707)
55467e7c8 Update partials.md
9f4bd0023 Update formats.md
9b3913c86 Remove footnoteAnchorPrefix and footnoteReturnLinkContents (#1704)
94502a09b Code block render hooks are introduced in v0.93.0 (#1701)
c447270ef Update sitemap-template.md
78665c1e0 Update sitemap-template.md
60653c17d Update the caddy error docs link (#1696)
9a3675aad Update sitemap templates (#1699)
e0d08cdbb Add wpxr-to-static to list of migration tools (#1512)
b53eb5a08 Add page for deploying with rclone (#1511)
4207c57ff netlify: Hugo 0.96.0
a18d646ea docs: Regen docshelper
e3e0981ed docs: Regen CLI docs
fda988d01 Merge commit 'd276e901b36d2576ef8350ed96b17f66254eac1b'
e4a26dbca tpl/crypto: Add optional encoding arg to hmac function

git-subtree-dir: docs
git-subtree-split: 4c5edacfeebd13eb7f876723c065466cd50e0cae
This commit is contained in:
Bjørn Erik Pedersen 2022-04-08 13:32:01 +02:00
parent d276e901b3
commit ec920363cd
27 changed files with 225 additions and 142 deletions

View file

@ -6,6 +6,8 @@
"aabba",
"aabbaa",
"aabbaabb",
"aabbaabbab",
"abbaa",
"abourget",
"absurl",
"adoc",
@ -18,7 +20,11 @@
"attrlink",
"azblob",
"baseof",
"bbaa",
"bcde",
"bcdef",
"beevelop",
"Bergevin",
"bibtex",
"Bjørn",
"blackfriday",
@ -31,6 +37,7 @@
"canonify",
"Catmull",
"Catwoman",
"changefreq",
"Cheatsheet",
"choco",
"chromastyles",
@ -42,12 +49,15 @@
"Coen",
"Commento",
"Cond",
"contentdir",
"Contentful",
"Copr",
"copyrighthtml",
"corejs",
"countrunes",
"countwords",
"crossreferences",
"daftaupe",
"datatable",
"DATOCMS",
"debugconfig",
@ -60,6 +70,8 @@
"dokuwiki",
"dpkg",
"DRING",
"Eiqc",
"Eliott",
"Emojify",
"Enwrite",
"eopkg",
@ -68,6 +80,7 @@
"erroridf",
"Evernote",
"exitwp",
"expirydate",
"Feminella",
"firstpost",
"Formspree",
@ -95,7 +108,9 @@
"Grayscale",
"Gruber",
"gtag",
"gvfs",
"hidecaption",
"hmac",
"Hokus",
"hola",
"hügó",
@ -121,6 +136,7 @@
"Isset",
"Isso",
"Jaco",
"JIRN",
"johnpatitucci",
"Joomla",
"JRBR",
@ -142,10 +158,13 @@
"mathjax",
"mdhender",
"mdshortcode",
"MENUENTRY",
"mercredi",
"Milli",
"Mittwoch",
"mkdir",
"mmark",
"modh",
"monokai",
"Morling",
"mspowerpoint",
@ -155,17 +174,20 @@
"mydeployment",
"myindex",
"mylayout",
"mylogin",
"mypage",
"mypartials",
"mypost",
"mysite",
"myspa",
"mystyle",
"mytextpartial",
"mytheme",
"NDJSON",
"needsexample",
"Netravali",
"newparam",
"Nichlas",
"Nikhil",
"Njjy",
"nlist",
@ -176,6 +198,7 @@
"NOSQL",
"notoc",
"novembre",
"numfmt",
"NUMWORKERMULTIPLIER",
"Obhu",
"octohug",
@ -191,18 +214,25 @@
"PCRE",
"peaceiris",
"Pedersen",
"Pekka",
"permalinkable",
"plainify",
"POSIX",
"postprocess",
"Poupin",
"prerender",
"println",
"publishdate",
"Pygments",
"qref",
"querify",
"QVOMC",
"Racic",
"Rclone",
"rdwatters",
"readfile",
"rebinded",
"recommendedby",
"REDIR",
"reftext",
"relatedfuncs",
@ -210,16 +240,21 @@
"relurl",
"remarkjs",
"rgba",
"Riku",
"rlimit",
"roboto",
"rssxml",
"rwxrwxrwx",
"RYUGV",
"safehtml",
"safejs",
"Samsa",
"schemaorg",
"Shekhar",
"Shortcode",
"Shortcodes",
"signup",
"Silvola",
"Sindre",
"sitemapindex",
"sitemapxml",
@ -231,24 +266,33 @@
"struct",
"structs",
"subdir",
"svgs",
"symdiff",
"Talkyard",
"taxo",
"taxonomyname",
"tbody",
"tdewolff",
"testshortcodes",
"thead",
"Thinkful",
"Tknx",
"TLDR",
"TMPDIR",
"TOCSS",
"todos",
"tojson",
"Tomango",
"topologix",
"Torikian",
"totoml",
"toyaml",
"twitteruser",
"Unmarshal",
"Unmarshal",
"urlize",
"urlset",
"utimestamp",
"vendored",
"vimrc",
"wanghc",
"Wappalyzer",
@ -258,19 +302,35 @@
"wibble",
"wordcount",
"workson",
"wpxr",
"Xbaabbab",
"xvzf",
"yoyoyo",
"Zgotmpl",
"zzbbaabb"
"zzbbaabb",
"مدونتي"
],
"language": "en,en-GB,en-US,de,fr",
"allowCompoundWords": true,
"files": [
"**/*.md"
],
"ignoreRegExpList": [
"<!-- prettier-ignore -->\\n(`{3,})\\w*\\n[\\s\\S]+?\\1",
"\\[(\\*{2})?@\\w+?\\1\\]",
"\\[`\\w+`\\]",
"ve{2,}r{2,}y",
"ve+r+y+long\\w*",
"\\/.*?\\/",
"\\_\\w+",
"\\#\\w+"
],
"ignorePaths": [
".cspell.json",
"**/node_modules/**",
"*.min.*"
"*.min.*",
"**/news/*",
"**/showcase/*"
],
"useGitignore": true
}

View file

@ -14,7 +14,7 @@ hugo is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at http://gohugo.io/.
Complete documentation is available at https://gohugo.io/.
```
hugo [flags]
@ -23,7 +23,7 @@ hugo [flags]
### Options
```
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future

View file

@ -12,7 +12,7 @@ Generate Markdown documentation for the Hugo CLI.
Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for http://gohugo.io/.
of Hugo's command-line interface for https://gohugo.io/.
It creates one Markdown file per command with front matter suitable
for rendering in Hugo.

View file

@ -26,7 +26,7 @@ See https://gohugo.io/hugo-modules/ for more information.
### Options
```
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future

View file

@ -25,7 +25,7 @@ hugo new [path] [flags]
### Options
```
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future

View file

@ -30,7 +30,7 @@ hugo server [flags]
```
--appendPort append port to baseURL (default true)
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
--bind string interface to which the server will bind (default "127.0.0.1")
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content

View file

@ -33,7 +33,7 @@ The current list of content formats in Hugo:
|MMark|mmark|Mmark is deprecated and will be removed in a future release.|
|Emacs Org-Mode|org|See [go-org](https://github.com/niklasfasching/go-org).|
|AsciiDoc|asciidocext, adoc, ad|Needs [Asciidoctor][ascii] installed.|
|RST|rst|Needs [RST](https://docutils.sourceforge.net/rst.html) installed.|
|RST|rst|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
|Pandoc|pandoc, pdc|Needs [Pandoc](https://www.pandoc.org/) installed.|
|HTML|html, htm|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|

View file

@ -11,7 +11,6 @@ hugoversion: 0.27
relatedfuncs: [default]
toc: false
draft: false
needsexamples: false
---
`cond` returns *VAR1* if *CONTROL* is true, or *VAR2* if it is not.

View file

@ -18,7 +18,6 @@ relatedfuncs: []
deprecated: false
draft: false
aliases: []
needsexamples: false
---
`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:

View file

@ -1,7 +1,7 @@
---
title: hmac
linktitle: hmac
description: Compute the cryptographic checksum of a message.
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
@ -10,24 +10,25 @@ menu:
docs:
parent: "functions"
keywords: [hmac,checksum]
signature: ["hmac HASH_TYPE KEY MESSAGE"]
signature: ["crypto.HMAC HASH_TYPE KEY MESSAGE [ENCODING]","hmac HASH_TYPE KEY MESSAGE [ENCODING]" ]
workson: []
hugoversion:
relatedfuncs: [hmac]
deprecated: false
aliases: [hmac]
aliases: []
---
`hmac` returns a cryptographic hash that uses a key to sign a message.
Set the `HASH_TYPE` argument to `md5`, `sha1`, `sha256`, or `sha512`.
Set the optional `ENCODING` argument to either `hex` (default) or `binary`.
```go-html-template
{{ hmac "sha256" "Secret key" "Secret message" }}
5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84
{{ hmac "sha256" "Secret key" "Secret message" "hex" }}
5cceb491f45f8b154e20f3b0a30ed3a6ff3027d373f85c78ffe8983180b03c84
{{ hmac "sha256" "Secret key" "Secret message" "binary" | base64Encode }}
XM60kfRfixVOIPOwow7Tpv8wJ9Nz+Fx4/+iYMYCwPIQ=
```
{{ hmac "sha256" "Secret key" "Hello world, gophers!"}},
<!-- returns the string "b6d11b6c53830b9d87036272ca9fe9d19306b8f9d8aa07b15da27d89e6e34f40"
```
Supported hash functions:
* md5
* sha1
* sha256
* sha512

View file

@ -16,7 +16,6 @@ hugoversion:
relatedfuncs: []
deprecated: false
aliases: []
needsexamples: false
---
```

View file

@ -46,7 +46,7 @@ In addition to using a single site config file, one can use the `configDir` dire
- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
- Each file's content must be top-level, for example:
{{< code-toggle file="config" >}}
[Params]
foo = "bar"
@ -220,7 +220,7 @@ Disable automatic live reloading of browser window.
: Do not convert the url/path to lowercase.
### enableEmoji
### enableEmoji
**Default value:** false
@ -254,18 +254,6 @@ Enable generation of `robots.txt` file.
See [Front matter Configuration](#configure-front-matter).
### footnoteAnchorPrefix
**Default value:** ""
Prefix for footnote anchors.
### footnoteReturnLinkContents
**Default value:** ""
Text to display for footnote return links.
### googleAnalytics
**Default value:** ""
@ -279,6 +267,7 @@ Google Analytics tracking ID.
If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
### imaging
See [Image Processing Config](/content-management/image-processing/#image-processing-config).
### languageCode
@ -288,6 +277,7 @@ See [Image Processing Config](/content-management/image-processing/#image-proces
A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). The internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml) populates its `<language>` element with this value. The value is not used elsewhere.
### languages
See [Configure Languages](/content-management/multilingual/#configure-languages).
### disableLanguages
@ -330,7 +320,7 @@ Don't sync modification time of files.
### outputFormats
See [Configure Output Formats](#configure-additional-output-formats).
### paginate
### paginate
**Default value:** 10
@ -568,7 +558,6 @@ The following is a typical example of a configuration file. The values nested un
{{< code-toggle file="config">}}
baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
footnoteReturnLinkContents: "↩"
permalinks:
posts: /:year/:month/:title/
params:

View file

@ -0,0 +1,57 @@
---
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"
weight: 80
weight: 80
sections_weight: 80
draft: false
aliases: [/tutorials/deployment-with-rclone/]
toc: true
notesforauthors:
---
## Assumptions
* A web host running a web server. This could be a shared hosting environment or a VPS.
* Access to your web host with any of the [protocols supported by rclone](https://rclone.org/#providers), such as SFTP.
* A functional static website built with Hugo
* Deploying from an [Rclone](https://rclone.org) compatible operating system
* You have [installed Rclone](https://rclone.org/install/).
**NB**: You can remove ``--interactive`` in the commands below once you are comfortable with rclone, if you wish. Also, ``--gc`` and ``--minify`` are optional in the ``hugo`` commands below.
## Getting Started
The spoiler is that you can even deploy your entire website from any compatible OS with no configuration. Using SFTP for example:
```
hugo --gc --minify
rclone sync --interactive --sftp-host sftp.example.com --sftp-user www-data --sftp-ask-password public/ :sftp:www/
```
## Configure Rclone for Even Easier Usage
The easiest way is simply to run ``rclone config``.
The [Rclone docs](https://rclone.org/docs/) provide [an example of configuring Rclone to use SFTP](https://rclone.org/sftp/).
For the next commands, we will assume you configured a remote you named ``hugo-www``
The above 'spoiler' commands could become:
```
hugo --gc --minify
rclone sync --interactive public/ hugo-www:www/
```
After you issue the above commands (and respond to any prompts), check your website and you will see that it is deployed.

View file

@ -83,11 +83,11 @@ The Zone ID and API key are used to purge your zone its not strictly need
Now its time to push the newly created repository to GitLab:
```
git remote add origin git@gitlab.com:youruser/ciexample.git
git remote add origin git@gitlab.com:youruser/ci-example.git
git push -u origin master
```
You can watch the progress and CI job output in your Gitlab project under “Pipelines”.
You can watch the progress and CI job output in your Gitlab project under “Pipelines”.
After verifying your CI job ran without issues, first check that your GitLab page shows up under `https://youruser.gitlab.io/reponame/` (it might look broken depending on your browser settings as all links point to your KeyCDN zone dont worry about that) and then by heading to whatever Zone alias / Zone URL you defined.

View file

@ -4,7 +4,6 @@ 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
lastmod: 2020-01-01
categories: [hosting and deployment]
keywords: [hosting,deployment]
authors: [Anurag Goel]
@ -88,5 +87,4 @@ Render automatically downloads all Git submodules defined in your Git repo on ev
Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
[Quick Start]: /getting-started/quick-start/

View file

@ -43,10 +43,10 @@ private
: Comma separated glob list matching paths that should be treated as private.
workspace {{< new-in "0.83.0" >}}
The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+.
: The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+.
replacements {{< new-in "0.77.0" >}}
: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.
: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/my-theme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/my-theme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.
Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example:

View file

@ -136,7 +136,7 @@ Also see the [CLI Doc](/commands/hugo_mod_clean/).
Run `hugo mod clean` to delete the entire modules cache.
Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/hugo-modules/configuration/#configure-file-caches).
Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/getting-started/configuration/#configure-file-caches).

View file

@ -18,7 +18,7 @@ Hugo addresses all these needs, coupled with [Forestry.io](https://forestry.io/)
- The **multilingual** content support, especially simple to setup.
- The **multiple environments** support (develop, staging, test, production, ...).
- Although a hard start with the Go language, the power of the **Hugo's templating**.
- The **partial layouts**, including the `internals` (e.g. social metas).
- The **partial layouts**, including the `internals` (e.g. social meta tags).
- The **build time**, unbeatable ⚡️⚡️⚡️.
@ -30,4 +30,3 @@ Hugo addresses all these needs, coupled with [Forestry.io](https://forestry.io/)
- **[Forestry.io](https://forestry.io)** for the content management.
**All of these tools allow our editor to manage the blog's content without having to worry about its technical aspect, which is managed by the developers.**

View file

@ -51,7 +51,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist
* Nginx. You might specify `error_page 404 /404.html;` in your `nginx.conf` file. [Details here](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
* Amazon CloudFront. You can specify the page in the Error Pages section in the CloudFront Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
* Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors)
* Caddy Server. Use the `handle_errors` directive to specify error pages for one or more status codes. [Details here](https://caddyserver.com/docs/caddyfile/directives/handle_errors)
* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
* Azure Static website. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [More details are available in the Static website documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).

View file

@ -1,5 +1,5 @@
---
title: Ordere and Grouping Hugo Lists
title: Ordering and Grouping Hugo Lists
linktitle: List Ordering and Grouping
description: You can group or order your content in both your templating and content front matter.
date: 2017-02-01
@ -19,7 +19,7 @@ toc: true
notes: This was originally going to be a separate page on the new docs site but it now makes more sense to keep everything within the templates/lists page. - rdwatters, 2017-03-12.
---
In Hugo, A list template is any template that will be used to render multiple pieces of content in a single HTML page.
In Hugo, a list template is any template that will be used to render multiple pieces of content in a single HTML page.
## Example List Templates

View file

@ -78,7 +78,7 @@ This means the partial will *only* be able to access those variables. The partia
## Returning a value from a Partial
In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement.
In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement _at the end of the partial_.
### Example GetFeatured

View file

@ -25,7 +25,7 @@ The hook kinds currently supported are:
* `image`
* `link`
* `heading` {{< new-in "0.71.0" >}}
* `codeblock`{{< new-in "0.83.0" >}}
* `codeblock`{{< new-in "0.93.0" >}}
You can define [Output-Format-](/templates/output-formats) and [language-](/content-management/multilingual/)specific templates if needed. Your `layouts` folder may look like this:

View file

@ -1,10 +1,7 @@
---
title: Sitemap Template
# linktitle: Sitemap
description: Hugo ships with a built-in template file observing the v0.9 of the Sitemap Protocol, but you can override this template if needed.
title: Sitemap Templates
description: Hugo provides built-in sitemap templates.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [templates]
keywords: [sitemap, xml, templates]
menu:
@ -15,92 +12,76 @@ weight: 160
sections_weight: 160
draft: false
aliases: [/layout/sitemap/,/templates/sitemap/]
toc: false
toc: true
---
A single Sitemap template is used to generate the `sitemap.xml` file.
Hugo automatically comes with this template file. *No work is needed on
the users' part unless they want to customize `sitemap.xml`.*
## Overview
A sitemap is a `Page` and therefore has all the [page variables][pagevars] available to use in this template along with Sitemap-specific ones:
Hugo's built-in sitemap templates conform to v0.9 of the [sitemap protocol].
`.Sitemap.ChangeFreq`
: The page change frequency
With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemap.xml] template.
`.Sitemap.Priority`
: The priority of the page
With a multilingual project, Hugo generates:
`.Sitemap.Filename`
: The sitemap filename
- A sitemap.xml file in the root of each site (language) using the built-in [sitemap.xml] template
- A sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemapindex.xml] template
If provided, Hugo will use `/layouts/sitemap.xml` instead of the internal `sitemap.xml` template that ships with Hugo.
## Configuration
## Sitemap Templates
Hugo has built-on Sitemap templates, but you can provide your own if needed, in either `layouts/sitemap.xml` or `layouts/_default/sitemap.xml`.
For multilingual sites, we also create a Sitemap index. You can provide a custom layout for that in either `layouts/sitemapindex.xml` or `layouts/_default/sitemapindex.xml`.
## Hugos sitemap.xml
This template respects the version 0.9 of the [Sitemap Protocol](https://www.sitemaps.org/protocol.html).
```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{ end }}
</urlset>
```
## Hugo's sitemapindex.xml
This is used to create a Sitemap index in multilingual mode:
```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range . }}
<sitemap>
<loc>{{ .SitemapAbsURL }}</loc>
{{ if not .LastChange.IsZero }}
<lastmod>{{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
{{ end }}
</sitemap>
{{ end }}
</sitemapindex>
```
## Configure `sitemap.xml`
Defaults for `<changefreq>`, `<priority>` and `filename` values can be set in the site's config file, e.g.:
Set the default values for [change frequency] and [priority], and the name of the generated file, in your site configuration.
{{< code-toggle file="config" >}}
[sitemap]
changefreq = "monthly"
changefreq = 'monthly'
filename = 'sitemap.xml'
priority = 0.5
filename = "sitemap.xml"
{{</ code-toggle >}}
The same fields can be specified in an individual content file's front matter in order to override the value assigned to that piece of content at render time.
changefreq
: How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. Default is `""` (change frequency omitted from rendered sitemap).
filename
: The name of the generated file. Default is `sitemap.xml`.
priority
: The priority of a page relative to any other page on the site. Valid values range from 0.0 to 1.0. Default is `-1` (priority omitted from rendered sitemap).
[pagevars]: /variables/page/
## Override Default Values
Override the default values for a given page in front matter.
{{< code-toggle file="news.md" fm=true >}}
title = 'News'
[sitemap]
changefreq = 'weekly'
priority = 0.8
{{</ code-toggle >}}
## Override Built-in Templates
To override the built-in sitemap.xml template, create a new file in either of these locations:
- layouts/sitemap.xml
- layouts/_default/sitemap.xml
When ranging through the page collection, access the _change frequency_ and _priority_ with `.Sitemap.ChangeFreq` and `.Sitemap.Priority` respectively.
To override the built-in sitemapindex.xml template, create a new file in either of these locations:
- layouts/sitemapindex.xml
- layouts/_default/sitemapindex.xml
## Disable Sitemap Generation
You may disable sitemap generation in your site configuration:
{{< code-toggle file="config" >}}
disableKinds = ['sitemap']
{{</ code-toggle >}}
[`publishDir`]: {{< relref "getting-started/configuration#publishdir" >}}
[change frequency]: <https://www.sitemaps.org/protocol.html#changefreqdef>
[priority]: <https://www.sitemaps.org/protocol.html#priority>
[sitemap protocol]: <https://www.sitemaps.org/protocol.html>
[sitemap.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemap.xml>
[sitemapindex.xml]: <https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/sitemapindex.xml>

View file

@ -4,7 +4,7 @@ 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: 2017-02-01
lastmod: 2022-03-26
keywords: [migrations,jekyll,wordpress,drupal,ghost,contentful]
menu:
docs:
@ -47,9 +47,9 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
## WordPress
- [wordpress-to-hugo-exporter](https://github.com/SchumacherFM/wordpress-to-hugo-exporter) - A one-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo. (Note: If you have trouble using this plugin, you can [export your site for Jekyll](https://wordpress.org/plugins/jekyll-exporter/) and use Hugo's built in Jekyll converter listed above.)
- [exitwp-for-hugo](https://github.com/wooni005/exitwp-for-hugo) - A python script which works with the xml export from WordPress and converts WordPress pages and posts to Markdown and YAML for hugo.
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://en.support.wordpress.com/export/) file of your free YOUR-TLD.wordpress.com website. It also saves approved comments to `YOUR-POST-NAME-comments.md` file along with posts.
- [wordhugopress](https://github.com/nantipov/wordhugopress) - A small utility written in Java, exports the entire WordPress site from the database and resource (e.g. images) files stored locally or remotely. Therefore, migration from the backup files is possible. Supports merging of the multiple WordPress sites into a single Hugo one.
- [wpxr-to-static](https://github.com/danielfdickinson/wpxr-to-static) - WordPress eXtended RSS to Static Generator Conversion, Python3 program to convert WordPress XML Export (WPXR) format files to Hugo Markdown files (with YAML metadata) and a `config.toml` for the site. Inspired by [exitwp-for-hugo](https://github.com/wooni005/exitwp-for-hugo) (a Python 2 \[EOL] script which works with the xml export from WordPress and converts WordPress pages and posts to Markdown and YAML for hugo).
## Medium

View file

@ -3649,7 +3649,8 @@
"Args": [
"h",
"k",
"m"
"m",
"e"
],
"Aliases": [
"hmac"

View file

@ -15,7 +15,7 @@
<div class="w-100">
{{ $byLastMod := .Site.RegularPages.ByLastmod }}
{{ $recent := ($byLastMod | last 30).Reverse }}
{{ $leastRecent := $byLastMod | first 10 }}
{{ $leastRecent := $byLastMod | first 10 }}
<h2 id="last-updated">Last Updated</h2>
{{ partial "maintenance-pages-table.html" $recent }}
<h2 id="least-recently-updated">Least Recently Updated</h2>

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.95.0"
HUGO_VERSION = "0.96.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.95.0"
HUGO_VERSION = "0.96.0"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.95.0"
HUGO_VERSION = "0.96.0"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.95.0"
HUGO_VERSION = "0.96.0"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"