Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-07-06 18:53:17 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-07-06 18:53:17 +0300
commit0efd374805ac49a0e6513c707520fc2f6f238afc (patch)
treea8c6a8862574bc41b7f60eeda8679c4cd70a79a2 /docs
parent2b8d907ab731627f4e2a30442cd729064516c8bb (diff)
parent98293eaa1570b5aff4452021c8b6d6c8560b3f06 (diff)
Merge commit '98293eaa1570b5aff4452021c8b6d6c8560b3f06'
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/about/hugo-and-gdpr.md19
-rw-r--r--docs/content/en/content-management/multilingual.md130
-rw-r--r--docs/content/en/content-management/shortcodes.md5
-rw-r--r--docs/content/en/content-management/syntax-highlighting.md8
-rw-r--r--docs/content/en/functions/errorf.md11
-rw-r--r--docs/content/en/getting-started/usage.md2
-rw-r--r--docs/content/en/news/0.42-relnotes/featured-hugo-42-poster.pngbin0 -> 74852 bytes
-rw-r--r--docs/content/en/news/0.42-relnotes/index.md4
-rw-r--r--docs/content/en/news/0.42.1-relnotes/index.md4
-rw-r--r--docs/content/en/news/0.42.2-relnotes/index.md7
-rw-r--r--docs/content/en/news/lets-celebrate-hugos-5th-birthday/featured.pngbin0 -> 179291 bytes
-rw-r--r--docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-stars.pngbin0 -> 15599 bytes
-rw-r--r--docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-themes.pngbin0 -> 16956 bytes
-rw-r--r--docs/content/en/news/lets-celebrate-hugos-5th-birthday/index.md108
-rw-r--r--docs/content/en/news/lets-celebrate-hugos-5th-birthday/sunset-get.pngbin0 -> 387442 bytes
-rw-r--r--docs/content/en/templates/lookup-order.md4
-rw-r--r--docs/content/en/themes/theme-components.md8
-rw-r--r--docs/layouts/shortcodes/imgproc.html6
-rw-r--r--docs/netlify.toml10
-rw-r--r--docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_480x0_resize_catmullrom_2.pngbin0 -> 32730 bytes
-rw-r--r--docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_640x0_resize_catmullrom_2.pngbin0 -> 52600 bytes
-rw-r--r--docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_480x0_resize_catmullrom_2.pngbin0 -> 60638 bytes
-rw-r--r--docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_640x0_resize_catmullrom_2.pngbin0 -> 88936 bytes
-rw-r--r--docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-stars_hu169ba15a8bcaf4ddd6a5a1aa8505c448_15599_600x400_fit_catmullrom_2.pngbin0 -> 24246 bytes
-rw-r--r--docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-themes_hu25707bee0ec3007199f71bb29226f30c_16956_600x400_fit_catmullrom_2.pngbin0 -> 26574 bytes
-rw-r--r--docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.pngbin0 -> 104931 bytes
26 files changed, 270 insertions, 56 deletions
diff --git a/docs/content/en/about/hugo-and-gdpr.md b/docs/content/en/about/hugo-and-gdpr.md
index 0a95e602d..15352ae7c 100644
--- a/docs/content/en/about/hugo-and-gdpr.md
+++ b/docs/content/en/about/hugo-and-gdpr.md
@@ -49,8 +49,10 @@ simple = false
[privacy.twitter]
disable = false
enableDNT = false
+simple = false
[privacy.vimeo]
disable = false
+simple = false
[privacy.youtube]
disable = false
privacyEnhanced = false
@@ -108,8 +110,25 @@ disableInlineCSS = true
enableDNT
: Enabling this for the twitter/tweet shortcode, the tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.
+simple
+: If simple mode is enabled, a static and no-JS version of a tweet will be built.
+
+
+**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inlines styles provided by Hugo:
+
+ {{< code-toggle file="config">}}
+[services]
+[services.twitter]
+disableInlineCSS = true
+{{< /code-toggle >}}
+
### YouTube
privacyEnhanced
: When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless the user plays the embedded video.
+### Vimeo
+
+simple
+: If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.
+
diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md
index 34dafaa30..5894a16e5 100644
--- a/docs/content/en/content-management/multilingual.md
+++ b/docs/content/en/content-management/multilingual.md
@@ -35,14 +35,13 @@ help = "Help"
title = "My blog"
weight = 1
[languages.en.params]
-linkedin = "english-link"
+linkedin = "https://linkedin.com/whoever"
[languages.fr]
-copyright = "Tout est à moi"
-title = "Mon blog"
+title = "Mon blogue"
weight = 2
[languages.fr.params]
-linkedin = "lien-francais"
+linkedin = "https://linkedin.com/fr/whoever"
[languages.fr.params.navigation]
help = "Aide"
{{< /code-toggle >}}
@@ -55,11 +54,13 @@ and taxonomy pages will be rendered below `/` in English (your default content l
When working with front matter `Params` in [single page templates][singles], omit the `params` in the key for the translation.
-If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true`.
+`defaultContentLanguage` sets the project's default language. If not set, the default language will be `en`.
+
+If the default language needs to be rendererd below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
-## Disable a Language
+### Disable a Language
You can disable one or more languages. This can be useful when working on a new translation.
@@ -81,7 +82,7 @@ HUGO_DISABLELANGUAGES=" " hugo server
```
-## Configure Multilingual Multihost
+### Configure Multilingual Multihost
From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details.
@@ -94,11 +95,11 @@ Example:
{{< code-toggle file="config" >}}
[languages]
-[languages.no]
-baseURL = "https://example.no"
-languageName = "Norsk"
+[languages.fr]
+baseURL = "https://example.fr"
+languageName = "Français"
weight = 1
-title = "På norsk"
+title = "En Français"
[languages.en]
baseURL = "https://example.com"
@@ -127,7 +128,7 @@ Press Ctrl+C to stop
Live reload and `--navigateToChanged` between the servers work as expected.
-## Taxonomies and Blackfriday
+### Taxonomies and Blackfriday
Taxonomies and [Blackfriday configuration][config] can also be set per language:
@@ -156,40 +157,113 @@ plaque = "plaques"
## Translate Your Content
-Translated articles are identified by the name of the content file.
+There are two ways to manage your content translation, both ensures each page is assigned a language and linked to its translations.
+
+### Translation by filename
-### Examples of Translated Articles
+Considering the following example:
1. `/content/about.en.md`
2. `/content/about.fr.md`
-In this example, the `about.md` will be assigned the configured `defaultContentLanguage`.
+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.
-1. `/content/about.md`
-2. `/content/about.fr.md`
+Their language is __assigned__ according to the language code added as __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.
+
+{{</ note >}}
+### 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.
+
+{{< code-toggle file="config" >}}
+
+languages:
+ en:
+ weight: 10
+ languageName: "English"
+ contentDir: "content/english"
+ nn:
+ 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.
+
+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.
+<br>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.
+
+By having the same **path and basename** (relative to their language content directory), the content pieces are __linked__ together as translated pages.
-This way, you can slowly start to translate your current content without having to rename everything. If left unspecified, the default value for `defaultContentLanguage` is `en`.
+### Bypassing default linking.
-By having the same **directory and base filename**, the content pieces are linked together as translated pieces.
+Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location.
-You can also set the key used to link the translations explicitly in front matter:
+Considering the following example:
+
+1. `/content/about-us.en.md`
+2. `/content/om.nn.md`
+3. `/content/presentation/a-propos.fr.md`
```yaml
-translationKey: "my-story"
+# set in all three pages
+translationKey: "about"
```
-If you need distinct URLs per language, you can set the slug in the non-default language file. For example, you can define a custom slug for a French translation in the front matter of `content/about.fr.md` as follows:
+By setting the `translationKey` front matter param to `about` in all three pages, they will be __linked__ as translated pages.
-```yaml
+
+### 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.
+
+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.
+
+{{< code-toggle >}}
+Title: A Propos
slug: "a-propos"
+{{< /code-toggle >}}
-```
-At render, Hugo will build both `/about/` and `/a-propos/` as properly linked translated pages.
+At render, Hugo will build both `/about/` and `fr/a-propos/` while maintaning their translation linking.
+{{% note %}}
+If using `url`, remember to include the language part as well: `fr/compagnie/a-propos/`.
+{{%/ note %}}
-For merging of content from other languages (i.e. missing content translations), see [lang.Merge](/functions/lang.merge/).
+### Page Bundles
+
+To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (markdown files, html files etc...).
+
+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:
+
+* 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`).
+
+{{%/ note %}}
-## Link to Translated Content
+## Reference the Translated Content
To create a list of links to translated content, use a template similar to the following:
@@ -210,7 +284,7 @@ The above can be put in a `partial` (i.e., inside `layouts/partials/`) and inclu
The above also uses the [`i18n` function][i18func] described in the next section.
-## List All Available Languages
+### 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:
diff --git a/docs/content/en/content-management/shortcodes.md b/docs/content/en/content-management/shortcodes.md
index edb7168cc..0116078f4 100644
--- a/docs/content/en/content-management/shortcodes.md
+++ b/docs/content/en/content-management/shortcodes.md
@@ -374,6 +374,10 @@ Using the preceding `youtube` example (without `autoplay="true"`), the following
{{< youtube w7Ft2ymGmfc >}}
+## Privacy Config
+
+To learn how to configure your Hugo site to meet the new EU privacy regulation, see [Hugo and the GDPR][].
+
## Create Custom Shortcodes
To learn more about creating custom shortcodes, see the [shortcode template documentation][].
@@ -382,6 +386,7 @@ To learn more about creating custom shortcodes, see the [shortcode template docu
[contentmanagementsection]: /content-management/formats/
[examplegist]: https://gist.github.com/spf13/7896402
[figureelement]: http://html5doctor.com/the-figure-figcaption-elements/ "An article from HTML5 doctor discussing the fig and figcaption elements."
+[Hugo and the GDPR]: /about/hugo-and-gdpr/
[Instagram]: https://www.instagram.com/
[pagevariables]: /variables/page/
[partials]: /templates/partials/
diff --git a/docs/content/en/content-management/syntax-highlighting.md b/docs/content/en/content-management/syntax-highlighting.md
index 517968e3c..4576624d0 100644
--- a/docs/content/en/content-management/syntax-highlighting.md
+++ b/docs/content/en/content-management/syntax-highlighting.md
@@ -72,7 +72,13 @@ pygmentsCodefences
: Set to true to enable syntax highlighting in code fences with a language tag in markdown (see below for an example).
pygmentsStyle
-: The style of code highlighting. See https://help.farbox.com/pygments.html for a gallery. Note that this option is not relevant when `pygmentsUseClasses` is set.
+: The style of code highlighting. Note that this option is not
+ relevant when `pygmentsUseClasses` is set.
+
+ Syntax highlighting galleries:
+ **Chroma** ([short snippets](https://xyproto.github.io/splash/docs/all.html),
+ [long snippets](https://xyproto.github.io/splash/docs/longer/all.html)),
+ [Pygments](https://help.farbox.com/pygments.html)
pygmentsUseClasses
: Set to `true` to use CSS classes to format your highlighted code. See [Generate Syntax Highlighter CSS](#generate-syntax-highlighter-css).
diff --git a/docs/content/en/functions/errorf.md b/docs/content/en/functions/errorf.md
index 9105ff840..73c13da09 100644
--- a/docs/content/en/functions/errorf.md
+++ b/docs/content/en/functions/errorf.md
@@ -1,7 +1,7 @@
---
title: errorf
linktitle: errorf
-description: Evaluates a format string and logs it to ERROR.
+description: Log ERROR and fail the build from the templates.
date: 2017-09-30
publishdate: 2017-09-30
lastmod: 2017-09-30
@@ -18,9 +18,12 @@ deprecated: false
aliases: []
---
-`errorf` will evaluate a format string, then output the result to the ERROR log.
-This will also cause the build to fail.
+`errorf` will evaluate a format string, then output the result to the ERROR log (and only once per error message to avoid flooding the log).
+
+This will also cause the build to fail (the `hugo` command will `exit -1`).
```
-{{ errorf "Something went horribly wrong! %s" err }}
+{{ errorf "Failed to handle page %q" .Path }}
```
+
+Note that `errorf` supports all the formatting verbs of the [fmt](https://golang.org/pkg/fmt/) package.
diff --git a/docs/content/en/getting-started/usage.md b/docs/content/en/getting-started/usage.md
index 2ad2910f8..7bbd59564 100644
--- a/docs/content/en/getting-started/usage.md
+++ b/docs/content/en/getting-started/usage.md
@@ -104,7 +104,7 @@ The most common usage is probably to run `hugo` with your current directory bein
This generates your website to the `public/` directory by default, although you can customize the output directory in your [site configuration][config] by changing the `publishDir` field.
-The site Hugo renders into `public/` is ready to be deployed to your web server:
+The command `hugo` renders your site into `public/` dir and is ready to be deployed to your web server:
```
hugo
diff --git a/docs/content/en/news/0.42-relnotes/featured-hugo-42-poster.png b/docs/content/en/news/0.42-relnotes/featured-hugo-42-poster.png
new file mode 100644
index 000000000..1f1cab1f1
--- /dev/null
+++ b/docs/content/en/news/0.42-relnotes/featured-hugo-42-poster.png
Binary files differ
diff --git a/docs/content/en/news/0.42-relnotes/index.md b/docs/content/en/news/0.42-relnotes/index.md
index 67bbce4fc..c3f99d313 100644
--- a/docs/content/en/news/0.42-relnotes/index.md
+++ b/docs/content/en/news/0.42-relnotes/index.md
@@ -1,8 +1,8 @@
---
date: 2018-06-12
-title: "0.42"
-description: "0.42"
+title: "Hugo 0.42: Theme Composition and Inheritance!"
+description: "Hugo 0.42 adds Theme Components support, a new and powerful way of composing your Hugo sites."
categories: ["Releases"]
---
diff --git a/docs/content/en/news/0.42.1-relnotes/index.md b/docs/content/en/news/0.42.1-relnotes/index.md
index 581444172..6b5b3c775 100644
--- a/docs/content/en/news/0.42.1-relnotes/index.md
+++ b/docs/content/en/news/0.42.1-relnotes/index.md
@@ -1,8 +1,8 @@
---
date: 2018-06-13
-title: "0.42.1"
-description: "0.42.1"
+title: "Hugo 0.42.1: Two Bug Fixes"
+description: "Hugo 0.42.1 fixes two issues."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
diff --git a/docs/content/en/news/0.42.2-relnotes/index.md b/docs/content/en/news/0.42.2-relnotes/index.md
index f680b560f..c9bf6c469 100644
--- a/docs/content/en/news/0.42.2-relnotes/index.md
+++ b/docs/content/en/news/0.42.2-relnotes/index.md
@@ -1,17 +1,16 @@
---
date: 2018-06-28
-title: "0.42.2"
-description: "0.42.2"
+title: "Hugo 0.42.2: One Bug Fix"
+description: "Hugo 0.42.2 fixes server reload on config changes."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
-
- This release fixe broken server-reload on config changes. This is a regression from Hugo `0.42`. [3a7706b0](https://github.com/gohugoio/hugo/commit/3a7706b069107e5fa6112b3f7ce006f16867cb38) [@bep](https://github.com/bep) [#4878](https://github.com/gohugoio/hugo/issues/4878)
+ This release fixes broken server-reload on config changes. This is a regression from Hugo `0.42`. [3a7706b0](https://github.com/gohugoio/hugo/commit/3a7706b069107e5fa6112b3f7ce006f16867cb38) [@bep](https://github.com/bep) [#4878](https://github.com/gohugoio/hugo/issues/4878)
diff --git a/docs/content/en/news/lets-celebrate-hugos-5th-birthday/featured.png b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/featured.png
new file mode 100644
index 000000000..4c31412fd
--- /dev/null
+++ b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/featured.png
Binary files differ
diff --git a/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-stars.png b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-stars.png
new file mode 100644
index 000000000..00848fcf0
--- /dev/null
+++ b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-stars.png
Binary files differ
diff --git a/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-themes.png b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-themes.png
new file mode 100644
index 000000000..0d4dfd599
--- /dev/null
+++ b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/graph-themes.png
Binary files differ
diff --git a/docs/content/en/news/lets-celebrate-hugos-5th-birthday/index.md b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/index.md
new file mode 100644
index 000000000..a06d535d5
--- /dev/null
+++ b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/index.md
@@ -0,0 +1,108 @@
+---
+date: 2018-07-04
+title: "Let’s celebrate Hugo’s 5th birthday"
+description: "How a side project became one of the most popular frameworks for building websites."
+categories: [blog]
+author: bep
+---
+
+_By Bjørn Erik Pedersen ([@bepsays](https://twitter.com/bepsays) / [@bep](https://github.com/bep)), Hugo Lead_
+
+**Five years ago today, [Steve Francia](https://github.com/spf13/) made his [first commit](https://github.com/gohugoio/hugo/commit/50a1d6f3f155ab837310e00ffb309a9199773c73
+) on the Hugo project: "Hugo: A Fast and Flexible Static Site Generator built with love by spf13 in GoLang".**
+
+Steve was writing that on a train commute to New York. I'm writing this article running Hugo `v0.43-DEV`, the preview version of the next Hugo release. The release is scheduled for Monday and adds a powerful [assets pipeline](https://github.com/gohugoio/hugo/issues/4854#issue-333062459), with SCSS/SASS support, assets minification, fingerprinting/subresource integrity, ad-hoc image processing and much more.
+
+**I cannot remember the last time I was this excited about a Hugo release. "Game changer" may be too strong, but it makes for a really nice integrated website design-workflow that, with Hugo's build speed, is hard to beat.**
+
+{{< imgproc sunset Fill "600x300" >}}
+Fetch and scale an image in the upcoming Hugo 0.43.
+{{< /imgproc >}}
+
+But that is a release for Monday. Now is a time to look at the current status of Hugo after the first five years.
+
+## Hugo in Numbers
+
+According to [BuiltWith](https://trends.builtwith.com/cms/Hugo), more than 29 000 live websites are built with Hugo. Of those, 390 are in the top 1 million. Wappalyzer [reports](https://www.wappalyzer.com/categories/static-site-generator) that Hugo serves almost 50% of the static sites.
+
+Hugo is big in the [public sector](https://discourse.gohugo.io/t/hugo-in-public-administration/8792), with the US Government as a prominent user. Some examples are [vote.gov](https://vote.gov/) and [digital.gov](https://digital.gov/).
+
+[Smashing Magazine](https://www.smashingmagazine.com/) is a big and very popular Hugo site. It is [reported](https://discourse.gohugo.io/t/smashing-magazine-s-redesign-powered-by-hugo-jamstack/5826/7) that they build their complex site with 7500 content pages in 13 seconds.
+
+Some other example sites are [kubernetes.io](https://kubernetes.io/), [letsencrypt.org](https://gohugo.io/showcase/letsencrypt/), [support.1password.com](http://gohugo.io/showcase/1password-support/), [netlify.com](https://www.netlify.com), [litecoin.org](https://litecoin.org/), and [forestry.io](https://forestry.io/).
+
+
+{{< imgproc graph-stars Fit "600x400" >}}
+Number of GitHub stars in relation to the Hugo release dates.
+{{< /imgproc >}}
+
+More numbers:
+
+* 26800+ [stars](https://github.com/gohugoio/hugo/stargazers) on GitHub.
+* 444+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) to the Hugo source repository, 654+ to [Hugo Docs](https://github.com/gohugoio/hugoDocs/graphs/contributors). [@bep](https://github.com/bep) is the most active with around 70% of the current code base (line count).
+* 235+ [themes](https://themes.gohugo.io/)
+* 50% increase in the number of user sessions on the [gohugo.io](https://gohugo.io/) web sites the last 12 months.[^2]
+* Hugo build release binaries for [a myriad](https://github.com/gohugoio/hugo/releases/tag/v0.42.2) of platforms. And since it can also be installed from Chocolatey on Windows, Brew on MacOs, Snap on Linux and `apt-get` on Debian/Ubuntu, it is impossible to give accurate download numbers. But the number is not small.
+
+## Hugo Next
+
+We're not finished with Hugo, but Hugo `0.43` very nicely wraps up the first five years. It started out as a small and fast static site generator. It is now [even faster](https://forestry.io/blog/hugo-vs-jekyll-benchmark/), and now so loaded with features that it has grown out of being just a "static site generator". It is a _framework for building websites_.
+
+My interest in Hugo started on the Sunday when I moved my blog, [bepsays.com](https://bepsays.com/en/), twice. The second static generator choice of that day, Hugo, was a good match. I remember Steve being very enthusiastic about getting patches with fixes and enhancements, and I was eventually taken over by the simplicity and power of Go, the programming language, and started to implement lots of new features.
+
+My goal with all of this, if there is one, is to get a single binary with native and really fast implementations of the complete stack I need for web development and content editing. The single binary takes most of the pain out of installation and upgrades (if you stick with the same binary, it will continue to just work for decades).
+
+**With 0.43, we are almost there.** With that release, it should be possible to set up a Hugo-only project without any additional tools (Gulp, WebPack) for all aspects of website building. There will still be situations where those tools will still be needed, of course, but we will continue to fill the gaps in the feature set.
+
+Hugo has stuck with the sub-zero versions to signal active development, with a new main release every 5-6 weeks. But we take stability very seriously (breaking things add lots of support work, we don't like that) and most site upgrades are [smooth](https://twitter.com/tmmx/status/1006288444459503616). But we are closing in on the first major stable version.
+
+
+### The Road to 1.0
+
+We have some more technical tasks that needs to be done (there is ongoing work to get the page quries into a more consistent state, also a simpler `.GetPage` method), but also some cool new functionality. The following roadmap is taken from memory, and may not be complete, but should be a good indication of what's ahead.
+
+Pages from "other data sources"
+: Currently, in addition to Hugo's list pages, every URL must be backed by a content file (Markdown, HTML etc.). This covers most use cases, but we need a flexible way to generate pages from other data sources. Think product catalogues and similar.
+
+Upgrade Blackfriday to v2
+: [Blackfriday](https://github.com/russross/blackfriday) is the main content renderer in Hugo. It has been rewritten to a more flexible architecture, which should allow us to fix some of the current shortcomings.
+
+We should be able to create a better and easier-to-use data structure from the rendered content: Summary, the content after the summary, being able to range over the footnotes and the ToC. Having ToC as a proper data structure also open up a few other potential uses; using it as an index in [Related Content](https://gohugo.io/content-management/related/) would be one example.
+
+This should also enable us to _do more_ with [Custom Output Formats](/templates/output-formats). It is already very powerful. GettyPubs are using it in [Quire](https://github.com/gettypubs/quire) to build [beautiful multi-platform publications](http://www.getty.edu/publications/digital/digitalpubs.html). But it can be improved. For rendering of content files, you are currently restricted to HTML. It would be great if we could configure alternative renderers per output format, such as LaTeX and EPUB.
+
+Related to this is also to add a configurable "Markdown URL rewriter", which should make more portable URLs in Markdown, e.g. image links that work both when viewed on GitHub and your published site.
+
+### The Road to the Future
+
+These are the items that first comes to mind if you ask me to think even further ahead:
+
+Dependency manager for Theme Components
+: In Hugo `0.42` we added [Theme Components](/themes/theme-components/) and Theme Inheritance. With SCSS support in Hugo `0.43`, which also follows the same project/themes precedence order (add `_variables.scss` to your project, configure SASS colour variables in `config.toml`), we have a solid foundation for creating easy to use and extensible themes. But we are missing some infrastructure around this. We have a site with 235+ [themes](https://themes.gohugo.io/)[^themes] listed, but you currently need to do some added work to get the theme up and running for your site. In the Go world, we don't have NPM to use, which is a curse and a blessing, but I have some ideas about building a simple dependency manager into Hugo, modelled after how Go is doing it (`hugo install`). You should be able to configure what theme and theme components you want to use, and Hugo should handle the installation of the correct versions. This should make it easier for the user, but it would also enable community driven and even commercial "theme stores".
+
+
+{{< imgproc graph-themes Fit "600x400" >}}
+Number of Hugo themes on themes.gohugo.io in relation to the Hugo release dates.
+{{< /imgproc >}}
+
+
+The "New York Times on Hugo" Use Case
+: There are recurring questions on the support forum from [really big sites](https://discourse.gohugo.io/t/transition-2m-posts-from-wordpress-to-hugo/12704) that want to move to Hugo. There are many [good reasons](https://www.netlify.com/blog/2016/05/18/9-reasons-your-site-should-be-static/) why they want this (security, cost-saving, EU regulations etc.). And while there have been reports about companies building 600 000 pages with Hugo on very powerful hardware, we will have to rethink the build model to make this usable. Keywords are: streaming builds, segmented builds, partial rebuilds. There are other site generators also talking about this. It should be possible, and my instinct tells me that it should be easier to do when your starting point is "really fast". But this is not a small weekend project for me, and I have already talked to several companies about sponsoring this.
+
+Plugins
+: A Theme Component could also be called a plugin. But there are several potential plugin hooks into Hugo's build pipeline: Resource transformations, content rendering etc. We will eventually get there, but we should do it without giving up too much of the Hugo speed and simplicity.
+
+
+## Thanks
+
+So, thanks to everyone who have contributed to getting Hugo where it is today. It is hard to single out individuals, but a big shout-out to all the Hugo experts and moderators helping out making the [discourse.gohugo.io](https://discourse.gohugo.io/) a very active and possibly one of the best support forums out there.
+
+And the last shout-out goes to two maintainers who have been there more or less from the start. [@digitalcraftsman](https://github.com/digitalcraftsman/) has been doing a fantastic job keeping the fast growing theme site and [repository](https://github.com/gohugoio/hugoThemes) in pristine condition. I have it on my watch list, but that is just out of curiosity. There are lots of activity, but it runs as clock work. [Anthony Fok](https://github.com/anthonyfok) has contributed with a variety of things but is most notable as the Linux expert on the team. He manages the Debian build and is the one to thank for up-to-date binaries on Debian and Ubuntu.
+
+One final note: If you have not done so already, please visit [github.com/gohugoio/hugo](https://github.com/gohugoio/hugo) and push the "star button".
+
+Gopher artwork by [Ashley McNamara](https://github.com/ashleymcnamara/gophers/) (licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)). Inspired by [Renee French](https://reneefrench.blogspot.com/).
+
+[^2]: Numbers from Google Analytics. The Hugo websites are https://discourse.gohugo.io/, https://gohugo.io/ and https://themes.gohugo.io/. It is rumoured that when [Matt Biilman](https://twitter.com/biilmann?lang=en), CEO and Co-founder of Netlify, opened the first power bill after sponsoring Hugo's hosting, said: "Du må lave fis med mig, those Hugo sites have lots of web traffic!"
+[^sgen]: That was at the time of writing this article. _Next_, a React based static site generator, has momentum and is closing in on Hugo's 2nd place.
+[^themes]: We pull all the themes from GitHub and build the theme site and 235 demo sites on Netlify in 4 minutes. And that is impressing.
diff --git a/docs/content/en/news/lets-celebrate-hugos-5th-birthday/sunset-get.png b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/sunset-get.png
new file mode 100644
index 000000000..db3373c0b
--- /dev/null
+++ b/docs/content/en/news/lets-celebrate-hugos-5th-birthday/sunset-get.png
Binary files differ
diff --git a/docs/content/en/templates/lookup-order.md b/docs/content/en/templates/lookup-order.md
index 343058e2d..61ce35ef2 100644
--- a/docs/content/en/templates/lookup-order.md
+++ b/docs/content/en/templates/lookup-order.md
@@ -5,7 +5,7 @@ description: Hugo searches for the layout to use for a given page in a well defi
godocref:
date: 2017-02-01
publishdate: 2017-02-01
-lastmod: 2017-05-25
+lastmod: 2017-07-05
categories: [templates,fundamentals]
keywords: [templates]
menu:
@@ -32,7 +32,7 @@ Output Format
: See [Custom Output Formats](/templates/output-formats). An output format has both a `name` (e.g. `rss`, `amp`, `html`) and a `suffix` (e.g. `xml`, `html`). We prefer matches with both (e.g. `index.amp.html`, but look for less specific templates.
Language
-: We will consider a language code in the template name. If the site language is `fr`, `index.fr.amp.html` will win over `index.amp.html`, but we will `index.amp.html` will be chosen before `index.fr.html`.
+: We will consider a language code in the template name. If the site language is `fr`, `index.fr.amp.html` will win over `index.amp.html`, but `index.amp.html` will be chosen before `index.fr.html`.
Layout
: Can be set in page front matter.
diff --git a/docs/content/en/themes/theme-components.md b/docs/content/en/themes/theme-components.md
index 23312db31..91127e740 100644
--- a/docs/content/en/themes/theme-components.md
+++ b/docs/content/en/themes/theme-components.md
@@ -25,16 +25,16 @@ theme = ["my-shortcodes", "base-theme", "hyde"]
You can even nest this, and have the theme component itself include theme components in its own `config.toml` (theme inheritance).[^1]
-The theme definition example above in `config.toml` creates a theme with 3 theme components with presedence from left to right.
+The theme definition example above in `config.toml` creates a theme with 3 theme components with precedence from left to right.
-So, Hugo will, for any given file, data entry etc., look first in the project, and then in `my-shortcode`, `base-theme` and lastly `hyde`.
+For any given file, data entry, etc., Hugo will look first in the project and then in `my-shortcode`, `base-theme`, and lastly `hyde`.
Hugo uses two different algorithms to merge the filesystems, depending on the file type:
* For `i18n` and `data` files, Hugo merges deeply using the translation id and data key inside the files.
-* For `static`, `layouts` (templates) and `archetypes` files, these are merged on file level. So the left-most file will be chosen.
+* For `static`, `layouts` (templates), and `archetypes` files, these are merged on file level. So the left-most file will be chosen.
-The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are plans to improve on this and get a URL scheme so this can be resolved automatically.
+The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are plans to improve on this and get a URL scheme so this can be resolved automatically.
Also note that a component that is part of a theme can have its own configuration file, e.g. `config.toml`. There are currently some restrictions to what a theme component can configure:
diff --git a/docs/layouts/shortcodes/imgproc.html b/docs/layouts/shortcodes/imgproc.html
index 6ff73e1f9..f44b509c2 100644
--- a/docs/layouts/shortcodes/imgproc.html
+++ b/docs/layouts/shortcodes/imgproc.html
@@ -1,4 +1,4 @@
-{{ $original := .Page.Resources.GetMatch (printf "%s*" (.Get 0)) }}
+{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
{{ if eq $command "Fit"}}
@@ -11,8 +11,8 @@
{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}}
{{ end }}
{{ $image := .Scratch.Get "image" }}
-<figure style="width: {{ add $image.Width 3 }}px; padding: 3px; background-color: #cccc">
- <img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
+<figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">
+ <img style="max-width: 100%; height: auto;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
<figcaption>
<small>
{{ with .Inner }}
diff --git a/docs/netlify.toml b/docs/netlify.toml
index be629d1c0..6bb2f00d1 100644
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -3,7 +3,7 @@ publish = "public"
command = "hugo"
[context.production.environment]
-HUGO_VERSION = "0.41"
+HUGO_VERSION = "0.42.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --enableGitInfo"
[context.split1.environment]
-HUGO_VERSION = "0.41"
+HUGO_VERSION = "0.42.2"
HUGO_ENV = "production"
[context.deploy-preview]
-command = "hugo -b $DEPLOY_PRIME_URL"
+command = "hugo --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
-HUGO_VERSION = "0.41"
+HUGO_VERSION = "0.42.2"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
-HUGO_VERSION = "0.41"
+HUGO_VERSION = "0.42.2"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
diff --git a/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_480x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..7db1012b3
--- /dev/null
+++ b/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_480x0_resize_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_640x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..adb5103fe
--- /dev/null
+++ b/docs/resources/_gen/images/news/0.42-relnotes/featured-hugo-42-poster_hue0604c0846526b6d2f8ba376edd013b6_74852_640x0_resize_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_480x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..9f054a3cf
--- /dev/null
+++ b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_480x0_resize_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_640x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..2adcc4c3d
--- /dev/null
+++ b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/featured_hu30cb938a182ebd06b50ed15d006d8f64_179291_640x0_resize_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-stars_hu169ba15a8bcaf4ddd6a5a1aa8505c448_15599_600x400_fit_catmullrom_2.png b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-stars_hu169ba15a8bcaf4ddd6a5a1aa8505c448_15599_600x400_fit_catmullrom_2.png
new file mode 100644
index 000000000..31f5bea34
--- /dev/null
+++ b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-stars_hu169ba15a8bcaf4ddd6a5a1aa8505c448_15599_600x400_fit_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-themes_hu25707bee0ec3007199f71bb29226f30c_16956_600x400_fit_catmullrom_2.png b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-themes_hu25707bee0ec3007199f71bb29226f30c_16956_600x400_fit_catmullrom_2.png
new file mode 100644
index 000000000..177d34fa9
--- /dev/null
+++ b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/graph-themes_hu25707bee0ec3007199f71bb29226f30c_16956_600x400_fit_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png
new file mode 100644
index 000000000..a4bf4bd92
--- /dev/null
+++ b/docs/resources/_gen/images/news/lets-celebrate-hugos-5th-birthday/sunset-get_hu69849a7cdb847c2393a7b3a7f6061c86_387442_600x300_fill_catmullrom_smart1_2.png
Binary files differ