mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Squashed 'docs/' changes from 0fd7b4169..501c6e233
501c6e233 Remoe speakerdeck example 9529bd27d Fix typos 530f22cd3 Remove language assuming knowledge of GitHub OAuth c618809e7 Refer to Go by its proper name, not its domain name 06e23168b Add timeout parameter to configuration docs 034fa62a7 Update shortcodes.md 10ea79335 Document .Ordinal on shortcode 0bfd85fb9 Formatting e44f80fdf Release 0.41 76164258c releaser: Add release notes to /docs for release of 0.41 8d87505eb releaser: Bump versions for release of 0.41 2bbc003ee docs: Document the GDPR Privacy Config e2d11564d Merge commit 'd2b1030060d3c91d5f9ffa3456418da16bd74f1d' git-subtree-dir: docs git-subtree-split: 501c6e23370fae21e2110e0d7ea0db6731b31779
This commit is contained in:
parent
d2b1030060
commit
b239595af5
23 changed files with 221 additions and 60 deletions
|
@ -1,6 +1,6 @@
|
|||
# Hugo Docs
|
||||
|
||||
Documentation site for [Hugo](https://github.com/gohugoio/hugo), the very fast and flexible static site generator built with love in GoLang.
|
||||
Documentation site for [Hugo](https://github.com/gohugoio/hugo), the very fast and flexible static site generator built with love in Go.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ twitter = "GoHugoIO"
|
|||
[params]
|
||||
description = "The world’s fastest framework for building websites"
|
||||
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
|
||||
release = "0.40.3"
|
||||
release = "0.41"
|
||||
## Setting this to true will add a "noindex" to *EVERY* page on the site
|
||||
removefromexternalsearch = false
|
||||
## Gh repo for site footer (include trailing slash)
|
||||
|
|
119
content/en/about/hugo-and-gdpr.md
Normal file
119
content/en/about/hugo-and-gdpr.md
Normal file
|
@ -0,0 +1,119 @@
|
|||
|
||||
|
||||
---
|
||||
title: Hugo and the General Data Protection Regulation (GDPR)
|
||||
linktitle: Hugo and GDPR
|
||||
description: About how to configure your Hugo site to meet the new regulations.
|
||||
date: 2018-05-25
|
||||
layout: single
|
||||
keywords: ["GDPR", "Privacy", "Data Protection"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "about"
|
||||
weight: 5
|
||||
weight: 5
|
||||
sections_weight: 5
|
||||
draft: false
|
||||
aliases: [/privacy/,/gdpr/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
||||
General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
|
||||
|
||||
**Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.**
|
||||
|
||||
But even static websites can integrate with external services, so from version `0.41`, Hugo provides a **Privacy Config** that covers the relevant built-in templates.
|
||||
|
||||
Note that:
|
||||
|
||||
* These settings have their defaults setting set to _off_, i.e. how it worked before Hugo `0.41`. You must do your own evaluation of your site and apply the appropriate settings.
|
||||
* We will continue this work and improve this further in future Hugo versions.
|
||||
|
||||
## All Privacy Settings
|
||||
|
||||
Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `config.toml`).
|
||||
|
||||
{{< code-toggle file="config">}}
|
||||
[privacy]
|
||||
[privacy.disqus]
|
||||
disable = false
|
||||
[privacy.googleAnalytics]
|
||||
disable = false
|
||||
respectDoNotTrack = false
|
||||
anonymizeIP = false
|
||||
useSessionStorage = false
|
||||
[privacy.instagram]
|
||||
disable = false
|
||||
simple = false
|
||||
[privacy.speakerDeck]
|
||||
disable = false
|
||||
[privacy.twitter]
|
||||
disable = false
|
||||
enableDNT = false
|
||||
[privacy.vimeo]
|
||||
disable = false
|
||||
[privacy.youtube]
|
||||
disable = false
|
||||
privacyEnhanced = false
|
||||
{{< /code-toggle >}}
|
||||
|
||||
|
||||
## Disable All Services
|
||||
|
||||
An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter.
|
||||
|
||||
{{< code-toggle file="config">}}
|
||||
[privacy]
|
||||
[privacy.disqus]
|
||||
disable = true
|
||||
[privacy.googleAnalytics]
|
||||
disable = true
|
||||
[privacy.instagram]
|
||||
disable = true
|
||||
[privacy.speakerDeck]
|
||||
disable = true
|
||||
[privacy.twitter]
|
||||
disable = true
|
||||
[privacy.vimeo]
|
||||
disable = true
|
||||
[privacy.youtube]
|
||||
disable = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
## The Privacy Settings Explained
|
||||
|
||||
### GoogleAnalytics
|
||||
|
||||
anonymizeIP
|
||||
: Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
|
||||
|
||||
respectDoNotTrack
|
||||
: Enabling this will make the GA templates respect the "Do Not Track" HTTP header.
|
||||
|
||||
useSessionStorage
|
||||
: Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
|
||||
|
||||
### Instagram
|
||||
|
||||
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:
|
||||
|
||||
{{< code-toggle file="config">}}
|
||||
[services]
|
||||
[services.instagram]
|
||||
disableInlineCSS = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
### Twitter
|
||||
|
||||
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.
|
||||
|
||||
### 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.
|
||||
|
|
@ -282,7 +282,7 @@ i18n|MISSING_TRANSLATION|en|wordCount
|
|||
|
||||
## Customize Dates
|
||||
|
||||
At the time of this writing, Golang does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content:
|
||||
At the time of this writing, Go does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content:
|
||||
|
||||
~~~yaml
|
||||
1: "janvier"
|
||||
|
|
|
@ -268,34 +268,6 @@ Assuming that standard Hugo pretty URLs are turned on.
|
|||
<a href="/about/#who:c28654c202e73453784cfd2c5ab356c0">Who</a>
|
||||
```
|
||||
|
||||
### `speakerdeck`
|
||||
|
||||
To embed slides from [Speaker Deck][], click on "< /> Embed" (under Share right next to the template on Speaker Deck) and copy the URL:
|
||||
|
||||
```
|
||||
<script async class="speakerdeck-embed" data-id="4e8126e72d853c0060001f97" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
|
||||
```
|
||||
|
||||
#### `speakerdeck` Example Input
|
||||
|
||||
Extract the value from the field `data-id` and pass it to the shortcode:
|
||||
|
||||
{{< code file="speakerdeck-example-input.md" >}}
|
||||
{{</* speakerdeck 4e8126e72d853c0060001f97 */>}}
|
||||
{{< /code >}}
|
||||
|
||||
#### `speakerdeck` Example Output
|
||||
|
||||
{{< output file="speakerdeck-example-input.md" >}}
|
||||
{{< speakerdeck 4e8126e72d853c0060001f97 >}}
|
||||
{{< /output >}}
|
||||
|
||||
#### `speakerdeck` Example Display
|
||||
|
||||
For the preceding `speakerdeck` example, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
|
||||
|
||||
{{< speakerdeck 4e8126e72d853c0060001f97 >}}
|
||||
|
||||
### `tweet`
|
||||
|
||||
You want to include a single tweet into your blog post? Everything you need is the URL of the tweet:
|
||||
|
|
|
@ -88,7 +88,7 @@ Luckily, redirects can be handled easily with **aliases** in Hugo.
|
|||
|
||||
### Example: Aliases
|
||||
|
||||
Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this filed in TOML and YAML front matter, respectively.
|
||||
Let's assume you create a new piece of content at `content/posts/my-awesome-blog-post.md`. The content is a revision of your previous post at `content/posts/my-original-url.md`. You can create an `aliases` field in the front matter of your new `my-awesome-blog-post.md` where you can add previous paths. The following examples show how to create this field in TOML and YAML front matter, respectively.
|
||||
|
||||
#### TOML Front Matter
|
||||
|
||||
|
@ -188,7 +188,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 use the `--uglyURLs=true` [flag from the command line][usage] with `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.
|
||||
|
||||
|
@ -253,7 +253,7 @@ Or, if you are on Windows and do not have `grep` installed:
|
|||
hugo config | FINDSTR /I canon
|
||||
```
|
||||
|
||||
## Override URLS with Front Matter
|
||||
## Override URLs with Front Matter
|
||||
|
||||
In addition to specifying permalink values in your site configuration for different content sections, Hugo provides even more granular control for individual pieces of content.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ If you are having trouble following the installation guides for Go, check out [G
|
|||
|
||||
### Install Go From Source
|
||||
|
||||
[Download the latest stable version of Go][godl] and follow the official [Golang installation guide][goinstall].
|
||||
[Download the latest stable version of Go][godl] and follow the official [Go installation guide][goinstall].
|
||||
|
||||
Once you're finished installing Go, let's confirm everything is working correctly. Open a terminal---or command line under Windows--and type the following:
|
||||
|
||||
|
@ -390,7 +390,7 @@ Thank you for reading through this contribution guide. Hopefully, we will see yo
|
|||
|
||||
Feel free to [open an issue][newissue] if you think you found a bug or you have a new idea to improve Hugo. We are happy to hear from you.
|
||||
|
||||
## Additional References for Learning Git and Golang
|
||||
## Additional References for Learning Git and Go
|
||||
|
||||
* [Codecademy's Free "Learn Git" Course][codecademy] (Free)
|
||||
* [Code School and GitHub's "Try Git" Tutorial][trygit] (Free)
|
||||
|
|
|
@ -35,9 +35,9 @@ You can limit the number of matches in the list with a third parameter. The foll
|
|||
```
|
||||
|
||||
{{% note %}}
|
||||
Hugo uses Golang's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax).
|
||||
Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax).
|
||||
|
||||
If you are just learning RegEx, or at least Golang's flavor, you can practice pattern matching in the browser at <https://regex101.com/>.
|
||||
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 %}}
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ Assuming a key-value of `date: 2017-03-03` in a content file's front matter, you
|
|||
{{ .PublishDate.Format "January 2, 2006" }} => March 3, 2017
|
||||
```
|
||||
|
||||
For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat], which will still leverage the Golang layout string explained below but uses a slightly different syntax.
|
||||
For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat], which will still leverage the Go layout string explained below but uses a slightly different syntax.
|
||||
|
||||
## Go's Layout String
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ toc: false
|
|||
aliases: []
|
||||
---
|
||||
|
||||
`len` is a built-in function in Golang that returns the length of a variable according to its type. From the Golang documentation:
|
||||
`len` is a built-in function in Go that returns the length of a variable according to its type. From the Go documentation:
|
||||
|
||||
> Array: the number of elements in v.
|
||||
>
|
||||
|
|
|
@ -37,7 +37,7 @@ would produce the following:
|
|||
</div>
|
||||
```
|
||||
|
||||
The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Golang's layout string.
|
||||
The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Go's layout string.
|
||||
|
||||
{{% note %}}
|
||||
Older Hugo themes may still be using the obsolete Page’s `.Now` (uppercase with leading dot), which causes build error that looks like the following:
|
||||
|
|
|
@ -25,7 +25,7 @@ aliases: []
|
|||
```
|
||||
|
||||
{{% note %}}
|
||||
Hugo uses Golang's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax).
|
||||
Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), which is the same general syntax used by Perl, Python, and other languages but with a few minor differences for those coming from a background in PCRE. For a full syntax listing, see the [GitHub wiki for re2](https://github.com/google/re2/wiki/Syntax).
|
||||
|
||||
If you are just learning RegEx, or at least Golang's flavor, you can practice pattern matching in the browser at <https://regex101.com/>.
|
||||
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 %}}
|
||||
|
|
|
@ -210,6 +210,9 @@ theme ("")
|
|||
themesDir ("themes")
|
||||
: The directory where Hugo reads the themes from.
|
||||
|
||||
timeout (10000)
|
||||
: Timeout for generating page contents, in milliseconds (defaults to 10 seconds). *Note:* this is used to bail out of recursive content generation, if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents) you might need to raise this limit.
|
||||
|
||||
title ("")
|
||||
: Site title.
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ If you're already using Nanobox and just need deployment instructions, you can s
|
|||
|
||||
## What You'll Need
|
||||
|
||||
With Nanobox you don't need to worry about having Golang or Hugo installed. They'll be installed as part of the development environment created for you.
|
||||
With Nanobox you don't need to worry about having Go or Hugo installed. They'll be installed as part of the development environment created for you.
|
||||
|
||||
To get started you'll just need the following three items:
|
||||
|
||||
|
@ -133,7 +133,7 @@ Make sure to check the version of Hugo you have installed and update the install
|
|||
|
||||
### Generating a New Hugo App
|
||||
|
||||
You'll generate your new application from inside the Nanobox VM (this is why you don't need to worry about having Golang or Hugo installed).
|
||||
You'll generate your new application from inside the Nanobox VM (this is why you don't need to worry about having Go or Hugo installed).
|
||||
|
||||
Run the following command to drop into a Nanobox console (inside the VM) where your codebase is mounted:
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ The following examples use GitHub, but other git providers will follow a similar
|
|||
|
||||
![Screenshot of the homepage for app.netlify.com, containing links to the most popular hosted git solutions.](/images/hosting-and-deployment/hosting-on-netlify/netlify-signup.jpg)
|
||||
|
||||
Selecting GitHub will bring up a typical modal you've seen through other application that use GitHub for authentication. Select "Authorize application."
|
||||
Selecting GitHub will bring up an authorization modal for authentication. Select "Authorize application."
|
||||
|
||||
![Screenshot of the authorization popup for Netlify and GitHub.](/images/hosting-and-deployment/hosting-on-netlify/netlify-first-authorize.jpg)
|
||||
|
||||
|
|
BIN
content/en/news/0.41-relnotes/featured-hugo-41-poster.png
Normal file
BIN
content/en/news/0.41-relnotes/featured-hugo-41-poster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
64
content/en/news/0.41-relnotes/index.md
Normal file
64
content/en/news/0.41-relnotes/index.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
---
|
||||
date: 2018-05-25
|
||||
title: "Hugo 0.41: Privacy Configuration for GDPR"
|
||||
description: "Hugo 0.41 adds a new site configuration section to meet the new General Data Protection Regulation (GDPR)."
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
|
||||
In Hugo `0.41` we add a new **Privacy Configuration** section to meet the new regulations in the new **General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation))**. Many have contributed work on this project, but a special thanks to [@onedrawingperday](https://github.com/onedrawingperday), [@jhabdas](https://github.com/jhabdas), and [@it-gro](https://github.com/it-gro).
|
||||
|
||||
> You can read more about the new Privacy Config [here](https://gohugo.io/about/hugo-and-gdpr/).
|
||||
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 25917+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 446+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 231+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
## Notes
|
||||
|
||||
* We have fixed an issue where we sent the wrong `.Site` object into the archetype templates used in `hugo new`. This meant that if you wanted to access site params and some other fields you needed to use `.Site.Info.Params` etc. This release fixes that so now you can use the same construct in the archetype templates as in the regular templates.
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Alias tweet shortode to twitter [3bfe8f4b](https://github.com/gohugoio/hugo/commit/3bfe8f4be653f44674293685cb5750d90668b2f6) [@bep](https://github.com/bep) [#4765](https://github.com/gohugoio/hugo/issues/4765)
|
||||
* Adjust GA templates [f45b522e](https://github.com/gohugoio/hugo/commit/f45b522ebffafc61a3cb9b694bc3542747c73e07) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Wrap the relevant templates with the privacy policy disable check [67892073](https://github.com/gohugoio/hugo/commit/6789207347fc2df186741644a6fe968d41ea9077) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Extract internal templates [34ad9a4f](https://github.com/gohugoio/hugo/commit/34ad9a4f178fcf50abe7246ad9d30b294327da16) [@bep](https://github.com/bep) [#4457](https://github.com/gohugoio/hugo/issues/4457)
|
||||
* Use double quotes instead of back quotes [b2b500f5](https://github.com/gohugoio/hugo/commit/b2b500f563c3bb36751a4c1610df113c4daad604) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* Provide the correct .Site object to archetype templates [ab02594e](https://github.com/gohugoio/hugo/commit/ab02594e09c0414124186e42d67d52d474dd341a) [@bep](https://github.com/bep) [#4732](https://github.com/gohugoio/hugo/issues/4732)
|
||||
* Document the GDPR Privacy Config [c71f201f](https://github.com/gohugoio/hugo/commit/c71f201fd93287afa7cb7b875bd523c25e48400c) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Add no-cookie variants of the Google Analytics templates [a51945ea] (https://github.com/gohugoio/hugo/commit/a51945ea4b99d17501d73cf3367926683e4a4dfd) [@bep](https://github.com/bep) [#4775](https://github.com/gohugoio/hugo/issues/4775)
|
||||
* Remove youtube_simple for now [448081b8](https://github.com/gohugoio/hugo/commit/448081b840db4a23c0c49c2d869ac207dcb6ac40) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Add anonymizeIP to GA privacy config [1f1d955b](https://github.com/gohugoio/hugo/commit/1f1d955b56471e41d5288c57f1ef8333dc297120) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Support DNT in Twitter shortcode for GDPR [9753cb59](https://github.com/gohugoio/hugo/commit/9753cb59f1f1d866943a485dd7c917d1b68f6eda) [@bep](https://github.com/bep) [#4765](https://github.com/gohugoio/hugo/issues/4765)
|
||||
* Regenerate embedded templates [6aa2c385](https://github.com/gohugoio/hugo/commit/6aa2c38507aa1c2246222684717b4d69d26b03d7) [@bep](https://github.com/bep) [#4761](https://github.com/gohugoio/hugo/issues/4761)
|
||||
* Add instagram_simple shortcode [9ad46a20](https://github.com/gohugoio/hugo/commit/9ad46a20357a7e28b405feef5c8f7d4501186da6) [@bep](https://github.com/bep) [#4748](https://github.com/gohugoio/hugo/issues/4748)
|
||||
* Go fmt [4256de33](https://github.com/gohugoio/hugo/commit/4256de3392d320a5a47fcab49882f2a3249c2163) [@bep](https://github.com/bep)
|
||||
* Remove the id from youtube_simple [bed7a0fa](https://github.com/gohugoio/hugo/commit/bed7a0faff90bbe389629347026853b7bc4c8c3f) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Add an unified .Site.Config with a services section [4ddcf52c](https://github.com/gohugoio/hugo/commit/4ddcf52ccc7af3e23109ebaac1f0486087a212ba) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Move the privacy config into a parent [353148c2](https://github.com/gohugoio/hugo/commit/353148c2bc2cdb9f2eb8ee967ba756ce09323801) [@bep](https://github.com/bep) [#4751](https://github.com/gohugoio/hugo/issues/4751)
|
||||
* Make the simple mode YouTube links schemaless [69ee6b41](https://github.com/gohugoio/hugo/commit/69ee6b41e36625595e2bcabcde0bc58663e5b93c) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Add YouTube shortcode simple mode [88e35686](https://github.com/gohugoio/hugo/commit/88e356868062cc618385cd22b6730df2459518cd) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Do not return error on .Get "class" and vice versa in shortcodes [2f17f937](https://github.com/gohugoio/hugo/commit/2f17f9378ad96c4a9f6d7d24b0776ed3a25a08a3) [@bep](https://github.com/bep) [#4745](https://github.com/gohugoio/hugo/issues/4745)
|
||||
* Create SUPPORT.md [0a7027e2](https://github.com/gohugoio/hugo/commit/0a7027e2a87283743d5310b74e18666e4a64d3e1) [@coliff](https://github.com/coliff)
|
||||
* Add PrivacyEnhanced mode for YouTube to the GDPR Policy [5f24a2c0](https://github.com/gohugoio/hugo/commit/5f24a2c047db0bff8c9e267bfa8ef8e43e6bd24e) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Add RespectDoNotTrack to GDPR privacy policy for Google Analytics [71014201](https://github.com/gohugoio/hugo/commit/710142016b140538bfc11e48bb32d26fa685b2ad) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Add the foundation for GDPR privacy configuration [0bbdef98](https://github.com/gohugoio/hugo/commit/0bbdef986d8eecf4fabe9a372e33626dbdfeb36b) [@bep](https://github.com/bep) [#4616](https://github.com/gohugoio/hugo/issues/4616)
|
||||
* Show site build warning in TestPageBundlerSiteRegular [9bd4236e](https://github.com/gohugoio/hugo/commit/9bd4236e1b3bee332439eef50e12d4481340c3eb) [@anthonyfok](https://github.com/anthonyfok) [#4672](https://github.com/gohugoio/hugo/issues/4672)
|
||||
* Do not show empty BuildDate in version [4eedb377](https://github.com/gohugoio/hugo/commit/4eedb377b60fb6742c97398942a0045ff2a824c4) [@anthonyfok](https://github.com/anthonyfok)
|
||||
* Improve markup determination logic [2fb9af59](https://github.com/gohugoio/hugo/commit/2fb9af59c14b1732ba1a2f21794e2cf8dfca0604) [@vassudanagunta](https://github.com/vassudanagunta)
|
||||
* Update CONTRIBUTING.md [b6ededf0](https://github.com/gohugoio/hugo/commit/b6ededf0591a81667754f1dccef2c6fe6d342811) [@domdomegg](https://github.com/domdomegg)
|
||||
|
||||
## Fixes
|
||||
|
||||
* Avoid ANSI character output on Windows [568b4335](https://github.com/gohugoio/hugo/commit/568b4335c20effb46168bd639317a3420f563463) [@LorenzCK](https://github.com/LorenzCK) [#4462](https://github.com/gohugoio/hugo/issues/4462)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ Go templates provide an extremely simple template language that adheres to the b
|
|||
|
||||
## Basic Syntax
|
||||
|
||||
Golang templates are HTML files with the addition of [variables][variables] and [functions][functions]. Golang template variables and functions are accessible within `{{ }}`.
|
||||
Go templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go template variables and functions are accessible within `{{ }}`.
|
||||
|
||||
### Access a Predefined Variable
|
||||
|
||||
|
@ -104,7 +104,7 @@ Go templates only ship with a few basic functions but also provide a mechanism f
|
|||
Note that both examples make use of Go template's [math functions][].
|
||||
|
||||
{{% note "Additional Boolean Operators" %}}
|
||||
There are more boolean operators than those listed in the Hugo docs in the [Golang template documentation](http://golang.org/pkg/text/template/#hdr-Functions).
|
||||
There are more boolean operators than those listed in the Hugo docs in the [Go template documentation](http://golang.org/pkg/text/template/#hdr-Functions).
|
||||
{{% /note %}}
|
||||
|
||||
## Includes
|
||||
|
@ -526,8 +526,8 @@ Go allows you to do more than what's shown here. Using Hugo's [`where` function]
|
|||
[first]: /functions/first/
|
||||
[front matter]: /content-management/front-matter/
|
||||
[functions]: /functions/ "See the full list of Hugo's templating functions with a quick start reference guide and basic and advanced examples."
|
||||
[Go html/template]: http://golang.org/pkg/html/template/ "Godocs references for Golang's html templating"
|
||||
[gohtmltemplate]: http://golang.org/pkg/html/template/ "Godocs references for Golang's html templating"
|
||||
[Go html/template]: http://golang.org/pkg/html/template/ "Godocs references for Go's html templating"
|
||||
[gohtmltemplate]: http://golang.org/pkg/html/template/ "Godocs references for Go's html templating"
|
||||
[index]: /functions/index/
|
||||
[math functions]: /functions/math/
|
||||
[partials]: /templates/partials/ "Link to the partial templates page inside of the templating section of the Hugo docs"
|
||||
|
|
|
@ -77,12 +77,12 @@ Using the above example, let's assume you have the following in `content/post/_i
|
|||
|
||||
{{< code file="content/post/_index.md" >}}
|
||||
---
|
||||
title: My Golang Journey
|
||||
title: My Go Journey
|
||||
date: 2017-03-23
|
||||
publishdate: 2017-03-24
|
||||
---
|
||||
|
||||
I decided to start learning Golang in March 2017.
|
||||
I decided to start learning Go in March 2017.
|
||||
|
||||
Follow my journey through this new blog.
|
||||
{{< /code >}}
|
||||
|
@ -118,9 +118,9 @@ This above will output the following HTML:
|
|||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1>My Golang Journey</h1>
|
||||
<h1>My Go Journey</h1>
|
||||
</header>
|
||||
<p>I decided to start learning Golang in March 2017.</p>
|
||||
<p>I decided to start learning Go in March 2017.</p>
|
||||
<p>Follow my journey through this new blog.</p>
|
||||
</article>
|
||||
<ul>
|
||||
|
@ -457,7 +457,7 @@ In the above example, you may want `{{.Title}}` to point the `title` field you h
|
|||
|
||||
### By Page Parameter in Date Format
|
||||
|
||||
The following template takes grouping by `date` a step further and uses Golang's layout string. See the [`Format` function][] for more examples of how to use Golang's layout string to format dates in Hugo.
|
||||
The following template takes grouping by `date` a step further and uses Go's layout string. See the [`Format` function][] for more examples of how to use Go's layout string to format dates in Hugo.
|
||||
|
||||
{{< code file="layouts/partials/by-page-param-as-date.html" >}}
|
||||
<!-- Groups content by month according to the "param_key" field in front matter -->
|
||||
|
|
|
@ -20,6 +20,9 @@ toc: false
|
|||
|
||||
[Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields:
|
||||
|
||||
.Ordinal
|
||||
: Zero-based ordinal in relation to its parent. If the parent is the page itself, this ordinal will represent the position of this shortcode in the page content.
|
||||
|
||||
.Parent
|
||||
: provides access to the parent shortcode context in nested shortcodes. This can be very useful for inheritance of common shortcode parameters from the root.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ publish = "public"
|
|||
command = "hugo"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.40.3"
|
||||
HUGO_VERSION = "0.41"
|
||||
HUGO_ENV = "production"
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
||||
|
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
|
|||
command = "hugo --enableGitInfo"
|
||||
|
||||
[context.split1.environment]
|
||||
HUGO_VERSION = "0.40.3"
|
||||
HUGO_VERSION = "0.41"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "hugo -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.40.3"
|
||||
HUGO_VERSION = "0.41"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "hugo -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "0.40.3"
|
||||
HUGO_VERSION = "0.41"
|
||||
|
||||
[context.next.environment]
|
||||
HUGO_ENABLEGITINFO = "true"
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
Loading…
Reference in a new issue