From 4207c57ffe0ae9f98212a8e3c183f48e51109f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 26 Mar 2022 12:52:38 +0200 Subject: [PATCH 01/14] netlify: Hugo 0.96.0 --- netlify.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index a29dc9ec3..b97fb55c3 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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" From b53eb5a086df3c1f4246f42894f5eecc83f861a9 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Sat, 26 Mar 2022 13:10:45 -0400 Subject: [PATCH 02/14] Add page for deploying with rclone (#1511) Rclone is a multi-protocol file copy and and sync tool that can make deploying static websites a breeze. This commit adds a brief guide to using Rclone to deploy sites generated with Hugo. Signed-off-by: Daniel F. Dickinson <20735818+danielfdickinson@users.noreply.github.com> --- .../deployment-with-rclone.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 content/en/hosting-and-deployment/deployment-with-rclone.md diff --git a/content/en/hosting-and-deployment/deployment-with-rclone.md b/content/en/hosting-and-deployment/deployment-with-rclone.md new file mode 100644 index 000000000..e9feb765a --- /dev/null +++ b/content/en/hosting-and-deployment/deployment-with-rclone.md @@ -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. From e0d08cdbbcfb59e5221eb256fc7958d23816d6ea Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Sat, 26 Mar 2022 19:11:55 -0400 Subject: [PATCH 03/14] Add wpxr-to-static to list of migration tools (#1512) * Adds wpxr-to-static to list of migration tools wpxr-to-static is a replacement for exitwp-for-hugo which no longer work due to being written in Python 2 which as EOL. Signed-off-by: Daniel F. Dickinson * Fix inline code to single backticks on migrations page Co-authored-by: Joe Mooring Co-authored-by: Joe Mooring --- content/en/tools/migrations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/tools/migrations.md b/content/en/tools/migrations.md index d87bd4013..7009164eb 100644 --- a/content/en/tools/migrations.md +++ b/content/en/tools/migrations.md @@ -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 From 9a3675aad2ef2a61df4f8b8a685c5729a0591ace Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 26 Mar 2022 16:14:37 -0700 Subject: [PATCH 04/14] Update sitemap templates (#1699) Supersedes #1526 --- content/en/templates/sitemap-template.md | 135 ++++++++++------------- 1 file changed, 58 insertions(+), 77 deletions(-) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index dee28fc3b..15028f078 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -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 internal [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`. - -## Hugo’s sitemap.xml - -This template respects the version 0.9 of the [Sitemap Protocol](https://www.sitemaps.org/protocol.html). - -```xml -{{ printf "" | safeHTML }} - - {{ range .Data.Pages }} - - {{ .Permalink }}{{ if not .Lastmod.IsZero }} - {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} - {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} - {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} - {{ end }} - {{ end }} - - {{ end }} - -``` - -## Hugo's sitemapindex.xml - -This is used to create a Sitemap index in multilingual mode: - -```xml -{{ printf "" | safeHTML }} - - {{ range . }} - - {{ .SitemapAbsURL }} - {{ if not .LastChange.IsZero }} - {{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }} - {{ end }} - - {{ end }} - -``` - -## Configure `sitemap.xml` - -Defaults for ``, `` 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" {{}} -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 `""` (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` (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 +{{}} + +## 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'] +{{}} + +[`publishDir`]: {{< relref "getting-started/configuration#publishdir" >}} +[change frequency]: +[priority]: +[sitemap protocol]: +[sitemap.xml]: +[sitemapindex.xml]: From 60653c17da508e53331b1e79a238f3618c186f40 Mon Sep 17 00:00:00 2001 From: Magenta <48266942+MagentaPuppy@users.noreply.github.com> Date: Sun, 27 Mar 2022 10:44:39 +1100 Subject: [PATCH 05/14] Update the caddy error docs link (#1696) * Update the caddy server link the link there is dead, update it to the proper page on the current docs * Update content/en/templates/404.md Co-authored-by: Joe Mooring --- content/en/templates/404.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/404.md b/content/en/templates/404.md index 1b82e9ebf..a2d06cf81 100644 --- a/content/en/templates/404.md +++ b/content/en/templates/404.md @@ -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). From 78665c1e0ed6e6550c0d24ff7c6329a3e4eff318 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 27 Mar 2022 08:41:14 -0700 Subject: [PATCH 06/14] Update sitemap-template.md --- content/en/templates/sitemap-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 15028f078..6eda24002 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -19,7 +19,7 @@ toc: true Hugo's built-in sitemap templates conform to v0.9 of the [sitemap protocol]. -With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the internal [sitemap.xml] template. +With a monolingual project, Hugo generates a sitemap.xml file in the root of the [`publishDir`] using the built-in [sitemap.xml] template. With a multilingual project, Hugo generates: From c447270ef5ab0253d34fe8b2437ccb95ef0849a8 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Mon, 28 Mar 2022 08:23:45 -0700 Subject: [PATCH 07/14] Update sitemap-template.md --- content/en/templates/sitemap-template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 6eda24002..9fc817020 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -38,13 +38,13 @@ Set the default values for [change frequency] and [priority], and the name of th {{}} changefreq -: How frequently a page is likely to change. Valid values are `always`, `hourly`, `daily`, `weekly`, `monthly`, `yearly`, and `never`. Default is `""` (omitted from rendered sitemap). +: 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` (omitted from rendered sitemap). +: 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). ## Override Default Values From 94502a09babb2f4cad38aec2fbdca907dc2e3298 Mon Sep 17 00:00:00 2001 From: mamaremere Date: Tue, 29 Mar 2022 16:43:20 +0300 Subject: [PATCH 08/14] Code block render hooks are introduced in v0.93.0 (#1701) The docs incorrectly stated that code block render hooks were introduced in version 0.83.0, so I corrected it to version 0.93.0 (changelog here: https://github.com/gohugoio/hugo/releases/tag/v0.93.0). --- content/en/templates/render-hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/render-hooks.md b/content/en/templates/render-hooks.md index 57c2efa06..8f1a55c2f 100644 --- a/content/en/templates/render-hooks.md +++ b/content/en/templates/render-hooks.md @@ -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: From 9b3913c861808af532a42c0fbad6cccbd96cd4f3 Mon Sep 17 00:00:00 2001 From: Jacob Lamont Date: Fri, 1 Apr 2022 12:44:06 -0400 Subject: [PATCH 09/14] Remove footnoteAnchorPrefix and footnoteReturnLinkContents (#1704) Removes `footnoteAnchorPrefix` and `footnoteReturnLinkContents` from general configuration docs since these are specific to Blackfriday and documented in the [Blackfriday](https://gohugo.io/getting-started/configuration-markup/#blackfriday) configuration docs. --- content/en/getting-started/configuration.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index aed0ea100..47622cc9b 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -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:** "" @@ -568,7 +556,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: From 9f4bd0023698500ca0cd84e089d6789ce1faeea8 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Fri, 1 Apr 2022 15:00:31 -0700 Subject: [PATCH 10/14] Update formats.md Fixes #1703 --- content/en/content-management/formats.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/content-management/formats.md b/content/en/content-management/formats.md index 3c3edfdd4..0b25c3171 100644 --- a/content/en/content-management/formats.md +++ b/content/en/content-management/formats.md @@ -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.| From 55467e7c8395a26f3839e65116dde88fafd6d6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 5 Apr 2022 16:19:56 +0200 Subject: [PATCH 11/14] Update partials.md --- content/en/templates/partials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/partials.md b/content/en/templates/partials.md index 2d1e9edf2..56a676d7e 100644 --- a/content/en/templates/partials.md +++ b/content/en/templates/partials.md @@ -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 From 9928a70d659bc8b62f48f9d620c734dcacdce3d2 Mon Sep 17 00:00:00 2001 From: Franky W Date: Tue, 5 Apr 2022 20:50:52 +0200 Subject: [PATCH 12/14] Fix workspace formatting (#1707) This makes sure the `workspace` configuration highlights bold like the other configuration options and remains in its own block --- content/en/hugo-modules/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/hugo-modules/configuration.md b/content/en/hugo-modules/configuration.md index c66d93a6d..51ad08d53 100644 --- a/content/en/hugo-modules/configuration.md +++ b/content/en/hugo-modules/configuration.md @@ -43,7 +43,7 @@ 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. From 9df788b25dc96ffb221ad0f650d6c3dfb2c57bea Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 8 Apr 2022 03:42:08 +0200 Subject: [PATCH 13/14] Fix broken link (hugo modules) (#1710) --- content/en/hugo-modules/use-modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/hugo-modules/use-modules.md b/content/en/hugo-modules/use-modules.md index e0d73957a..038e0bf89 100644 --- a/content/en/hugo-modules/use-modules.md +++ b/content/en/hugo-modules/use-modules.md @@ -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). From 4c5edacfeebd13eb7f876723c065466cd50e0cae Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Fri, 8 Apr 2022 10:43:49 +0900 Subject: [PATCH 14/14] cSpell config update (#1700) --- .cspell.json | 66 ++++++++++++++++++- content/en/functions/cond.md | 1 - content/en/functions/default.md | 1 - content/en/functions/uniq.md | 1 - content/en/getting-started/configuration.md | 8 ++- .../hosting-on-keycdn.md | 4 +- .../hosting-on-render.md | 2 - content/en/hugo-modules/configuration.md | 2 +- content/en/showcase/hapticmedia/index.md | 3 +- content/en/templates/ordering-and-grouping.md | 4 +- layouts/maintenance/list.html | 2 +- 11 files changed, 75 insertions(+), 19 deletions(-) diff --git a/.cspell.json b/.cspell.json index 2cac73c02..84631ce67 100644 --- a/.cspell.json +++ b/.cspell.json @@ -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": [ + "\\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 } diff --git a/content/en/functions/cond.md b/content/en/functions/cond.md index a5e534426..30b853251 100644 --- a/content/en/functions/cond.md +++ b/content/en/functions/cond.md @@ -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. diff --git a/content/en/functions/default.md b/content/en/functions/default.md index eee00b200..c4cc166a7 100644 --- a/content/en/functions/default.md +++ b/content/en/functions/default.md @@ -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: diff --git a/content/en/functions/uniq.md b/content/en/functions/uniq.md index 0a720f88f..eec55e5c3 100644 --- a/content/en/functions/uniq.md +++ b/content/en/functions/uniq.md @@ -16,7 +16,6 @@ hugoversion: relatedfuncs: [] deprecated: false aliases: [] -needsexamples: false --- ``` diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 47622cc9b..d377487c5 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -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 @@ -267,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 @@ -276,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 `` element with this value. The value is not used elsewhere. ### languages + See [Configure Languages](/content-management/multilingual/#configure-languages). ### disableLanguages @@ -318,7 +320,7 @@ Don't sync modification time of files. ### outputFormats See [Configure Output Formats](#configure-additional-output-formats). -### paginate +### paginate **Default value:** 10 diff --git a/content/en/hosting-and-deployment/hosting-on-keycdn.md b/content/en/hosting-and-deployment/hosting-on-keycdn.md index 8d9cb0e63..bec8b36e4 100644 --- a/content/en/hosting-and-deployment/hosting-on-keycdn.md +++ b/content/en/hosting-and-deployment/hosting-on-keycdn.md @@ -83,11 +83,11 @@ The Zone ID and API key are used to purge your zone – it’s not strictly need Now it’s 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 – don’t worry about that) and then by heading to whatever Zone alias / Zone URL you defined. diff --git a/content/en/hosting-and-deployment/hosting-on-render.md b/content/en/hosting-and-deployment/hosting-on-render.md index 7a77742e2..73b20bcb2 100644 --- a/content/en/hosting-and-deployment/hosting-on-render.md +++ b/content/en/hosting-and-deployment/hosting-on-render.md @@ -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/ diff --git a/content/en/hugo-modules/configuration.md b/content/en/hugo-modules/configuration.md index 51ad08d53..70de492ab 100644 --- a/content/en/hugo-modules/configuration.md +++ b/content/en/hugo-modules/configuration.md @@ -46,7 +46,7 @@ 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+. 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: diff --git a/content/en/showcase/hapticmedia/index.md b/content/en/showcase/hapticmedia/index.md index b32879b69..85ec17a8b 100644 --- a/content/en/showcase/hapticmedia/index.md +++ b/content/en/showcase/hapticmedia/index.md @@ -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.** - diff --git a/content/en/templates/ordering-and-grouping.md b/content/en/templates/ordering-and-grouping.md index a4f238fdf..f1634c7d8 100644 --- a/content/en/templates/ordering-and-grouping.md +++ b/content/en/templates/ordering-and-grouping.md @@ -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 diff --git a/layouts/maintenance/list.html b/layouts/maintenance/list.html index 299602318..2035c058b 100644 --- a/layouts/maintenance/list.html +++ b/layouts/maintenance/list.html @@ -15,7 +15,7 @@
{{ $byLastMod := .Site.RegularPages.ByLastmod }} {{ $recent := ($byLastMod | last 30).Reverse }} - {{ $leastRecent := $byLastMod | first 10 }} + {{ $leastRecent := $byLastMod | first 10 }}

Last Updated

{{ partial "maintenance-pages-table.html" $recent }}

Least Recently Updated