From 5a64301ba99c9651450f8442849bf831e70d59eb Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Fri, 31 May 2019 01:11:30 +0900 Subject: [PATCH 01/42] HTTPS link to yaml.org/spec/ --- content/en/getting-started/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index 6fbfd3779..dd176a892 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -498,5 +498,5 @@ dir [Output Formats]: /templates/output-formats/ [templates]: /templates/ [toml]: https://github.com/toml-lang/toml -[yaml]: http://yaml.org/spec/ +[yaml]: https://yaml.org/spec/ [static-files]: /content-management/static-files/ From 5b7c6b5a17314d3e655d2edb5cb2a12ad9afcc64 Mon Sep 17 00:00:00 2001 From: pacollins Date: Sat, 13 Apr 2019 00:32:58 -0400 Subject: [PATCH 02/42] remove google plus --- content/en/content-management/authors.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/en/content-management/authors.md b/content/en/content-management/authors.md index 530557ac0..4cec5281a 100644 --- a/content/en/content-management/authors.md +++ b/content/en/content-management/authors.md @@ -44,7 +44,6 @@ weight = 10 [social] facebook = "alice.allison" twitter = "alice" - googleplus = "aliceallison1" website = "www.example.com" [params] @@ -108,9 +107,9 @@ You can find a list of all template variables to access the profile information ### Link Social Network Accounts -As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corrersponding identifiers are supported: `github`, `facebook`, `twitter`, `googleplus`, `pinterest`, `instagram`, `youtube` and `linkedin`. +As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corrersponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`. -This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `googleplus`). Custom variables like `website` remain as they are. +This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `twitter`). Custom variables like `website` remain as they are. Most articles feature a small section with information about the author at the end. Let's create one containing the author's name, a thumbnail, a (summarized) biography and links to all social networks: From 1a44d8a50a4a58c1ba023b023c4bc869d7e3d97e Mon Sep 17 00:00:00 2001 From: Duncan Mackenzie Date: Tue, 30 Apr 2019 13:41:04 -0700 Subject: [PATCH 03/42] Add configuration information for Azure Azure static websites are an option for publishing your Hugo site, and this is how you configure the 404 page. More details and instructions linked in the edit to https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website --- content/en/templates/404.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/en/templates/404.md b/content/en/templates/404.md index bb1d5e424..add040175 100644 --- a/content/en/templates/404.md +++ b/content/en/templates/404.md @@ -53,6 +53,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist * Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont 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) * 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). {{% note %}} `hugo server` will not automatically load your custom `404.html` file, but you From a39b9ac87178329b9873bb4e913b7504282320d8 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com> Date: Sat, 1 Jun 2019 15:58:47 +0700 Subject: [PATCH 04/42] Adding required XML tag to sample templates Since Hugo 0.55.0 the XML declaration on XML and RSS files is not added automatically anymore. The samples should reflect that. --- content/en/templates/sitemap-template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 7cbc7cefb..27573fdbd 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -46,6 +46,7 @@ For multilingual sites, we also create a Sitemap index. You can provide a custom This template respects the version 0.9 of the [Sitemap Protocol](http://www.sitemaps.org/protocol.html). ```xml +{{ printf "" | safeHTML }} {{ range .Data.Pages }} @@ -81,6 +82,7 @@ on render. Please don't include this in the template as it's not valid HTML. This is used to create a Sitemap index in multilingual mode: ```xml +{{ printf "" | safeHTML }} {{ range . }} From 52211f65656659a1aabc066d7cc11e15f8035880 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com> Date: Sat, 1 Jun 2019 16:03:55 +0700 Subject: [PATCH 05/42] Remove note that XML declaration is not needed Because, ... see above. It is indeed needed since 0.55.0 ;) --- content/en/templates/sitemap-template.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/content/en/templates/sitemap-template.md b/content/en/templates/sitemap-template.md index 27573fdbd..9afc0d389 100644 --- a/content/en/templates/sitemap-template.md +++ b/content/en/templates/sitemap-template.md @@ -70,13 +70,6 @@ This template respects the version 0.9 of the [Sitemap Protocol](http://www.site ``` -{{% note %}} -Hugo will automatically add the following header line to this file -on render. Please don't include this in the template as it's not valid HTML. - -`` -{{% /note %}} - ## Hugo's sitemapindex.xml This is used to create a Sitemap index in multilingual mode: From 0a738467bf63b999a9ad14d68b00e36311c314d3 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com> Date: Sat, 1 Jun 2019 16:01:36 +0700 Subject: [PATCH 06/42] Adding required XML tag to sample templates Since Hugo 0.55.0 the XML declaration on XML and RSS files is not added automatically anymore. The samples should reflect that. --- content/en/templates/rss.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/content/en/templates/rss.md b/content/en/templates/rss.md index 715bc2a48..08049bfbd 100644 --- a/content/en/templates/rss.md +++ b/content/en/templates/rss.md @@ -58,6 +58,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.0 Specification][RSS 2.0]. ```xml +{{ printf "" | safeHTML }} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} @@ -86,13 +87,6 @@ This is the default RSS template that ships with Hugo. It adheres to the [RSS 2. ``` -{{% warning "XML Header" %}} -Hugo will automatically add the following header line to this file on render. Please do *not* include this in the template as it's not valid HTML. -``` - -``` -{{% /warning %}} - ## Reference your RSS Feed in `` In your `header.html` template, you can specify your RSS feed in your `` tag using Hugo's [Output Formats][Output Formats] like this: From af72acda03e71e44c19542abbb501f8e4d149417 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 3 Jun 2019 19:06:08 -0400 Subject: [PATCH 07/42] Fixes typo in fingerprint.md --- content/en/hugo-pipes/fingerprint.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/hugo-pipes/fingerprint.md b/content/en/hugo-pipes/fingerprint.md index 7aa3f100a..4f7aa6432 100755 --- a/content/en/hugo-pipes/fingerprint.md +++ b/content/en/hugo-pipes/fingerprint.md @@ -16,7 +16,7 @@ draft: false --- -Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerpint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function). +Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerprint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function). The default hash function is `sha256`. Other available functions are `sha384` (from Hugo `0.55`), `sha512` and `md5`. @@ -26,4 +26,4 @@ Any so processed asset will bear a `.Data.Integrity` property containing an inte {{ $js := resources.Get "js/global.js" }} {{ $secureJS := $js | resources.Fingerprint "sha512" }} -``` \ No newline at end of file +``` From edb7b36b0df3a2b6a48400f8e693d1509e2dea18 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com> Date: Thu, 3 Jan 2019 22:22:23 +0700 Subject: [PATCH 08/42] Link site hierarchy schema to larger version --- content/en/templates/lists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/lists.md b/content/en/templates/lists.md index 34c9e6d5a..5d6948a1f 100644 --- a/content/en/templates/lists.md +++ b/content/en/templates/lists.md @@ -35,7 +35,7 @@ For template lookup order, see [Template Lookup](/templates/lookup-order/). The idea of a list page comes from the [hierarchical mental model of the web][mentalmodel] and is best demonstrated visually: -![Image demonstrating a hierarchical website sitemap.](/images/site-hierarchy.svg) +[![Image demonstrating a hierarchical website sitemap.](/images/site-hierarchy.svg)](/images/site-hierarchy.svg) ## List Defaults From 01d0a6481d178103a11979efeeb7fcaf310d1f74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 5 Jun 2019 17:56:45 +0000 Subject: [PATCH 09/42] Bump js-yaml from 3.12.0 to 3.13.1 in /themes/gohugoioTheme Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1. - [Release notes](https://github.com/nodeca/js-yaml/releases) - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1) Signed-off-by: dependabot[bot] --- themes/gohugoioTheme/package-lock.json | 67 +++++++++++++++++--------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/themes/gohugoioTheme/package-lock.json b/themes/gohugoioTheme/package-lock.json index 1d6eea0fb..21e9dca15 100644 --- a/themes/gohugoioTheme/package-lock.json +++ b/themes/gohugoioTheme/package-lock.json @@ -431,7 +431,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -516,7 +516,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -529,7 +529,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -1119,7 +1119,7 @@ }, "color": { "version": "0.11.4", - "resolved": "http://registry.npmjs.org/color/-/color-0.11.4.tgz", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", "dev": true, "requires": { @@ -2236,7 +2236,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2257,12 +2258,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2277,17 +2280,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2404,7 +2410,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2416,6 +2423,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2430,6 +2438,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2437,12 +2446,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2461,6 +2472,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2541,7 +2553,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2553,6 +2566,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2638,7 +2652,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2674,6 +2689,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2693,6 +2709,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2736,12 +2753,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -3502,9 +3521,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -4846,7 +4865,7 @@ "dependencies": { "color": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/color/-/color-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz", "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", "dev": true, "requires": { @@ -4927,7 +4946,7 @@ "dependencies": { "color": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/color/-/color-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz", "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", "dev": true, "requires": { @@ -6038,7 +6057,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } @@ -6112,7 +6131,7 @@ }, "reduce-css-calc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", "dev": true, "requires": { @@ -7547,7 +7566,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7605,7 +7624,7 @@ }, "yargs": { "version": "1.2.6", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz", "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", "dev": true, "requires": { From 37e1101d3fd8076b22606a27b93b0cab49cdefd2 Mon Sep 17 00:00:00 2001 From: Anurag Goel Date: Thu, 21 Mar 2019 16:34:27 -0700 Subject: [PATCH 10/42] Add Render hosting guide --- .../hosting-on-render.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 content/en/hosting-and-deployment/hosting-on-render.md diff --git a/content/en/hosting-and-deployment/hosting-on-render.md b/content/en/hosting-and-deployment/hosting-on-render.md new file mode 100644 index 000000000..0d4e1cc19 --- /dev/null +++ b/content/en/hosting-and-deployment/hosting-on-render.md @@ -0,0 +1,97 @@ +--- +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-03-21 +publishdate: 2019-03-21 +lastmod: 2019-03-21 +categories: [hosting and deployment] +keywords: [render,hosting,deployment] +authors: [Anurag Goel] +menu: + docs: + parent: "hosting-and-deployment" + weight: 10 +weight: 10 +sections_weight: 10 +draft: false +aliases: [] +toc: true +--- + +## Introduction + +[Render](https://render.com) is a fully-managed cloud platform where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place. + +{{% note %}} +Sign up for Render using invite code `hugo` or the [Hugo invite link](https://render.com/i/hugo). +{{% /note %}} + +Static sites are **completely free** on Render and include the following: + +- Continuous, automatic builds & deploys from GitHub. +- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org). +- Instant cache invalidation with a lightning fast, global CDN. +- Unlimited collaborators. +- Unlimited [custom domains](https://render.com/docs/custom-domains). +- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites. +- Native HTTP/2 support. +- [Pull Request Previews](https://render.com/docs/pull-request-previews). +- Automatic HTTP → HTTPS redirects. +- Custom URL redirects and rewrites. + +## Assumptions + +* You have an account with GitHub. +* You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world. +* You have a Render account. You can sign up using invite code `hugo` or the [Hugo invite link](https://render.com/i/hugo). + +## Deployment + +You can set up a Hugo site on Render in two quick steps: + +1. Create a new **Web Service** on Render, and give Render permission to access your GitHub repo. +2. Use the following values during creation: + + Field | Value + ------------------- | ------------------- + **Environment** | `Static Site` + **Build Command** | `hugo --gc --minify` (or our own build command) + **Publish Directory** | `public` (or your own output directory) + +That's it! Your site will be live on your Render URL (which looks like `yoursite.onrender.com`) as soon as the build is done. + +## Continuous Deploys + +Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to GitHub. + +You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard. + +## CDN and Cache Invalidation + +Render hosts your site on a global, lightning fast CDN which ensures the fastest possible download times for all your users across the globe. + +Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site. + +## Custom Domains + +Add your own domains to your site easily using Render's [custom domains](https://render.com/docs/custom-domains) guide. + +## Pull Request Previews + +With Pull Request (PR) previews, you can visualize changes introduced in a pull request instead of simply relying on code reviews. + +Once enabled, every PR for your site will automatically generate a new static site based on the code in the PR. It will have its own URL, and it will be deleted automatically when the PR is closed. + +Read more about [Pull Request Previews](https://render.com/docs/pull-request-previews) on Render. + +## Hugo Themes + +Render automatically downloads all Git submodules defined in your Git repo on every build. This way Hugo themes added as submodules work as expected. + +## Support + +Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help. + + +[Quick Start]: /getting-started/quick-start/ From f4e24a03e4e0b248ac9c1a30447edb070b57d884 Mon Sep 17 00:00:00 2001 From: Anurag Goel Date: Thu, 6 Jun 2019 15:56:42 -0700 Subject: [PATCH 11/42] Render launched; no invite code needed --- .../en/hosting-and-deployment/hosting-on-render.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/content/en/hosting-and-deployment/hosting-on-render.md b/content/en/hosting-and-deployment/hosting-on-render.md index 0d4e1cc19..c8fceea7c 100644 --- a/content/en/hosting-and-deployment/hosting-on-render.md +++ b/content/en/hosting-and-deployment/hosting-on-render.md @@ -2,9 +2,9 @@ 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-03-21 -publishdate: 2019-03-21 -lastmod: 2019-03-21 +date: 2019-06-06 +publishdate: 2019-06-06 +lastmod: 2019-06-21 categories: [hosting and deployment] keywords: [render,hosting,deployment] authors: [Anurag Goel] @@ -23,10 +23,6 @@ toc: true [Render](https://render.com) is a fully-managed cloud platform where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place. -{{% note %}} -Sign up for Render using invite code `hugo` or the [Hugo invite link](https://render.com/i/hugo). -{{% /note %}} - Static sites are **completely free** on Render and include the following: - Continuous, automatic builds & deploys from GitHub. @@ -44,7 +40,7 @@ Static sites are **completely free** on Render and include the following: * You have an account with GitHub. * You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world. -* You have a Render account. You can sign up using invite code `hugo` or the [Hugo invite link](https://render.com/i/hugo). +* You have a Render account. You can sign up at https://render.com/register. ## Deployment From 424c0207ad00cb29b78f5c55204898b3c1f545d4 Mon Sep 17 00:00:00 2001 From: invzhi Date: Sat, 8 Jun 2019 17:29:27 +0800 Subject: [PATCH 12/42] baseurl -> baseURL --- content/en/content-management/organization/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/content-management/organization/index.md b/content/en/content-management/organization/index.md index e9ae91b57..c12e07c26 100644 --- a/content/en/content-management/organization/index.md +++ b/content/en/content-management/organization/index.md @@ -60,7 +60,7 @@ Without any additional configuration, the following will just work: ## Path Breakdown in Hugo -The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseurl = "https://example.com"` in your [site's configuration file][config]. +The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.com"` in your [site's configuration file][config]. ### Index Pages: `_index.md` From f71b67f34f4dc5b075a0c9ab0f8e482be2fd7f9e Mon Sep 17 00:00:00 2001 From: Avery <5616307+genderquery@users.noreply.github.com> Date: Sun, 9 Jun 2019 20:03:34 -0700 Subject: [PATCH 13/42] Correct typo "RFC339" to "RFC1123Z" (#837) * Correct typo "RFC339" to "RFC1123Z" Per discussion in PR #887, I added a link to the Go time package documentation that lists constants that can serve as further examples. --- content/en/functions/format.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/en/functions/format.md b/content/en/functions/format.md index fef4d85da..cdcec2fb3 100644 --- a/content/en/functions/format.md +++ b/content/en/functions/format.md @@ -87,9 +87,11 @@ date: 2017-03-03T14:15:59-06:00 `"Mon, 02 Jan 2006 15:04:05 MST"` (RFC1123) : **Returns**: `Fri, 03 Mar 2017 14:15:59 CST` -`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC339) +`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC1123Z) : **Returns**: `Fri, 03 Mar 2017 14:15:59 -0600` +More examples can be found in Go's [documentation for the time package][timeconst]. + ### Cardinal Numbers and Ordinal Abbreviations Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently supported: @@ -121,3 +123,4 @@ In conjunction with the [`dateFormat` function][dateFormat], you can also conver [gdex]: https://golang.org/pkg/time/#example_Time_Format [pagevars]: /variables/page/ [time]: https://golang.org/pkg/time/ +[timeconst]: https://golang.org/pkg/time/#ANSIC From 77f74ced56c0a12579233a3f1ced525c47a16b2d Mon Sep 17 00:00:00 2001 From: Brian Pond Date: Tue, 11 Jun 2019 07:00:31 -0700 Subject: [PATCH 14/42] fix: typo in output-formats.md Correct sentence for clarity. --- content/en/templates/output-formats.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/output-formats.md b/content/en/templates/output-formats.md index 1ab45e4c7..487661f5a 100644 --- a/content/en/templates/output-formats.md +++ b/content/en/templates/output-formats.md @@ -47,7 +47,7 @@ To add or modify a media type, define it in a `mediaTypes` section in your [site The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type. -**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the output format. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`: +**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`: ```toml [mediaTypes] From 0edbd59c48d7bb3c42595424ae73817b91f8c08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mass=C3=A9?= Date: Fri, 19 Apr 2019 11:40:58 +0200 Subject: [PATCH 15/42] add warning about .Hugo variable being deprecated --- content/en/variables/hugo.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/en/variables/hugo.md b/content/en/variables/hugo.md index a563831ff..4e394dfbf 100644 --- a/content/en/variables/hugo.md +++ b/content/en/variables/hugo.md @@ -19,6 +19,11 @@ toc: false wip: false --- +{{% warning "Deprecated" %}} +Page's `.Hugo` is deprecated and will be removed in a future release. Use the global `hugo` function. +For example: `hugo.Generator`. +{{% /warning %}} + It contains the following fields: .Hugo.Generator From 7145e29e2489a930bb9292058e57f767d31c10f5 Mon Sep 17 00:00:00 2001 From: Bogdan Guna Date: Fri, 7 Jun 2019 14:40:47 +0100 Subject: [PATCH 16/42] Fixes bad URL in menus.md for .hasChildren * part of issue #814 --- content/en/variables/menus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/variables/menus.md b/content/en/variables/menus.md index 69d46ca2b..6717fecbb 100644 --- a/content/en/variables/menus.md +++ b/content/en/variables/menus.md @@ -84,7 +84,7 @@ entries, if any, under the current menu entry. Menus also have the following functions available: -[.HasChildren](/functions/haschildren/) +.HasChildren : _boolean_
Returns `true` if `.Children` is non-nil. From 08c9f8fc8983cfebccb32b2c4d89b215527ef06b Mon Sep 17 00:00:00 2001 From: Annie-Claude Morin Date: Fri, 21 Dec 2018 11:48:16 -0500 Subject: [PATCH 17/42] Mention 1 MB file size limit in readFile doc The code has a hard coded limit of 1 MB in https://github.com/gohugoio/hugo/blob/master/tpl/os/os.go#L68 Now it's in the documentation too. --- content/en/functions/readfile.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/functions/readfile.md b/content/en/functions/readfile.md index bcd845c96..ca7f23075 100644 --- a/content/en/functions/readfile.md +++ b/content/en/functions/readfile.md @@ -28,6 +28,8 @@ So, if you have a file with the name `README.txt` in the root of your project wi If you receive a "file doesn't exist" error with a path listed, do take note that the path is the last one checked by the function, and may not accurately reflect your target. You should generally double-check your path for mistakes. +Note that there is a 1 MB file size limit. + For more information on using `readDir` and `readFile` in your templates, see [Local File Templates][local]. [local]: /templates/files/ From bc962fbdfaf0f6cb00b0be5a558cf73ce6973f17 Mon Sep 17 00:00:00 2001 From: Gucccii Date: Thu, 13 Jun 2019 08:26:17 -0700 Subject: [PATCH 18/42] Updated installing.md file to include linuxbrew installation * Updated installing.md file to include linuxbrew installation * fix typo --- content/en/getting-started/installing.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/en/getting-started/installing.md b/content/en/getting-started/installing.md index e73511c5b..0b08e87a4 100644 --- a/content/en/getting-started/installing.md +++ b/content/en/getting-started/installing.md @@ -54,6 +54,16 @@ brew install hugo For more detailed explanations, read the installation guides that follow for installing on macOS and Windows. +### Linuxbrew (Linux) + +If you are on Linux and using [Linuxbrew][linuxbrew], you can install Hugo with the following one-liner: + +{{< code file="install-with-linuxbrew.sh" >}} +brew install hugo +{{< /code >}} + +Installation guides for Linuxbrew are avaliable on their [website][linuxbrew]. + ### Chocolatey (Windows) If you are on a Windows machine and use [Chocolatey][] for package management, you can install Hugo with the following one-liner: @@ -507,6 +517,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp [highlight shortcode]: /content-management/shortcodes/#highlight [installgit]: http://git-scm.com/ [installgo]: https://golang.org/dl/ +[linuxbrew]: https://linuxbrew.sh/ [Path Editor]: https://patheditor2.codeplex.com/ [pygments]: http://pygments.org [quickstart]: /getting-started/quick-start/ From be825ade943f2592cc265e55494f7e24631f6d9f Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Thu, 6 Dec 2018 14:13:44 -0500 Subject: [PATCH 19/42] Videos plural produces og:video --- content/en/templates/internal.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/en/templates/internal.md b/content/en/templates/internal.md index fdec63c57..fc64dfa51 100644 --- a/content/en/templates/internal.md +++ b/content/en/templates/internal.md @@ -137,7 +137,7 @@ description = "Text about this post" date = "2006-01-02" images = ["post-cover.png"] audio = [] -video = [] +videos = [] series = [] tags = [] {{}} @@ -147,10 +147,12 @@ The first 6 URLs from the `images` array are used for image metadata. Various optional metadata can also be set: - Date, published date, and last modified data are used to set the published time metadata if specified. -- `audio` and `video` are URL arrays like `images` for the audio and video metadata tags, respectively. +- `audio` and `videos` are URL arrays like `images` for the audio and video metadata tags, respectively. - The first 6 `tags` on the page are used for the tags metadata. - The `series` taxonomy is used to specify related "see also" pages by placing them in the same series. +If using youtube this will produce a og:video tag like . If using a youtube link make sure this is in **https://www.youtube.com/v/NlXVWtgLNjY** not __https://www.youtube.com/watch?v=NlXVWtgLNjY__ + ### Use the Open Graph Template To add Open Graph metadata, include the following line between the `` tags in your templates: From f01dc555dffae2a9681cda4f6a11db9520f95332 Mon Sep 17 00:00:00 2001 From: Mihira Jayasekera Date: Sun, 23 Dec 2018 02:12:32 -0800 Subject: [PATCH 20/42] Correct some typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note that I changed the reading time example for pluralization from ‘One minute read’ to ‘One minute _to_ read’ because, in common US usage at least, this might properly be punctuated as ‘One-minute read’, and longer would be handled like ‘12-minute read’ (not ‘12 minutes read’), so it actually wouldn’t make a good example for demonstraing single and plural forms. By adding ‘to’, though, the example aligns with common US usage while also serving as an example of single and plural forms. Closes #694 --- content/en/content-management/multilingual.md | 73 +++++++++---------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index bd9bd97d7..49565d948 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -49,7 +49,7 @@ linkedin = "https://linkedin.com/fr/whoever" help = "Aide" {{< /code-toggle >}} -Anything not defined in a `[languages]` block will fall back to the global value for that key (e.g., `copyright` for the English [`en`] language). This also works for `params`, as demonstrated with `help` above: you will get the value `Aide` in French and `Help` in all the languages without this parameter set. +Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated witgh `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set. With the configuration above, all content, sitemap, RSS feeds, paginations, and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French. @@ -159,7 +159,7 @@ plaque = "plaques" ## Translate Your Content -There are two ways to manage your content translation, both ensures each page is assigned a language and linked to its translations. +There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations. ### Translation by filename @@ -168,17 +168,17 @@ Considering the following example: 1. `/content/about.en.md` 2. `/content/about.fr.md` -The first file is assigned the english language and linked to the second. -The second file is assigned the french language and linked to the first. +The first file is assigned the English language and is linked to the second. +The second file is assigned the French language and is linked to the first. -Their language is __assigned__ according to the language code added as __suffix to the filename__. +Their language is __assigned__ according to the language code added as a __suffix to the filename__. By having the same **path and base filename**, the content pieces are __linked__ together as translated pages. + {{< note >}} - -If a file is missing any language code, it will be assigned the default language. - +If a file has no language code, it will be assigned the default language. {{}} + ### Translation by content directory This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param. @@ -190,22 +190,22 @@ languages: weight: 10 languageName: "English" contentDir: "content/english" - nn: + fr: weight: 20 languageName: "Français" contentDir: "content/french" {{< /code-toggle >}} -The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content directories cannot overlap. +The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap. Considering the following example in conjunction with the configuration above: 1. `/content/english/about.md` 2. `/content/french/about.md` -The first file is assigned the english language and is linked to the second. -
The second file is assigned the french language and is linked to the first. +The first file is assigned the English language and is linked to the second. +The second file is assigned the French language and is linked to the first. Their language is __assigned__ according to the content directory they are __placed__ in. @@ -213,7 +213,7 @@ By having the same **path and basename** (relative to their language content dir ### Bypassing default linking. -Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location. +Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location. Considering the following example: @@ -231,11 +231,11 @@ By setting the `translationKey` front matter param to `about` in all three pages ### Localizing permalinks -Because paths and filenames are used to handle linking, all translated pages, except for the language part, will be sharing the same url. +Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory). To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file. -For example, a french translation (`content/about.fr.md`) can have its own localized slug. +For example, a French translation (`content/about.fr.md`) can have its own localized slug. {{< code-toggle >}} Title: A Propos @@ -243,9 +243,10 @@ slug: "a-propos" {{< /code-toggle >}} -At render, Hugo will build both `/about/` and `fr/a-propos/` while maintaning their translation linking. +At render, Hugo will build both `/about/` and `/fr/a-propos/` while maintaining their translation linking. + {{% note %}} -If using `url`, remember to include the language part as well: `fr/compagnie/a-propos/`. +If using `url`, remember to include the language part as well: `/fr/compagnie/a-propos/`. {{%/ note %}} ### Page Bundles @@ -254,15 +255,13 @@ To avoid the burden of having to duplicate files, each Page Bundle inherits the Therefore, from within a template, the page will have access to the files from all linked pages' bundles. -If, across the linked bundles, two or more files share the same basenname, only one will be included and chosen as follows: +If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows: -* File from current language Bundle, if present. +* File from current language bundle, if present. * First file found across bundles by order of language `Weight`. {{% note %}} - -Page Bundle's resources follow the same language assignement logic as content files, be it by filename (`image.jpg`, `image.fr.jpg`) or by directory (`english/about/header.jpg`, `french/about/header.jpg`). - +Page Bundle resources follow the same language assignment logic as content files, both by filename (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`). {{%/ note %}} ## Reference the Translated Content @@ -277,18 +276,18 @@ To create a list of links to translated content, use a template similar to the f
  • {{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}
  • - {{ end}} + {{ end }} {{ end }} {{< /code >}} -The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, be it for a [single content page][contenttemplate] or the [homepage][]. It will not print anything if there are no translations for a given page. +The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage][]. It will not print anything if there are no translations for a given page. The above also uses the [`i18n` function][i18func] described in the next section. ### List All Available Languages -`.AllTranslations` on a `Page` can be used to list all translations, including itself. Called on the home page it can be used to build a language navigator: +`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator: {{< code file="layouts/partials/allLanguages.html" >}} @@ -306,7 +305,7 @@ Hugo uses [go-i18n][] to support string translations. [See the project's source Translations are collected from the `themes//i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646][] with names such as `en-US.toml`, `fr.toml`, etc. {{% note %}} -From **Hugo 0.31** you no longer need to use a valid language code. It _can be_ anything. +From **Hugo 0.31** you no longer need to use a valid language code. It can be anything. See https://github.com/gohugoio/hugo/issues/3564 @@ -341,8 +340,8 @@ An example of singular and plural form: ``` [readingTime] -one = "One minute read" -other = "{{.Count}} minutes read" +one = "One minute to read" +other = "{{.Count}} minutes to read" ``` And then in the template: @@ -352,7 +351,7 @@ And then in the template: ## Customize Dates -At the time of this writing, Go does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content: +At the time of this writing, Go does not yet have support for internationalized locales for dates, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content: ~~~yaml 1: "janvier" @@ -369,10 +368,10 @@ At the time of this writing, Go does not yet have support for internationalized 12: "décembre" ~~~ -... then index the non-English date names in your templates like so: +...then index the non-English date names in your templates like so: ~~~html -