Merge commit 'efa74c5c6e6ff1daddeb5834ea7c69bed2acf171'

This commit is contained in:
Bjørn Erik Pedersen 2020-06-16 14:19:31 +02:00
commit 0a9172672a
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
74 changed files with 112 additions and 156 deletions

3
docs/.github/SUPPORT.md vendored Normal file
View file

@ -0,0 +1,3 @@
### Asking Support Questions
We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions. Please don't use the GitHub issue tracker to ask questions.

View file

@ -28,7 +28,7 @@ This has many benefits. The most noticeable is performance. HTTP servers are *ve
## More on Static Site Generators
* ["An Introduction to Static Site Generators", David Walsh][]
* ["Hugo vs. Wordpress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
* ["Hugo vs. WordPress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
* ["Static Site Generators", O'Reilly][]
* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)][]
* ["Top 10 Static Website Generators", Netlify blog][]

View file

@ -44,7 +44,7 @@ toc: true
* Automatic and user defined [content summaries][]
* [Shortcodes][] to enable rich content inside of Markdown
* ["Minutes to Read"][pagevars] functionality
* ["Wordcount"][pagevars] functionality
* ["WordCount"][pagevars] functionality
## Additional Features

View file

@ -1,5 +1,3 @@
---
title: Hugo and the General Data Protection Regulation (GDPR)
linktitle: Hugo and GDPR
@ -98,7 +96,7 @@ useSessionStorage
simple
: If simple mode is enabled, a static and no-JS version of the Instagram image card will be built. Note that this only supports image cards and the image itself will be fetched from Instagram's servers.
**Note:** If you use the _simple mode_ for Instagram and a site styled with Bootstrap 4, you may want to disable the inlines styles provided by Hugo:
**Note:** If you use the _simple mode_ for Instagram and a site styled with Bootstrap 4, you may want to disable the inline styles provided by Hugo:
{{< code-toggle file="config">}}
[services]

View file

@ -1,6 +1,6 @@
---
title: Hugo's Security Model
description: A summary of Hugo's security model.
description: A summary of Hugo's security model.
date: 2019-10-01
layout: single
keywords: ["Security", "Privacy"]
@ -19,7 +19,7 @@ toc: true
Hugo produces static output, so once built, the runtime is the browser (assuming the output is HTML) and any server (API) that you integrate with.
But when developing and building your site, the runtime is the `hugo` executable. Securing a runtime can be [a real challenge](https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/).
But when developing and building your site, the runtime is the `hugo` executable. Securing a runtime can be [a real challenge](https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/).
**Hugo's main approach is that of sandboxing:**

View file

@ -39,9 +39,7 @@ Hugo is for people who want to hand code their own website without worrying abou
Hugo is for people building a blog, a company site, a portfolio site, documentation, a single landing page, or a website with thousands of pages.
[@spf13]: https://twitter.com/@spf13
[@spf13]: https://twitter.com/spf13
[Aerobatic]: https://www.aerobatic.com/
[Amazon S3]: https://aws.amazon.com/s3/
[Azure]: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
@ -51,7 +49,7 @@ Hugo is for people building a blog, a company site, a portfolio site, documentat
[GitHub Pages]: https://pages.github.com/
[GitLab Pages]: https://about.gitlab.com/features/pages/
[Go language]: https://golang.org/
[GoDaddy]: https://www.godaddy.com/ "Godaddy.com Hosting"
[GoDaddy]: https://www.godaddy.com/ "GoDaddy.com Hosting"
[Google Cloud Storage]: https://cloud.google.com/storage/
[Heroku]: https://www.heroku.com/
[Jekyll]: https://jekyllrb.com/
@ -61,5 +59,5 @@ Hugo is for people building a blog, a company site, a portfolio site, documentat
[Rackspace]: https://www.rackspace.com/cloud/files
[Surge]: https://surge.sh
[contributing to it]: https://github.com/gohugoio/hugo
[rackspace]: https://www.rackspace.com/cloud/files
[rackspace]: https://www.rackspace.com/openstack/public/files
[static site generator]: /about/benefits/

View file

@ -15,7 +15,7 @@ hugo is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at http://gohugo.io/.
Complete documentation is available at https://gohugo.io/.
```
hugo [flags]

View file

@ -15,7 +15,6 @@ Delete the Hugo Module cache for the current project.
Note that after you run this command, all of your dependencies will be re-downloaded next time you run "hugo".
Also note that if you configure a positive maxAge for the "modules" file cache, it will also be cleaned as part of "hugo --gc".
```

View file

@ -18,7 +18,7 @@ Some examples:
Install the latest version possible for a given module:
hugo mod get github.com/gohugoio/testshortcodes
Install a specific version:
hugo mod get github.com/gohugoio/testshortcodes@v0.3.0

View file

@ -18,8 +18,6 @@ toc: true
comments: Before this page is published, need to also update both site- and page-level variables documentation.
---
Larger sites often have multiple content authors. Hugo provides standardized author profiles to organize relationships between content and content creators for sites operating under a distributed authorship model.
## Author Profiles
@ -107,7 +105,7 @@ 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 corresponding identifiers are supported: `github`, `facebook`, `twitter`, `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 corresponding 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`, `twitter`). Custom variables like `website` remain as they are.

View file

@ -35,7 +35,7 @@ Note that we extended this property from a boolean to an enum in Hugo 0.68.0.
Valid values are:
never
: The page will not be incldued in any page collection.
: The page will not be included in any page collection.
always (default)
: The page will be included in all page collections, e.g. `site.RegularPages`, `$page.Pages`.

View file

@ -56,7 +56,7 @@ There are a few alternatives to commenting on static sites for those who do not
* [IntenseDebate](https://intensedebate.com/)
* [Graph Comment][]
* [Muut](https://muut.com/)
* [isso](https://posativ.org/isso/) (Self-hosted, Python)
* [Isso](https://posativ.org/isso/) (Self-hosted, Python)
* [Tutorial on Implementing Isso with Hugo][issotutorial]
* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
* [Remark](https://github.com/umputun/remark) (Open source, Golang, Easy to run docker)

View file

@ -98,7 +98,7 @@ Sometimes it can be useful to create the filter chain once and then reuse it:
Provides an [Exif](https://en.wikipedia.org/wiki/Exif) object with metadata about the image.
Note that this is only suported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
Note that this is only supported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
```go-html-template
{{ with $img.Exif }}

View file

@ -63,7 +63,7 @@ When working with front matter `Params` in [single page templates][singles], omi
`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`.
If the default language needs to be rendered 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.
@ -125,7 +125,7 @@ public
**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.com/`.**
When you run `hugo server` we will start multiple HTTP servers. You will typlically see something like this in the console:
When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console:
```bash
Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1)
@ -204,7 +204,7 @@ languages:
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:
Considering the following example in conjunction with the configuration above:
1. `/content/english/about.md`
2. `/content/french/about.md`

View file

@ -23,9 +23,9 @@ Hugo `0.32` announced page-relative images and other resources packaged into `Pa
These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture.
{{% imgproc 1-featured Resize "300x" %}}
{{< imgproc 1-featured Resize "300x" >}}
The illustration shows 3 bundles. Note that the home page bundle cannot contain other content pages, but other files (images etc.) are fine.
{{% /imgproc %}}
{{< /imgproc >}}
{{% note %}}
@ -112,7 +112,7 @@ Single content files in each of your sections are going to be rendered as [singl
content/posts/my-first-hugo-post.md
```
At the time Hugo builds your site, the content will be output to the following destination:
When Hugo builds your site, the content will be outputted to the following destination:
```

View file

@ -82,7 +82,7 @@ GetMatch
## Page Resources Metadata
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
{{% note %}}
Resources of type `page` get `Title` etc. from their own front matter.

View file

@ -21,7 +21,7 @@ toc: true
## What a Shortcode is
Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframes>`) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframe>`'s) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
Hugo created **shortcodes** to circumvent these limitations.
@ -418,7 +418,7 @@ To learn more about creating custom shortcodes, see the [shortcode template docu
[`figure` shortcode]: #figure
[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."
[figureelement]: https://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/

View file

@ -209,7 +209,7 @@ content/posts/post-1.md
## Ugly URLs
If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`.
If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also set the `HUGO_UGLYURLS` environment variable to `true` when running `hugo` or `hugo server`.
If you want a specific piece of content to have an exact URL, you can specify this in the [front matter][] under the `url` key. The following are examples of the same content directory and what the eventual URL structure will be when Hugo runs with its default behavior.

View file

@ -15,6 +15,7 @@ aliases: []
toc: false
layout: documentation-home
---
Hugo is the **world's fastest static website engine.** It's written in Go (aka Golang) and developed by [bep](https://github.com/bep), [spf13](https://github.com/spf13) and [friends](https://github.com/gohugoio/hugo/graphs/contributors).
Hugo is the **world's fastest static website engine.** It's written in Go (aka Golang) and developed by [bep](https://github.com/bep), [spf13](https://github.com/spf13) and [friends](https://github.com/gohugoio/hugo/graphs/contributors).
Below you will find some of the most common and helpful pages from our documentation.

View file

@ -18,8 +18,7 @@ deprecated: false
aliases: []
---
By default all matches will be included. The number of matches can be limitted with an optional third parameter.
By default all matches will be included. The number of matches can be limited with an optional third parameter.
The example below returns a list of all second level headers (`<h2>`) in the content:
@ -40,7 +39,6 @@ Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), whi
If you are just learning RegEx, or at least Go's flavor, you can practice pattern matching in the browser at <https://regex101.com/>.
{{% /note %}}
[partials]: /templates/partials/
[`plainify`]: /functions/plainify/
[toc]: /content-management/toc/

View file

@ -20,7 +20,7 @@ aliases: []
Takes a string containing the name of the variable as input. Returns
an empty string if the variable is not set, otherwise returns the
value of the variable.
value of the variable.
```
{{ getenv "HOME" }}

View file

@ -22,5 +22,5 @@ aliases: []
In the result `&` becomes `&amp;` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`.
```
{{ htmlEscape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo &amp; Caddy &gt; Wordpress &amp; Apache"
{{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo &amp; Caddy &gt; WordPress &amp; Apache"
```

View file

@ -19,10 +19,10 @@ deprecated: false
aliases: []
---
`htmlUnescape` returns the given string with HTML escape codes un-escaped.
`htmlUnescape` returns the given string with HTML escape codes un-escaped.
Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal.
```
{{ htmlUnescape "Hugo &amp; Caddy &gt; Wordpress &amp; Apache" }} → "Hugo & Caddy > Wordpress & Apache"
{{ htmlUnescape "Hugo &amp; Caddy &gt; WordPress &amp; Apache" }} → "Hugo & Caddy > WordPress & Apache"
```

View file

@ -20,7 +20,7 @@ deprecated: false
draft: false
aliases: []
---
`hugo` returns an instance that contains the following functions:
hugo.Generator
@ -29,7 +29,7 @@ hugo.Generator
hugo.Version
: the current version of the Hugo binary you are using e.g. `0.63.2`
`hugo` returns an instance that contains the following functions:
hugo.Environment

View file

@ -38,8 +38,6 @@ The function takes multiple indices as arguments, and this can be used to get ne
{{ index $map "c" "e" }} => 20
```
## Example: Load Data from a Path Based on Front Matter Params
Assume you want to add a `location = ""` field to your front matter for every article written in `content/vacations/`. You want to use this field to populate information about the location at the bottom of the article in your `single.html` template. You also have a directory in `data/locations/` that looks like the following:
@ -93,4 +91,3 @@ Now the call will return the specific file according to the location specified i
{{ (index .Site.Data.locations .Params.location).pop_city }}
=> 658390
```

View file

@ -21,7 +21,6 @@ draft: false
aliases: []
---
```
{{ range last 10 .Pages }}
{{ .Render "summary" }}

View file

@ -19,8 +19,6 @@ deprecated: false
aliases: []
---
```
{{ md5 "Hello world, gophers!" }}
<!-- returns the string "b3029f756f98f79e7f1b7f1d1f0dd53b" -->

View file

@ -14,7 +14,7 @@ keywords: [strings]
signature: ["plainify INPUT"]
workson: []
hugoversion:
relatedfuncs: [jsonify,]
relatedfuncs: [jsonify]
deprecated: false
aliases: []
---
@ -25,7 +25,4 @@ aliases: []
See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
[pagevars]: /variables/page/

View file

@ -1,6 +1,6 @@
---
title: relURL
description: Given a string, prepends the relative URL according to a page's position in the project directory structure.
description: Creates a baseURL-relative URL.
godocref:
date: 2017-02-01
publishdate: 2017-02-01

View file

@ -48,4 +48,4 @@ $indexStartingAt1 := (add $index 1)
```
[GNU's seq]: http://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation
[GNU's seq]: https://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation

View file

@ -22,7 +22,7 @@ toc: false
deprecated: false
---
A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes.
A template file is any file living below the `layouts` directories of either the project or any of its theme components including partials and shortcodes.
The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.

View file

@ -29,7 +29,7 @@ aliases: []
## Example: Using `time` to get Month Index
The following example takes a UNIX timestamp---set as `utimestamp: "1489276800"` in a content's front matter---converts the timestamp (string) to an integer using the [`int` function][int], and then uses [`printf`][] to convert the `Month` property of `time` into an index.
The following example takes a UNIX timestamp---set as `utimestamp: "1489276800"` in a content's front matter---converts the timestamp (string) to an integer using the [`int` function][int], and then uses [`printf`][] to convert the `Month` property of `time` into an index.
The following example may be useful when setting up [multilingual sites][multilingual]:

View file

@ -33,6 +33,4 @@ Since both values are integers, they can be subtracted and then divided by the n
Hugo's output is *static*. For the example above to be realistic, the site needs to be built every day.
{{% /note %}}
[partial template]: /templates/partials/

View file

@ -21,7 +21,7 @@ aliases: []
```
{{ $url := urls.Parse "http://www.gohugo.io" }}
{{ $url := urls.Parse "http://www.gohugo.io" }}
```
and returns a [URL](https://godoc.org/net/url#URL) structure. The struct fields are accessed via the `.` notation:

View file

@ -5,7 +5,7 @@ description: A list of tutorials and books on Hugo.
date: 2019-10-20
publishdate: 2019-10-20
lastmod: 2019-10-20
keywords: [books,tutorials,learning,usage]
keywords: [books, tutorials, learning, usage]
menu:
docs:
parent: "getting-started"
@ -17,7 +17,9 @@ toc: false
---
## Books
### Hugo In Action
[![Hugo In Action](hia.jpg)](https://www.manning.com/books/hugo-in-action)
Hugo in Action is a step-by-step guide to using Hugo to create static websites. Working with a complete example website and source code samples, youll learn how to build and host a low-maintenance, high-performance site that will wow your users and stay stable without relying on a third-party server.
@ -25,5 +27,7 @@ Hugo in Action is a step-by-step guide to using Hugo to create static websites.
[Hugo In Action Home Page](https://www.manning.com/books/hugo-in-action)
## Video tutorials
### Video Playlist by Mike Dane
Mike Dane expains the various features of via dedicated tutorials on [Youtube](https://www.youtube.com/watch?list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&v=qtIqKaDlqXo).
Mike Dane explains the various features of Hugo via dedicated tutorials on [YouTube](https://www.youtube.com/watch?list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&v=qtIqKaDlqXo).

View file

@ -44,6 +44,10 @@ Download the appropriate version for your platform from [Hugo Releases][releases
Ideally, you should install it somewhere in your `PATH` for easy use. `/usr/local/bin` is the most probable location.
### Docker
We currently do not official Hugo images for Docker, but we do recommend these up to date distributions: https://hub.docker.com/r/klakegg/hugo/
### Homebrew (macOS)
If you are on macOS and using [Homebrew][brew], you can install Hugo with the following one-liner:

View file

@ -58,7 +58,7 @@ The above will create a new Hugo site in a folder named `quickstart`.
See [themes.gohugo.io](https://themes.gohugo.io/) for a list of themes to consider. This quickstart uses the beautiful [Ananke theme](https://themes.gohugo.io/gohugo-theme-ananke/).
First, download the theme from Github and add it to your site's `theme` directory:
First, download the theme from GitHub and add it to your site's `theme` directory:
```bash
cd quickstart
@ -83,7 +83,7 @@ echo 'theme = "ananke"' >> config.toml
## Step 4: Add Some Content
You can manually create content files (for example as `content/<CATEGORY>/<FILE>.<FORMAT>`) and provide metadata in them, however you can use the `new` command to do few things for you (like add title and date):
You can manually create content files (for example as `content/<CATEGORY>/<FILE>.<FORMAT>`) and provide metadata in them, however you can use the `new` command to do a few things for you (like add title and date):
```
hugo new posts/my-first-post.md

View file

@ -58,7 +58,7 @@ Next, execute this command to generate a new keypair called `rsa_id`:
You'll be prompted for a passphrase, which is an extra layer of protection. Enter the passphrase you'd like to use, and then enter it again when prompted, or leave it blank if you don't want to have a passphrase. Not using a passphrase will let you transfer files non-interactively, as you won't be prompted for a password when you log in, but it is slightly less secure.
To make logging in easier, add a definition for your web host to the file `~/.ssh/config` with the following command, replacing `HOST` with the IP address or hostname of your web host, and `USER` with the username you use to log in to your web host when transfering files:
To make logging in easier, add a definition for your web host to the file `~/.ssh/config` with the following command, replacing `HOST` with the IP address or hostname of your web host, and `USER` with the username you use to log in to your web host when transferring files:
```
~/.ssh/$ cat >> config <<EOF

View file

@ -1,7 +1,7 @@
---
title: Host on AWS Amplify
linktitle: Host on AWS Amplify
description: Develop and deploy a cloud-powered web app with AWS Amplify.
description: Develop and deploy a cloud-powered web app with AWS Amplify.
date: 2018-01-31
publishdate: 2018-01-31
lastmod: 2018-01-31

View file

@ -57,7 +57,7 @@ This is a much simpler setup as your Hugo files and generated content are publis
4. Paste your existing Hugo project into the new local `<YOUR-PROJECT>` repository. Make sure your website works locally (`hugo server` or `hugo server -t <YOURTHEME>`) and open your browser to <http://localhost:1313>.
5. Once you are happy with the results:
* Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server
* Before proceeding run `rm -rf public` to completely remove the `public` directory
* Before proceeding run `rm -rf public` to completely remove the `public` directory
6. `git submodule add -b master https://github.com/<USERNAME>/<USERNAME>.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository).
### Put it Into a Script

View file

@ -24,13 +24,13 @@ draft: false
## Create a KeyCDN Pull Zone
The first step will be to login to your KeyCDN account and create a new zone. Name this whatever you like and select the [Pull Zone](https://www.keycdn.com/support/create-a-pull-zone/) option. As for the origin URL, your site will be running on [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html) with a URL of `https://youruser.gitlab.io/reponame/`. Use this as the Origin URL.
The first step will be to login to your KeyCDN account and create a new zone. Name this whatever you like and select the [Pull Zone](https://www.keycdn.com/support/create-a-pull-zone/) option. As for the origin URL, your site will be running on [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html) with a URL of `https://youruser.gitlab.io/reponame/`. Use this as the Origin URL.
![Screenshot of KeyCDN's pull zone creation page](/images/hosting-and-deployment/hosting-on-keycdn/keycdn-pull-zone.png)
![Screenshot of KeyCDN's pull zone creation page](/images/hosting-and-deployment/hosting-on-keycdn/keycdn-pull-zone.png)
While the origin location doesnt exist yet, you will need to use your new Zone URL address (or [Zonealias](https://www.keycdn.com/support/create-a-zonealias/)) in the `.gitlab-ci.yml` file that will be uploaded to your GitLab project.
While the origin location doesnt exist yet, you will need to use your new Zone URL address (or [Zone Alias](https://www.keycdn.com/support/create-a-zone-alias/)) in the `.gitlab-ci.yml` file that will be uploaded to your GitLab project.
Ensure that you use your Zone URL or Zonealias as the `BASEURL` variable in the example below. This will be the user-visible website address.
Ensure that you use your Zone URL or Zone alias as the `BASEURL` variable in the example below. This will be the user-visible website address.
## Configure Your .gitlab-ci.yml File

View file

@ -58,7 +58,7 @@ Any of the above can be omitted.
min
: The minimum Hugo version supported, e.g. `0.55.0`
max
max
: The maximum Hugo version supported, e.g. `0.55.0`
extended
@ -73,7 +73,7 @@ extended
ignoreConfig = false
disable = false
[[module.imports]]
path = "my-shortcodes"
path = "my-shortcodes"
{{< /code-toggle >}}
path

View file

@ -33,10 +33,10 @@ hugo mod init github.com/gohugoio/myShortcodes
Also see the [CLI Doc](/commands/hugo_mod_init/).
## Use a Module for a Theme
The easiest way to use a for a theme is to import it in the config.
The easiest way to use a Module for a theme is to import it in the config.
1. Initialize the hugo module system: `hugo mod init github.com/<your_user>/<your_project>`
2. Import the theme in your `config.toml`:
2. Import the theme in your `config.toml`:
```toml
[module]
@ -87,7 +87,7 @@ One way to do local development of a module imported in a project is to add a re
replace github.com/bep/hugotestmods/mypartials => /Users/bep/hugotestmods/mypartials
```
If you have the `hugo server` running, the configuration will be reloaded and `/Users/bep/hugotestmods/mypartials` put on the watch list.
If you have the `hugo server` running, the configuration will be reloaded and `/Users/bep/hugotestmods/mypartials` put on the watch list.
## Print Dependency Graph
@ -114,7 +114,7 @@ Also see the [CLI Doc](/commands/hugo_mod_graph/).
## Vendor Your Modules
`hugo mod vendor` will write all the module depencies to a `_vendor` folder, which will then be used for all subsequent builds.
`hugo mod vendor` will write all the module dependencies to a `_vendor` folder, which will then be used for all subsequent builds.
Note that:

View file

@ -15,12 +15,10 @@ sections_weight: 60
draft: false
---
Asset files of the same MIME type can be bundled into one resource using `resources.Concat` which takes two arguments, a target path and a slice of resource objects.
```go-html-template
{{ $plugins := resources.Get "js/plugins.js" }}
{{ $global := resources.Get "js/global.js" }}
{{ $js := slice $plugins $global | resources.Concat "js/bundle.js" }}
```
```

View file

@ -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.Fingerprint` 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`.

View file

@ -14,7 +14,7 @@ weight: 01
sections_weight: 01
draft: false
aliases: [/assets/]
---
---
### Asset directory

View file

@ -16,7 +16,7 @@ draft: false
---
Any resource of the aforementioned types can be minifed using `resources.Minify` which takes for argument the resource object.
Any resource of the aforementioned types can be minified using `resources.Minify` which takes for argument the resource object.
```go-html-template

View file

@ -20,7 +20,7 @@ There are currently two limitations to this:
1. This only works in `*.html` templates (i.e. templates that produces HTML files).
2. You cannot manipulate the values returned from the resource's methods. E.g. the `upper` in this example will not work as expected:
```go-html-template
{{ $css := resources.Get "css/main.css" }}
{{ $css = $css | resources.PostCSS | minify | fingerprint | resources.PostProcess }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

View file

@ -1,12 +1,12 @@
---
date: 2020-05-31
title: "0.72.0"
description: "0.72.0"
title: URL rewrites in dev server
description: "Hugo 0.72.0 comes with dev server redirects and URL rewrites, Goldmark typography extension fixes, Scratch.Values."
categories: ["Releases"]
---
This is a rather small release, its probably main motivation being the fixes in Goldmark's [Typographer extension](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333).
This is a rather small release, its probably main motivation being the fixes in Goldmark's [Typographer extension](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333).
This release also adds [redirect and URL rewrite support](https://gohugo.io/getting-started/configuration/#configure-server) to the development server, with mostly Netlify-compatible configuration syntax. This is especially useful if you're building a [SPA](https://en.wikipedia.org/wiki/Single-page_application) with client-side routing.

View file

@ -12,7 +12,7 @@ images:
- images/gohugoio-card-1.png
---
**Netlify** recently announced support for [HTTP/2 server push](https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/), and we have now added it to the **gohugo.io** sites for the main `CSS` and `JS` bundles, along with server-side 301 redirect support.
**Netlify** recently announced support for [HTTP/2 server push](https://www.netlify.com/blog/2017/07/18/http/2-server-push-on-netlify/), and we have now added it to the **gohugo.io** sites for the main `CSS` and `JS` bundles, along with server-side 301 redirect support.
If you navigate to https://gohugo.io and look in the Chrome developer network console, you should now see `Push` as the new source ("Initiator") for the `CSS` and `JSS`:
@ -44,7 +44,7 @@ baseName = "_headers"
isPlainText = true
notAlternative = true
```
## 2. Add Template For the _headers File
## 2. Add Template For the _headers File
Add `layouts/index.headers`:
@ -63,9 +63,7 @@ The template above creates both a security header definition and a HTTP/2 server
Also note that this is a template for the home page, so the full `Page` with its `Site` and many variables are available. You can also use `partial` to include other templates.
## 3. Add Template For the _redirects File
## 3. Add Template For the _redirects File
Add `layouts/index.redir`:
```bash
# Netlify redirects. See https://www.netlify.com/docs/redirects/

View file

@ -18,7 +18,7 @@ Finding a tool that will make your customers, writers, designers, _and_ DevOps t
**Hugo is static**. We're a security company, so we swear by static sites and use them wherever possible. We feel much safer pointing customers at HTML files than at a complicated server which needs to be hardened.
**Hugo is Go**. We love the Go programming language at 1Password, and we were delighted to learn that Hugo used the same Go template syntax that our designers and front-end developers had already mastered.
**Hugo is FAST**. Our previous static site generator took nearly a minute to compile our (then much smaller) site. Developers might be used to this, but it wasn't cutting it for writers who wanted to see live previews of their work. Hugo did the same job in milliseconds, and to this day compiles 400 pages in five languages in the blink of an eye.
**Hugo is flexible**. Thanks to Hugo's content and layout system, we were able to preserve our existing file and folder structure and port our entire production site in a few days. We could then create new content types that weren't possible before, like these snazzy [showcases](https://support.1password.com/explore/extension/).

View file

@ -8,7 +8,7 @@ byline: "[Didier Divinerites](https://github.com/divinerites)"
---
Swiss [Arolla campsite](https://www.camping-arolla.com) runs the highest campsite in Europe and I'm completely re-doing their actuel Website with Hugo.
Swiss [Arolla campsite](https://www.camping-arolla.com) runs the highest campsite in Europe and I'm completely re-doing their actual Website with Hugo.
But they just launch a brand new offer (luxury tents with bed and fire oven), and we couldn't wait for the proper new website for having this promoted: we needed the website up and running within 24h!

View file

@ -1,5 +1,4 @@
---
title: fireship.io
date: 2019-02-02
description: "Showcase: \"Hugo helps us create complex technical content that integrates engaging web components\""
@ -10,9 +9,9 @@ byline: "[Jeff Delaney](https://github.com/codediodeio), Fireship.io Creator"
After careful consideration of JavaScript/JSX-based static site generators, it became clear that Hugo was the only tool capable of handling our project's complex demands. Not only do we have multiple content formats and taxonomies, but we often need to customize the experience at a more granular level. The problems Hugo has solved for us include:
- **Render speed.** We know from past experience that JavaScript-based static site generators become very slow when you have thousands of pages and images.
- **Feature-rich.** Our site has a long list of specialized needs and Hugo somehow manages to cover every single use case.
- **Composability.** Hugo's partial and shortcode systems empower us to write DRY and maintainable templates.
- **Simplicity.** Hugo is easy to learn (even without Go experience) and doesn't burden us with brittle dependencies.
- **Render speed.** We know from past experience that JavaScript-based static site generators become very slow when you have thousands of pages and images.
- **Feature-rich.** Our site has a long list of specialized needs and Hugo somehow manages to cover every single use case.
- **Composability.** Hugo's partial and shortcode systems empower us to write DRY and maintainable templates.
- **Simplicity.** Hugo is easy to learn (even without Go experience) and doesn't burden us with brittle dependencies.
The site is able to achieve Lighthouse performance scores of 95+, despite the fact that it is a fully interactive PWA that ships Angular and Firebase in the JS bundle. This is made possible by (1) prerendering content with Hugo and (2) lazily embedding native web components directly in the HTML and markdown. We provide a [detailed explanation](https://youtu.be/gun8OiGtlNc) of the architecture on YouTube and can't imagine development without Hugo.
The site is able to achieve Lighthouse performance scores of 95+, despite the fact that it is a fully interactive PWA that ships Angular and Firebase in the JS bundle. This is made possible by (1) prerendering content with Hugo and (2) lazily embedding native web components directly in the HTML and markdown. We provide a [detailed explanation](https://youtu.be/gun8OiGtlNc) of the architecture on YouTube and can't imagine development without Hugo.

View file

@ -15,7 +15,7 @@ Hugo addresses all these needs, coupled with [Forestry.io](https://forestry.io/)
## What we liked
- The **multilingual** content support, especially simpel to setup.
- 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).

View file

@ -1,15 +1,9 @@
---
title: Linode Docs
date: 2018-02-12
description: "Showcase: \"Hugo allows us to build thousands of pages in seconds.\""
siteURL: https://linode.com/docs/
siteSource: https://github.com/linode/docs
---
The documentation team at Linode has been writing guides since 2009, with the goal of helping new and experienced Linux users find the best tools and get the most out of their systems.

View file

@ -15,7 +15,7 @@ siteURL: https://www.paceup.com/
---
From the beginning, at Pace, we were focused on solving customer needs and didn't want to over-engineer our marketing or sales. At the same time we didn't want to lock ourselves into a Wordpress, Squarespace or the like.
From the beginning, at Pace, we were focused on solving customer needs and didn't want to over-engineer our marketing or sales. At the same time we didn't want to lock ourselves into a WordPress, Squarespace or the like.
The ideal was a fast, simple, static site builder. When we came across Hugo we were blown away. Being a European company we wanted to be multi-lingual from the get-go and allow multiple team-members to collaborate and own their content. We also felt that a tech-company in 2018 should be capable of hosting its own blog in a simple way.

View file

@ -22,7 +22,7 @@ byline: "[Sebastian Schirmer](mailto:sebastian.schirmer@quiply.com), Quiply Co-F
With the launch of our Employee Communications app Quiply we created a very simple and static one-page website to showcase our product.
As our customer base and demand for marketing and communication started to grow, we needed a solution to easily grow and extend the contents of our web presence. As we do not have the need to serve dynamic content, we decided to use a static site generator. Amongst a couple of others, we tried Hugo and it became immediately clear that we'd use Hugo going forward as it compiles super-fast, is intuitive to use and offers all the features we need.
As our customer base and demand for marketing and communication started to grow, we needed a solution to easily grow and extend the contents of our web presence. As we do not have the need to serve dynamic content, we decided to use a static site generator. Amongst a couple of others, we tried Hugo and it became immediately clear that we'd use Hugo going forward as it compiles super-fast, is intuitive to use and offers all the features we need.
Our website which we launched a couple of weeks ago is still growing and new content is being added constantly. By using Hugo, this can be easily done by content authors writing markdown files without always having to touch HTML or CSS code. It is available in German only for the time being, an English version is in the works.

View file

@ -1,13 +1,8 @@
---
title: StackImpact
date: 2018-02-20
description: "\"Hugo is a perfect choice for a product website.\""
siteURL: https://stackimpact.com/
---
After gradually handing over the control of our website to WordPress plugins, we realized that we needed to act.

View file

@ -15,7 +15,7 @@ We would really appreciate if you could:
1. Fork https://github.com/gohugoio/hugoDocs
2. Run `hugo new showcase/your-site` (this requires >= Hugo 0.49). This will use the archetype bundle in the [docs repo](https://github.com/gohugoio/hugoDocs/tree/master/archetypes).
3. Follow the instructions in the newly created page bundle.
3. Follow the instructions in the newly created page bundle.
3. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls

View file

@ -357,7 +357,7 @@ The following two examples are functionally the same:
### Example 2: `index`
The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index` function][index], which is built into Go Templates:
The following accesses the page parameter called "disqus_url" and escapes the HTML. This example also uses the [`index` function](/functions/index-function/), which is built into Go Templates:
```go-html-template
{{ index .Params "disqus_url" | html }}

View file

@ -177,27 +177,10 @@ The following `footer.html` partial template is used for [spf13.com](https://spf
<p>
&copy; 2013-14 Steve Francia.
<a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons Attribution">Some rights reserved</a>;
please attribute properly and link back. Hosted by <a href="http://servergrove.com">ServerGrove</a>.
please attribute properly and link back.
</p>
</div>
</footer>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XYSYXYSY-X']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</body>
</html>
{{< /code >}}
[context]: /templates/introduction/ "The most easily overlooked concept to understand about Go templating is how the dot always refers to the current context."

View file

@ -22,7 +22,7 @@ toc: true
See [Template Lookup Order](/templates/lookup-order/) for the complete reference.
{{% note "Hugo Ships with an RSS Template" %}}
Hugo ships with its own [RSS 2.0 template](#the-embedded-rss-xml). The embedded template will be sufficient for most use cases.
Hugo ships with its own [RSS 2.0 template](#the-embedded-rssxml). The embedded template will be sufficient for most use cases.
{{% /note %}}
RSS pages are of the type `Page` and have all the [page variables](/variables/page/) available to use in the templates.

View file

@ -21,7 +21,7 @@ toc: false
* [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
* [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites.
* [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly.
* [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multiplatform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
* [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multi-platform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
## Commercial Services

View file

@ -42,19 +42,19 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
## DokuWiki
- [dokuwiki-to-hugo](https://github.com/wgroeneveld/dokuwiki-to-hugo) - Migrates your dokuwiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extra's like the TODO plugin. Written with extensibility in mind using python 3. Also generates a TOML header for each page. Designed to copypaste the wiki directory into your /content directory.
- [dokuwiki-to-hugo](https://github.com/wgroeneveld/dokuwiki-to-hugo) - Migrates your DokuWiki source pages from [DokuWiki syntax](https://www.dokuwiki.org/wiki:syntax) to Hugo Markdown syntax. Includes extra's like the TODO plugin. Written with extensibility in mind using python 3. Also generates a TOML header for each page. Designed to copypaste the wiki directory into your /content directory.
## 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.
- [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 remotelly. Therefore, migration from the backup files is possible. Supports merging of the multiple WordPress sites into a single Hugo one.
- [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.
## Medium
- [medium2md](https://github.com/gautamdhameja/medium-2-md) - A simple Medium to Hugo exporter able to import stories in one command, including Front Matter.
- [medium-to-hugo](https://github.com/bgadrian/medium-to-hugo) - CLI tool written in Go to export medium posts into a Hugo compatible Markdown format. Tags and images are included. All images will be downloaded locally and linked appropriately.
- [medium-to-hugo](https://github.com/bgadrian/medium-to-hugo) - CLI tool written in Go to export medium posts into a Hugo compatible Markdown format. Tags and images are included. All images will be downloaded locally and linked appropriately.
## Tumblr
@ -74,7 +74,7 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
- [blogimport](https://github.com/natefinch/blogimport) - A tool to import from Blogger posts to Hugo.
- [blogger-to-hugo](https://bitbucket.org/petraszd/blogger-to-hugo) - Another tool to import Blogger posts to Hugo. It also downloads embedded images so they will be stored locally.
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
- [blog2md](https://github.com/palaniraja/blog2md) - Works with [exported xml](https://support.google.com/blogger/answer/41387?hl=en) file of your YOUR-TLD.blogspot.com website. It also saves comments to `YOUR-POST-NAME-comments.md` file along with posts.
- [BloggerToHugo](https://github.com/huanlin/blogger-to-hugo) - Yet another tool to import Blogger posts to Hugo. For Windows platform only, and .NET Framework 4.5 is required. See README.md before using this tool.
## Contentful
@ -84,4 +84,4 @@ Alternatively, you can use the new [Jekyll import command](/commands/hugo_import
## BlogML
- [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) - A tool that helps you convert BlogML xml file to Hugo markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) tramsform to hugo sites easily.
- [BlogML2Hugo](https://github.com/jijiechen/BlogML2Hugo) - A tool that helps you convert BlogML xml file to Hugo markdown files. Users need to take care of links to attachments and images by themselves. This helps the blogs that export BlogML files (e.g. BlogEngine.NET) transform to hugo sites easily.

View file

@ -26,7 +26,7 @@ A static website with a dynamic search function? Yes, Hugo provides an alternati
* [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh). A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
* [Github Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
* [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
* [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993). A usability and speed update to "Github Gist for Fuse.js integration" — global, keyboard-optimized search.
* [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993). A usability and speed update to "GitHub Gist for Fuse.js integration" — global, keyboard-optimized search.
## Commercial Search Services

View file

@ -1,5 +1,5 @@
---
title: Troubleshoot
title: Troubleshoot
linktitle: Troubleshoot
description: Frequently asked questions and known issues pulled from the Hugo Discuss forum.
date: 2017-02-01
@ -9,7 +9,7 @@ menu:
docs:
parent: "troubleshooting"
weight: 1
weight: 1
weight: 1
draft: false
hidesectioncontents: false
slug:
@ -20,7 +20,4 @@ notesforauthors:
The Troubleshooting section includes known issues, recent workarounds, and FAQs pulled from the [Hugo Discussion Forum][forum].
[forum]: https://discourse.gohugo.io

View file

@ -19,7 +19,7 @@ aliases: [/faq/]
## I can't see my content!
Is your markdown file [in draft mode](https://gohugo.io/content-management/front-matter/#front-matter-variables)? When testing, run `hugo server` with the `-D` or `--buildDrafts` [switch](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content).
Is your markdown file [in draft mode](https://gohugo.io/content-management/front-matter/#front-matter-variables)? When testing, run `hugo server` with the `-D` or `--buildDrafts` [switch](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content).
## Can I set configuration variables via OS environment?

View file

@ -33,9 +33,9 @@ The `.File` object contains the following fields:
.File.TranslationBaseName
: the filename without extension or optional language identifier (e.g., `foo`)
.File.ContentBaseName
.File.ContentBaseName
: is a either TranslationBaseName or name of containing folder if file is a leaf bundle.
.File.BaseFileName
: the filename without extension (e.g., `foo.en`)

View file

@ -20,7 +20,7 @@ wip: false
---
{{% warning "Deprecated" %}}
Page's `.Hugo` is deprecated and will be removed in a future release. Use the global `hugo` function.
Page's `.Hugo` is deprecated and will be removed in a future release. Use the global `hugo` function.
For example: `hugo.Generator`.
{{% /warning %}}

View file

@ -35,7 +35,7 @@
date = "2017-02-19"
[[article]]
title = "Switching from Wordpress to Hugo"
title = "Switching from WordPress to Hugo"
url = "http://schnuddelhuddel.de/switching-from-wordpress-to-hugo/"
author = "Mario Martelli"
date = "2017-02-19"
@ -119,7 +119,7 @@
date = "2016-09-21"
[[article]]
title = "Building our site: From Django & Wordpress to a static generator (Part I)"
title = "Building our site: From Django & WordPress to a static generator (Part I)"
url = "https://tryolabs.com/blog/2016/09/20/building-our-site-django-wordpress-to-static-part-i/"
author = "Alan Descoins"
date = "2016-09-20"

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
HUGO_VERSION = "0.71.1"
HUGO_VERSION = "0.72.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.71.1"
HUGO_VERSION = "0.72.0"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.71.1"
HUGO_VERSION = "0.72.0"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.71.1"
HUGO_VERSION = "0.72.0"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"