Squashed 'docs/' changes from d9c8fc220..f9a5dc59b

f9a5dc59b Code Toggle block added to doc site final batch Templates  Variables 
4d4107968 Add eSolia as new sponsor
000fed94e Add missing closing tags for li in menu template example
f462b620f Clarify that local CSV files cannot be inside data dir
ae083641a Added hugo-search-index to list of search tools
e2b64d0b7 Remove extra link
2fb4c9af5 Release 0.38.2
59b1c9853 releaser: Prepare repository for 0.39-DEV
92f6a05ea releaser: Add release notes to /docs for release of 0.38.2
76244729e releaser: Bump versions for release of 0.38.2
0960c5fb3 Adjust gray color of tab vs pane in code-toggle.
8ae3aadd7 use code-toggle shortcode when relevant Content Management 
455b8b53b Update related.md
6e8d19090 Release 0.38.1
079ba044c releaser: Prepare repository for 0.39-DEV
6f23e6ec1 releaser: Add release notes to /docs for release of 0.38.1
c51692ceb releaser: Bump versions for release of 0.38.1
d37ea6a5e Update related.md
faa2707d0 Update index.md
9ce901dcb Add a forgotten language tag (go-html-template) for code
b05aaed14 Update where.md
4d4760819 Fix typo in code-toggle.md
c5a5250a1 Use the new go-html-template Chroma lexer
2de831f4b Add the full list of Chroma lexers
18114d4b4 Update Output Formats
b069d7f84 Release 0.38
caaa8355a releaser: Prepare repository for 0.39-DEV
e45b7cc9f releaser: Add release notes to /docs for release of 0.38
40f40906e releaser: Bump versions for release of 0.38
2d52e2e4e Merge commit 'ed8bf081fdbf336e026517b7e1b123c039014ab5'
1439f64a0 docs: Generate docshelper data
5b0edfd79 Add .Site.IsServer
fdb579ad1 Merge commit '0a23baa6a90901f772c234107c4f12c16c76f4aa'
7b71da1f8 hugolib: Add Reset method to delete key from Scratch
63a131664 docs: Add docs for lang.Merge
55cba056d Merge commit '3886fc1fef6ac19d58b9ba1bb642d0c6c9a54031'
6f301ebcc docs: Add docs on the new front matter configuration
7ba35ef56 Merge commit 'c0290655825e7bb36e13fb39f89d85b392cf1adc'
3d2cab754 releaser: Prepare repository for 0.38-DEV
095e888e1 releaser: Add release notes to /docs for release of 0.37.1
593fa0dcb releaser: Bump versions for release of 0.37.1
c18c1df54 releaser: Prepare repository for 0.38-DEV

git-subtree-dir: docs
git-subtree-split: f9a5dc59b77d15cc2c7534e10bcd90bcfeda7bb4
This commit is contained in:
Bjørn Erik Pedersen 2018-04-16 07:43:59 +02:00
parent ed8bf081fd
commit 047c4188df
46 changed files with 13748 additions and 370 deletions

View file

@ -70,7 +70,7 @@ twitter = "GoHugoIO"
[params]
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.37.1"
release = "0.38.1"
## Setting this to true will add a "noindex" to *EVERY* page on the site
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)

View file

@ -61,7 +61,7 @@ Note that changes to any resource inside the `content` folder will trigger a rel
#### List all Resources
```html
```go-html-template
{{ range .Resources }}
<li><a href="{{ .RelPermalink }}">{{ .ResourceType | title }}</a></li>
{{ end }}
@ -73,7 +73,7 @@ For an absolute URL, use `.Permalink`.
#### List All Resources by Type
```html
```go-html-template
{{ with .Resources.ByType "image" }}
{{ end }}
@ -83,7 +83,7 @@ Type here is `page` for pages, else the main type in the MIME type, so `image`,
#### Get a Specific Resource
```html
```go-html-template
{{ $logo := .Resources.GetByPrefix "logo" }}
{{ with $logo }}
{{ end }}
@ -91,7 +91,7 @@ Type here is `page` for pages, else the main type in the MIME type, so `image`,
#### Include Page Resource Content
```html
```go-html-template
{{ with .Resources.ByType "page" }}
{{ range . }}
<h3>{{ .Title }}</h3>
@ -146,7 +146,7 @@ This is the shortcode used in the examples above:
And it is used like this:
```html
```go-html-template
{{</* imgproc sunset Resize "300x" */>}}
```

View file

@ -27,15 +27,11 @@ Hugo comes with all the code you need to load Disqus into your templates. Before
### Configure Disqus
Disqus comments require you set a single value in your [site's configuration file][configuration]. The following show the configuration variable in a `config.toml` and `config.yml`, respectively:
Disqus comments require you set a single value in your [site's configuration file][configuration] like so:
```
{{< code-toggle copy="false" >}}
disqusShortname = "yourdiscussshortname"
```
```
disqusShortname: "yourdiscussshortname"
```
{{</ code-toggle >}}
For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter][] of a single content file:

View file

@ -34,9 +34,9 @@ YAML
JSON
: a single JSON object surrounded by '`{`' and '`}`', followed by a new line.
### TOML Example
### Example
```
{{< code-toggle >}}
+++
title = "spf13-vim 3.0 release and new website"
description = "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
@ -48,39 +48,7 @@ categories = [
]
slug = "spf13-vim-3-0-release-and-new-website"
+++
```
### YAML Example
```
---
title: "spf13-vim 3.0 release and new website"
description: "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
tags: [ ".vimrc", "plugins", "spf13-vim", "vim" ]
lastmod: 2015-12-23
date: "2012-04-06"
categories:
- "Development"
- "VIM"
slug: "spf13-vim-3-0-release-and-new-website"
---
```
### JSON Example
```
{
"title": "spf13-vim 3.0 release and new website",
"description": "spf13-vim is a cross platform distribution of vim plugins and resources for Vim.",
"tags": [ ".vimrc", "plugins", "spf13-vim", "vim" ],
"date": "2012-04-06",
"categories": [
"Development",
"VIM"
],
"slug": "spf13-vim-3-0-release-and-new-website"
}
```
{{</ code-toggle >}}
## Front Matter Variables

View file

@ -23,7 +23,7 @@ The `image` is a [Page Resource]({{< relref "content-management/page-resources"
To get all images in a [Page Bundle]({{< relref "content-management/organization#page-bundles" >}}):
```html
```go-html-template
{{ with .Resources.ByType "image" }}
{{ end }}
@ -131,7 +131,7 @@ This is the shortcode used in the examples above:
And it is used like this:
```html
```go-html-template
{{</* imgproc sunset Resize "300x" /*/>}}
```

View file

@ -118,9 +118,9 @@ menu:
You can also add entries to menus that arent attached to a piece of content. This takes place in your Hugo project's [`config` file][config].
Heres an example snippet pulled from a `config.toml`:
Heres an example snippet pulled from a configuration file:
{{< code file="config.toml" >}}
{{< code-toggle file="config.toml" >}}
[[menu.main]]
name = "about hugo"
pre = "<i class='fa fa-heart'></i>"
@ -132,23 +132,7 @@ Heres an example snippet pulled from a `config.toml`:
pre = "<i class='fa fa-road'></i>"
weight = -100
url = "/getting-started/"
{{< /code >}}
Here's the equivalent snippet in a `config.yaml`:
{{< code file="config.yml" >}}
menu:
main:
- name: "about hugo"
pre: "<i class='fa fa-heart'></i>"
weight: -110
identifier: "about"
url: "/about/"
- name: "getting started"
pre: "<i class='fa fa-road'></i>"
weight: -100
url: "/getting-started/"
{{< /code >}}
{{< /code-toggle >}}
{{% note %}}
The URLs must be relative to the context root. If the `baseURL` is `https://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will override the baseURL. If the value used for `URL` in the above example is `https://subdomain.example.com/`, the output will be `https://subdomain.example.com`.

View file

@ -21,9 +21,9 @@ You should define the available languages in a `languages` section in your site
## Configure Languages
The following is an example of a TOML site configuration for a multilingual Hugo project:
The following is an example of a site configuration for a multilingual Hugo project:
{{< code file="config.toml" download="config.toml" >}}
{{< code-toggle file="config" >}}
DefaultContentLanguage = "en"
copyright = "Everything is mine"
@ -45,7 +45,7 @@ weight = 2
linkedin = "lien-francais"
[languages.fr.params.navigation]
help = "Aide"
{{< /code >}}
{{< /code-toggle >}}
Anything not defined in a `[languages]` block will fall back to the global
value for that key (e.g., `copyright` for the English [`en`] language).
@ -92,7 +92,7 @@ This means that you can now configure a `baseURL` per `language`:
Example:
```bash
{{< code-toggle file="config" >}}
[languages]
[languages.no]
baseURL = "https://example.no"
@ -105,7 +105,7 @@ baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```
{{</ code-toggle >}}
With the above, the two sites will be generated into `public` with their own root:
@ -132,7 +132,7 @@ Live reload and `--navigateToChanged` between the servers work as expected.
Taxonomies and [Blackfriday configuration][config] can also be set per language:
{{< code file="bf-config.toml" >}}
{{< code-toggle file="config" >}}
[Taxonomies]
tag = "tags"
@ -152,7 +152,7 @@ weight = 2
title = "Français"
[languages.fr.Taxonomies]
plaque = "plaques"
{{< /code >}}
{{</ code-toggle >}}
## Translate Your Content
@ -178,11 +178,6 @@ You can also set the key used to link the translations explicitly in front matte
translationKey: "my-story"
```
{{% note %}}
**Before Hugo 0.31**, the file's directory was not considered when looking for translations. This did not work when you named all of your content files, say, `index.md`. Now we use the full content path.
{{% /note %}}
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:
```yaml
@ -192,6 +187,7 @@ slug: "a-propos"
At render, Hugo will build both `/about/` and `/a-propos/` as properly linked translated pages.
For merging of content from other languages (i.e. missing content translations), see [lang.Merge](/functions/lang.merge/).
## Link to Translated Content
@ -354,7 +350,7 @@ The rendering of the main navigation works as usual. `.Site.Menus` will just con
```
## Missing translations
## Missing Translations
If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
@ -364,6 +360,8 @@ While translating a Hugo website, it can be handy to have a visual indicator of
Hugo will generate your website with these missing translation placeholders. It might not be suited for production environments.
{{% /note %}}
For merging of content from other languages (i.e. missing content translations), see [lang.Merge](/functions/lang.merge/).
## Multilingual Themes support
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:

View file

@ -93,7 +93,7 @@ anywhere:
But you can get it by `.Site.GetPage`. Here is an example:
```html
```go-html-template
{{ $headless := .Site.GetPage "page" "some-headless-bundle" }}
{{ $reusablePages := $headless.Resources.Match "author*" }}
<h2>Authors</h2>

View file

@ -83,9 +83,9 @@ params
: A map of custom key/values.
### Resources metadata: YAML Example
### Resources metadata example
~~~yaml
{{< code-toggle copy="false">}}
title: Application
date : 2018-01-25
resources :
@ -108,41 +108,7 @@ resources :
- src : "**.docx"
params :
icon : "word"
~~~
### Resources metadata: TOML Example
~~~toml
title = Application
date : 2018-01-25
[[resources]]
src = "images/sunset.jpg"
name = "header"
[[resources]]
src = "documents/photo_specs.pdf"
title = "Photo Specifications"
[resources.params]
icon = "photo"
[[resources]]
src = "documents/guide.pdf"
title = "Instruction Guide"
[[resources]]
src = "documents/checklist.pdf"
title = "Document Checklist"
[[resources]]
src = "documents/payment.docx"
title = "Proof of Payment"
[[resources]]
src = "**.pdf"
name = "pdf-file-:counter"
[resources.params]
icon = "pdf"
[[resources]]
src = "**.docx"
[resources.params]
icon = "word"
~~~
{{</ code-toggle >}}
From the example above:
@ -165,14 +131,14 @@ The counter starts at 1 the first time they are used in either `name` or `title`
For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as:
~~~toml
{{< code-toggle copy="false">}}
[[resources]]
src = "*specs.pdf"
title = "Specification #:counter"
[[resources]]
src = "**.pdf"
name = "pdf-file-:counter"
~~~
{{</ code-toggle >}}
the `Name` and `Title` will be assigned to the resource files as follows:

View file

@ -34,6 +34,11 @@ To list up to 5 related pages is as simple as including something similar to thi
{{ end }}
{{< /code >}}
{{% note %}}
Read [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-relashionships-with-related-content/) for a great explanation more advanced usage of this feature.
{{% /note %}}
The full set of methods available on the page lists can bee seen in this Go interface:
```go

View file

@ -15,11 +15,11 @@ toc: true
The `static` folder is where you place all your **static files**, e.g. stylesheets, JavaScript, images etc.
You can set the name of the static folder to use in your configuration file, for example `config.toml`. From **Hugo 0.31** you can configure as many static directories as you need. All the files in all the static directories will form a union filesystem.
You can set the name of the static folder to use in your configuration file. From **Hugo 0.31** you can configure as many static directories as you need. All the files in all the static directories will form a union filesystem.
Example:
```toml
{{< code-toggle copy="false" file="config" >}}
staticDir = ["static1", "static2"]
[languages]
[languages.no]
@ -35,7 +35,7 @@ baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```
{{</ code-toggle >}}
In the above, with no theme used:

View file

@ -147,7 +147,7 @@ See [Highlight](/functions/highlight/).
It is also possible to add syntax highlighting with GitHub flavored code fences. To enable this, set the `pygmentsCodeFences` to `true` in Hugo's [configuration file](/getting-started/configuration/);
````
```html
```go-html-template
<section id="main">
<div>
<h1 id="title">{{ .Title }}</h1>
@ -159,6 +159,11 @@ It is also possible to add syntax highlighting with GitHub flavored code fences.
```
````
## List of Chroma Highlighting Languages
The full list of Chroma lexers and their aliases (which is the identifier used in the `hightlight` template func or when doing highlighting in code fences):
{{< chroma-lexers >}}
## Highlight with Pygments Classic

View file

@ -103,23 +103,14 @@ When taxonomies are used---and [taxonomy templates][] are provided---Hugo will a
Taxonomies must be defined in your [website configuration][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.
### Example: TOML Taxonomy Configuration
### Example: Taxonomy Configuration
```
{{< code-toggle copy="false" >}}
[taxonomies]
tag = "tags"
category = "categories"
series = "series"
```
### Example: YAML Taxonomy Configuration
```
taxonomies:
tag: "tags"
category: "categories"
series: "series"
```
{{</ code-toggle >}}
### Preserve Taxonomy Values
@ -145,53 +136,16 @@ Assigning content to a taxonomy is done in the [front matter][]. Simply create a
If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/).
{{% /note %}}
### Example: TOML Front Matter with Taxonomies
### Example: Front Matter with Taxonomies
```
+++
{{< code-toggle copy="false">}}
title = "Hugo: A fast and flexible static site generator"
tags = [ "Development", "Go", "fast", "Blogging" ]
categories = [ "Development" ]
series = [ "Go Web Dev" ]
slug = "hugo"
project_url = "https://github.com/gohugoio/hugo"
+++
```
### Example: YAML Front Matter with Taxonomies
```
---
title: "Hugo: A fast and flexible static site generator"
tags: ["Development", "Go", "fast", "Blogging"]
categories: ["Development"]
series: ["Go Web Dev"]
slug: "hugo"
project_url: "https://github.com/gohugoio/hugo"
---
```
### Example: JSON Front Matter with Taxonomies
```
{
"title": "Hugo: A fast and flexible static site generator",
"tags": [
"Development",
"Go",
"fast",
"Blogging"
],
"categories" : [
"Development"
],
"series" : [
"Go Web Dev"
],
"slug": "hugo",
"project_url": "https://github.com/gohugoio/hugo"
}
```
{{</ code-toggle >}}
## Order Taxonomies
@ -199,29 +153,15 @@ A content file can assign weight for each of its associate taxonomies. Taxonomic
The following TOML and YAML examples show a piece of content that has a weight of 22, which can be used for ordering purposes when rendering the pages assigned to the "a", "b" and "c" values of the `tags` taxonomy. It has also been assigned the weight of 44 when rendering the "d" category page.
### Example: TOML Taxonomic `weight`
### Example: Taxonomic `weight`
```
+++
{{< code-toggle copy="false" >}}
title = "foo"
tags = [ "a", "b", "c" ]
tags_weight = 22
categories = ["d"]
categories_weight = 44
+++
```
### Example: YAML Taxonomic `weight`
```
---
title: foo
tags: [ "a", "b", "c" ]
tags_weight: 22
categories: ["d"]
categories_weight: 44
---
```
{{</ code-toggle >}}
By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies.

View file

@ -29,19 +29,12 @@ These examples use the default values for `publishDir` and `contentDir`; i.e., `
For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
### YAML Permalinks Configuration Example
### Permalinks Configuration Example
{{< code file="config.yml" copy="false" >}}
{{< code-toggle file="config" copy="false" >}}
permalinks:
post: /:year/:month/:title/
{{< /code >}}
### TOML Permalinks Configuration Example
{{< code file="config.toml" copy="false" >}}
[permalinks]
post = "/:year/:month/:title/"
{{< /code >}}
{{< /code-toggle >}}
Only the content under `post/` will have the new URL structure. For example, the file `content/post/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.

View file

@ -0,0 +1,47 @@
---
title: lang.Merge
description: "Merge missing translations from other languages."
godocref: ""
workson: []
date: 2018-03-16
categories: [functions]
keywords: [multilingual]
menu:
docs:
parent: "functions"
toc: false
signature: ["lang.Merge FROM TO"]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
draft: false
aliases: []
comments:
---
As an example:
```bash
{{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }}
```
Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English.
A more practical example is to fill in the missing translations for the "minority languages" with content from the main language:
```bash
{{ $pages := .Site.RegularPages }}
{{ .Scratch.Set "pages" $pages }}
{{ $mainSite := .Sites.First }}
{{ if ne $mainSite .Site }}
{{ .Scratch.Set "pages" ($pages | lang.Merge $mainSite.RegularPages) }}
{{ end }}
{{ $pages := .Scratch.Get "pages" }}
```
{{% note %}}
Note that the slightly ugly `.Scratch` construct will not be needed once this is fixed: https://github.com/golang/go/issues/10608
{{% /note %}}

View file

@ -32,6 +32,7 @@ See [this Go issue](https://github.com/golang/go/issues/10608) for the main moti
* `Get` returns the `value` for the `key` given.
* `SetInMap` takes a `key`, `mapKey` and `value`
* `GetSortedMapValues` returns array of values from `key` sorted by `mapKey`
* `Delete` takes a `key` to remove
`Set` and `SetInMap` can store values of any type.
@ -69,6 +70,11 @@ The usage is best illustrated with some samples:
{{ $.Scratch.SetInMap "a3" "c" "CC" }}
{{ $.Scratch.SetInMap "a3" "b" "BB" }}
{{ $.Scratch.GetSortedMapValues "a3" }} {{/* => []interface {}{"AA", "BB", "CC"} */}}
{{ $.Scratch.Add "a" 1 }}
{{ $.Scratch.Delete "a" }}
{{ $.Scratch.Add "a" 2 }}
{{ $.Scratch.Get "a" }} {{/* => 2 */}}
```
{{% note %}}

View file

@ -22,7 +22,7 @@ needsexample: true
`where` filters an array to only the elements containing a matching value for a given field.
```
```go-html-template
{{ range where .Data.Pages "Section" "post" }}
{{ .Content }}
{{ end }}
@ -36,7 +36,7 @@ series: golang
+++
```
```
```go-html-template
{{ range where .Site.Pages "Params.series" "golang" }}
{{ .Content }}
{{ end }}
@ -44,7 +44,7 @@ series: golang
It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`.
```
```go-html-template
{{ range where .Data.Pages "Section" "!=" "post" }}
{{ .Content }}
{{ end }}
@ -81,7 +81,7 @@ The following logical operators are available with `where`:
## Use `where` with `intersect`
```
```go-html-template
{{ range where .Site.Pages ".Params.tags" "intersect" .Params.tags }}
{{ if ne .Permalink $.Permalink }}
{{ .Render "summary" }}
@ -113,7 +113,7 @@ The following grabs the first five content files in `post` using the [default or
You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
```
```go-html-template
{{ range where (where .Data.Pages "Section" "blog" ) ".Params.featured" "!=" "true" }}
```
@ -128,7 +128,7 @@ Only the following operators are available for `nil`
* `=`, `==`, `eq`: True if the given field is not set.
* `!=`, `<>`, `ne`: True if the given field is set.
```
```go-html-template
{{ range where .Data.Pages ".Params.specialpost" "!=" nil }}
{{ .Content }}
{{ end }}
@ -140,7 +140,7 @@ This is especially important for themes, but to list the most relevant pages on
This will, by default, list pages from the _section with the most pages_.
```html
```go-html-template
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
```

View file

@ -15,7 +15,7 @@ toc: true
This is an exemple for the Config Toggle shortcode.
Its purpose is to let users choose a Config language by clicking on its corresponding tab. Upon doing so, every Code toggler on the page will be switched to the target language. Also, target language will be saved in user's `localStorage` so when they go to a different pages, Code Toggler display their last "toggled" config language.
## That Congig Toggler
## That Config Toggler
{{< code-toggle file="config">}}
@ -72,4 +72,4 @@ blackfriday:
plainIDAnchors: true
extensions:
- hardLineBreak
{{< /code >}}
{{< /code >}}

View file

@ -98,6 +98,10 @@ enableMissingTranslationPlaceholders (false)
enableRobotsTXT (false)
: Enable generation of `robots.txt` file.
frontmatter
: See [Front matter Configuration](#configure-front-matter).
footnoteAnchorPrefix ("")
: Prefix for footnote anchors.
@ -246,9 +250,11 @@ Similar to the template [lookup order][], Hugo has a default set of rules for se
In your `config` file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
## YAML Configuration
## Example Configuration
{{< code file="config.yml">}}
The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]:
{{< code-toggle file="config">}}
baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
footnoteReturnLinkContents: "↩"
@ -262,50 +268,7 @@ params:
- "foo1"
- "foo2"
SidebarRecentLimit: 5
{{< /code >}}
The following is a typical example of a YAML configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]:
{{< code file="config.yml">}}
baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
footnoteReturnLinkContents: "↩"
permalinks:
post: /:year/:month/:title/
params:
Subtitle: "Hugo is Absurdly Fast!"
AuthorName: "Jon Doe"
GitHubUser: "spf13"
ListOfFoo:
- "foo1"
- "foo2"
SidebarRecentLimit: 5
{{< /code >}}
## TOML Configuration
The following is an example of a TOML configuration file. The values under `[params]` will populate the `.Site.Params` variable for use in [templates][]:
{{< code file="config.toml">}}
contentDir = "content"
layoutDir = "layouts"
publishDir = "public"
buildDrafts = false
baseURL = "https://yoursite.example.com/"
canonifyURLs = true
title = "My Hugo Site"
[taxonomies]
category = "categories"
tag = "tags"
[params]
subtitle = "Hugo is Absurdly Fast!"
author = "John Doe"
{{< /code >}}
{{< /code-toggle >}}
## Configure with Environment Variables
@ -337,6 +300,67 @@ ignoreFiles = [ "\\.foo$", "\\.boo$" ]
The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy.
## Configure Front Matter
### Configure Dates
Dates are important in Hugo, and you can configure how Hugo assigns dates to your content pages. You do this by adding a `frontmatter` section to your `config.toml`.
The default configuration is:
```toml
[frontmatter]
date = ["date","publishDate", "lastmod"]
lastmod = [":git" "lastmod", "date","publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]
```
If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
```toml
[frontmatter]
date = [ "myDate", ":default"]
```
The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date.
In the list to the right, values starting with ":" are date handlers with a special meaning (see below). The others are just names of date parameters (case insensitive) in your front matter configuration. Also note that Hugo have some built-in aliases to the above: `lastmod` => `modified`, `publishDate` => `pubdate`, `published` and `expiryDate` => `unpublishdate`. With that, as an example, using `pubDate` as a date in front matter, will, by default, be assigned to `.PublishDate`.
The special date handlers are:
`:fileModTime`
: Fetches the date from the content file's last modification timestamp.
An example:
```toml
[frontmatter]
lastmod = ["lastmod" ,":fileModTime", ":default"]
```
The above will try first to extract the value for `.Lastmod` starting with the `lastmod` front matter parameter, then the content file's modification timestamp. The last, `:default` should not be needed here, but Hugo will finally look for a valid date in `:git`, `date` and then `publishDate`.
`:filename`
: Fetches the date from the content file's filename. For example, `218-02-22-mypage.md` will extract the date `218-02-22`. Also, if `slug is not set, `mypage` will be used as the value for `.Slug`.
An example:
```toml
[frontmatter]
date = [":filename", ":default"]
```
The above will try first to extract the value for `.Date` from the filename, then it will look in front matter parameters `date`, `publishDate` and lastly `lastmod`.
`:git`
: This is the Git author date for the last revision of this content file. This will only be set if `--enableGitInfo` is set or `enableGitInfo = true` is set in site config.
## Configure Blackfriday
[Blackfriday](https://github.com/russross/blackfriday) is Hugo's built-in Markdown rendering engine.
@ -352,22 +376,13 @@ However, if you have specific needs with respect to Markdown, Hugo exposes some
2. Blackfriday flags must be grouped under the `blackfriday` key and can be set on both the site level *and* the page level. Any setting on a page will override its respective site setting.
{{% /note %}}
{{< code file="bf-config.toml" >}}
{{< code-toggle file="config" >}}
[blackfriday]
angledQuotes = true
fractions = false
plainIDAnchors = true
extensions = ["hardLineBreak"]
{{< /code >}}
{{< code file="bf-config.yml" >}}
blackfriday:
angledQuotes: true
fractions: false
plainIDAnchors: true
extensions:
- hardLineBreak
{{< /code >}}
{{< /code-toggle >}}
## Configure Additional Output Formats

View file

@ -9,7 +9,7 @@ categories: ["Releases"]
Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template:
```html
```go-html-template
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>

View file

@ -11,7 +11,7 @@ images:
Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template:
```html
```go-html-template
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>

View file

@ -0,0 +1,102 @@
---
date: 2018-01-31
title: "0.35"
description: "0.35"
slug: "0.35"
categories: ["Releases"]
---
The most notable new feature in Hugo `0.35` is perhaps **Headless Bundles**.
This means that you in your `index.md` front matter can say:
```yaml
headless: true
```
And
* it will have no `Permalink` and no rendered HTML in `/public`
* it will not be part of `.Site.RegularPages` etc.
But you can get it by:
* `.Site.GetPage ...`
The use cases are many:
* Shared media libraries
* Reusable page content "snippets"
* ...
But this release contains more goodies than possible to sum up in one paragraph, so study the release notes carefully. It represents **42 contributions by 8 contributors** to the main Hugo code base.
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@vassudanagunta](https://github.com/vassudanagunta), [@yanzay](https://github.com/yanzay), and [@robertbasic](https://github.com/robertbasic) for their ongoing contributions.
And as always a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **28 contributions by 5 contributors**. A special thanks to [@bep](https://github.com/bep), [@kaushalmodi](https://github.com/kaushalmodi), [@regisphilibert](https://github.com/regisphilibert), and [@salim-b](https://github.com/salim-b) for their work on the documentation site.
Hugo now has:
* 22967+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 197+ [themes](http://themes.gohugo.io/)
## Notes
* Deprecate `useModTimeAsFallback` [adfd4370](https://github.com/gohugoio/hugo/commit/adfd4370b67fd7181178bd6b3b1d07356beaac71) [@bep](https://github.com/bep) [#4351](https://github.com/gohugoio/hugo/issues/4351)
* Deprecate CLI flags `canonifyURLs`, `pluralizeListTitles`, `preserveTaxonomyNames`, `uglyURLs` [f08ea02d](https://github.com/gohugoio/hugo/commit/f08ea02d24d42929676756950f3affaca7fd8c01) [@bep](https://github.com/bep) [#4347](https://github.com/gohugoio/hugo/issues/4347)
* Remove undraft command [2fa70c93](https://github.com/gohugoio/hugo/commit/2fa70c9344b231c9d999bbafdfa4acbf27ed9f6e) [@robertbasic](https://github.com/robertbasic) [#4353](https://github.com/gohugoio/hugo/issues/4353)
## Enhancements
### Templates
* Update Twitter card to also consider images in `.Resources` [25d691da](https://github.com/gohugoio/hugo/commit/25d691daff57d7c6d7d0f63af3991d22e3f788fe) [@bep](https://github.com/bep) [#4349](https://github.com/gohugoio/hugo/issues/4349)
* Seed random on init only [83c761b7](https://github.com/gohugoio/hugo/commit/83c761b71a980aee6331179b271c7e24e999e8eb) [@liguoqinjim](https://github.com/liguoqinjim)
* Remove duplicate layout lookup layouts [b2fcbb1f](https://github.com/gohugoio/hugo/commit/b2fcbb1f9774aa1e929b8575c0e1ac366ab2fb73) [@bep](https://github.com/bep) [#4319](https://github.com/gohugoio/hugo/issues/4319)
* Add "removable-media" interface to `snapcraft.yaml` [f0c0ece4](https://github.com/gohugoio/hugo/commit/f0c0ece44d55b6c2997cbd106d1bc099ea1a2fa7) [@anthonyfok](https://github.com/anthonyfok) [#3837](https://github.com/gohugoio/hugo/issues/3837)
### Other
* Add a way to disable one or more languages [6413559f](https://github.com/gohugoio/hugo/commit/6413559f7575e2653d76227a8037a7edbaae82aa) [@bep](https://github.com/bep) [#4297](https://github.com/gohugoio/hugo/issues/4297)[#4329](https://github.com/gohugoio/hugo/issues/4329)
* Handle newly created files in Fast Render Mode [1707dae8](https://github.com/gohugoio/hugo/commit/1707dae8d3634006017eb6d040df4dbafc53d92f) [@yanzay](https://github.com/yanzay) [#4339](https://github.com/gohugoio/hugo/issues/4339)
* Extract the Fast Render Mode logic into a method [94e736c5](https://github.com/gohugoio/hugo/commit/94e736c5e167a0ee70a528e1c19d64a47e7929c2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339)
* Remove unused code [ae5a45be](https://github.com/gohugoio/hugo/commit/ae5a45be6f0ee4d5c52b38fd28b22b55d9cd7b2d) [@bep](https://github.com/bep)
* Add the last lookup variant for the `GetPage` index [3446fe9b](https://github.com/gohugoio/hugo/commit/3446fe9b8937610b8b628b2c212eb25888a7c1bb) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312)
* Simplify bundle lookup via `.Site.GetPage`, `ref`, `relref` [517b6b62](https://github.com/gohugoio/hugo/commit/517b6b62389d23bfe41fe3ae551a691b11bdcaa7) [@bep](https://github.com/bep) [#4312](https://github.com/gohugoio/hugo/issues/4312)
* Remove some now superflous Fast Render Mode code [feeed073](https://github.com/gohugoio/hugo/commit/feeed073c3320b09fb38168ce272ac88b987f1d2) [@bep](https://github.com/bep) [#4339](https://github.com/gohugoio/hugo/issues/4339)
* Make resource counters for `name` and `title` independent [df20b054](https://github.com/gohugoio/hugo/commit/df20b05463fef42aba93d5208e410a7ecc56da5d) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335)
* Provide .Name to the archetype templates [863a812e](https://github.com/gohugoio/hugo/commit/863a812e07193541b42732b0e227f3d320433f01) [@bep](https://github.com/bep) [#4348](https://github.com/gohugoio/hugo/issues/4348)
* Only set `url` if permalink in metadata and remove duplicate confirm msg [3752348e](https://github.com/gohugoio/hugo/commit/3752348ef13ced8f6f528b42ee7d76a12a97ae5c) [@lildude](https://github.com/lildude) [#1887](https://github.com/gohugoio/hugo/issues/1887)
* Start Resources :counter first time they're used [7b472e46](https://github.com/gohugoio/hugo/commit/7b472e46084b603045b87cea870ffc73ac1cf7e7) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335)
* Update to Go 1.9.3 [a91aba1c](https://github.com/gohugoio/hugo/commit/a91aba1c1562259dffd321a608f38c38dd4d5aeb) [@bep](https://github.com/bep) [#4328](https://github.com/gohugoio/hugo/issues/4328)
* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)[#4320](https://github.com/gohugoio/hugo/issues/4320)
* Add page metadata dates tests [3f0379ad](https://github.com/gohugoio/hugo/commit/3f0379adb72389954ca2be6a9f2ebfcd65c6c440) [@vassudanagunta](https://github.com/vassudanagunta)
* Re-generate CLI docs [1e27d058](https://github.com/gohugoio/hugo/commit/1e27d0589118a114e49c032e4bd68b4798e44a5b) [@bep](https://github.com/bep)
* Remove and update deprecation status [d418c2c2](https://github.com/gohugoio/hugo/commit/d418c2c2eacdc1dc6fffe839e0a90600867878ca) [@bep](https://github.com/bep)
* Shorten the stale setup [4a7c2b36](https://github.com/gohugoio/hugo/commit/4a7c2b3695fe7b88861f2155ea7ef635fe425cd4) [@bep](https://github.com/bep)
* Add a `GetPage` to the site benchmarks [a1956391](https://github.com/gohugoio/hugo/commit/a19563910eec5fed08f3b02563b9a7b38026183d) [@bep](https://github.com/bep)
* Add headless bundle support [0432c64d](https://github.com/gohugoio/hugo/commit/0432c64dd22e4610302162678bb93661ba68d758) [@bep](https://github.com/bep) [#4311](https://github.com/gohugoio/hugo/issues/4311)
* Merge matching resources params maps [5a0819b9](https://github.com/gohugoio/hugo/commit/5a0819b9b5eb9e79826cfa0a65f235d9821b1ac4) [@bep](https://github.com/bep) [#4315](https://github.com/gohugoio/hugo/issues/4315)
* Add some general code contribution criterias [78c86330](https://github.com/gohugoio/hugo/commit/78c863305f337ed4faf3cf0a23675f28b0ae5641) [@bep](https://github.com/bep)
* Tighten page kind logic, introduce tests [8125b4b0](https://github.com/gohugoio/hugo/commit/8125b4b03d10eb73f8aea3f9ea41172aba8df082) [@vassudanagunta](https://github.com/vassudanagunta)
## Fixes
* Fix `robots.txt` in multihost mode [4d912e2a](https://github.com/gohugoio/hugo/commit/4d912e2aad39bfe8d76672cf53b01317792e02c5) [@bep](https://github.com/bep) [#4193](https://github.com/gohugoio/hugo/issues/4193)
* Fix `--uglyURLs` from comand line regression [016398ff](https://github.com/gohugoio/hugo/commit/016398ffe2e0a073453cf46a9d6bf72d693c11e5) [@bep](https://github.com/bep) [#4343](https://github.com/gohugoio/hugo/issues/4343)
* Avoid unescape in `highlight` [ebdd8cba](https://github.com/gohugoio/hugo/commit/ebdd8cba3f5965a8ac897833f313d772271de649) [@bep](https://github.com/bep) [#4219](https://github.com/gohugoio/hugo/issues/4219)
* Fix Docker build [a34213f0](https://github.com/gohugoio/hugo/commit/a34213f0b5624de101272aab469ca9b6fe0c273f) [@skoblenick](https://github.com/skoblenick) [#4076](https://github.com/gohugoio/hugo/issues/4076)[#4077](https://github.com/gohugoio/hugo/issues/4077)
* Fix language params handling [ae742cb1](https://github.com/gohugoio/hugo/commit/ae742cb1bdf35b81aa0ede5453da6b0c4a4fccf2) [@bep](https://github.com/bep) [#4356](https://github.com/gohugoio/hugo/issues/4356)[#4352](https://github.com/gohugoio/hugo/issues/4352)
* Fix handling of top-level page bundles [4eb2fec6](https://github.com/gohugoio/hugo/commit/4eb2fec67c3a72a3ac98aa834dc56fd4504626d8) [@bep](https://github.com/bep) [#4332](https://github.com/gohugoio/hugo/issues/4332)
* Fix `baseURL` server regression for multilingual sites [ed4a00e4](https://github.com/gohugoio/hugo/commit/ed4a00e46f2344320a22f07febe5aec4075cb3fb) [@bep](https://github.com/bep) [#4333](https://github.com/gohugoio/hugo/issues/4333)
* Fix "date" page param [322c5672](https://github.com/gohugoio/hugo/commit/322c567220aa4123a5d707629c1bebd375599912) [@vassudanagunta](https://github.com/vassudanagunta) [#4323](https://github.com/gohugoio/hugo/issues/4323)
* Fix typo in comment [912147ab](https://github.com/gohugoio/hugo/commit/912147ab896e69a450b7100c3d6bf81a7bf78b5a) [@yanzay](https://github.com/yanzay)

View file

@ -74,7 +74,7 @@ Hugo now has:
* Only set `url` if permalink in metadata and remove duplicate confirm msg [3752348e](https://github.com/gohugoio/hugo/commit/3752348ef13ced8f6f528b42ee7d76a12a97ae5c) [@lildude](https://github.com/lildude) [#1887](https://github.com/gohugoio/hugo/issues/1887)
* Start Resources :counter first time they're used [7b472e46](https://github.com/gohugoio/hugo/commit/7b472e46084b603045b87cea870ffc73ac1cf7e7) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335)
* Update to Go 1.9.3 [a91aba1c](https://github.com/gohugoio/hugo/commit/a91aba1c1562259dffd321a608f38c38dd4d5aeb) [@bep](https://github.com/bep) [#4328](https://github.com/gohugoio/hugo/issues/4328)
* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)[#4320](https://github.com/gohugoio/hugo/issues/4320)
* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)
* Add page metadata dates tests [3f0379ad](https://github.com/gohugoio/hugo/commit/3f0379adb72389954ca2be6a9f2ebfcd65c6c440) [@vassudanagunta](https://github.com/vassudanagunta)
* Re-generate CLI docs [1e27d058](https://github.com/gohugoio/hugo/commit/1e27d0589118a114e49c032e4bd68b4798e44a5b) [@bep](https://github.com/bep)
* Remove and update deprecation status [d418c2c2](https://github.com/gohugoio/hugo/commit/d418c2c2eacdc1dc6fffe839e0a90600867878ca) [@bep](https://github.com/bep)

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -0,0 +1,66 @@
---
date: 2018-04-02
title: "The Easter Egg Edition"
description: "Hugo 0.38: Date and slug from filenames, multiple content dirs, config from themes, language merge func …"
categories: ["Releases"]
---
Hugo `0.38` is an **Easter egg** filled with good stuff. We now support fetching **date and slug from the content filename**, making the move from Jekyll even easier. And you can now set `contentDir` per language with intelligent merging, and themes can now provide configuration ... Also worth mentioning is several improvements in the [Chroma](https://github.com/alecthomas/chroma) highlighter, most notable support for Go templates.
We are working hard to get the documentation up-to-date with the new features, but you can also see them in action with the full source at [hugotest.bep.is](http://hugotest.bep.is/).
This release represents **39 contributions by 4 contributors** to the main Hugo code base.
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@anthonyfok](https://github.com/anthonyfok), [@felicianotech](https://github.com/felicianotech), and [@paulcmal](https://github.com/paulcmal) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@kaushalmodi](https://github.com/kaushalmodi) for his great work on the documentation site.
Also, a shoutout to [@regisphilibert](https://github.com/regisphilibert) for his work on the new [Code Toggle Shortcode](https://gohugo.io/getting-started/code-toggle/) on the Hugo docs site, which we will put to good use to improve all the configuration samples.
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **55 contributions by 18 contributors**. A special thanks to [@kaushalmodi](https://github.com/kaushalmodi), [@bep](https://github.com/bep), [@xa0082249956](https://github.com/xa0082249956), and [@paulcmal](https://github.com/paulcmal) for their work on the documentation site.
Hugo now has:
* 24547+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 447+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 213+ [themes](http://themes.gohugo.io/)
## Notes
* Hugo now allows partial redefinition `outputs` in your site configuration. This is what most people would expect, but it is still a change in behaviour. For details, see [#4487](https://github.com/gohugoio/hugo/issues/4487)
* Before this release, Hugo flattened URLs of processed images in sub-folders. This worked fine but was not intentional. See [#4502](https://github.com/gohugoio/hugo/issues/4502).
## Enhancements
* Allow themes to define output formats, media types and params [e9c7b620](https://github.com/gohugoio/hugo/commit/e9c7b6205f94a7edac0e0df2cd18d1456cb26a06) [@bep](https://github.com/bep) [#4490](https://github.com/gohugoio/hugo/issues/4490)
* Allow partial redefinition of the `ouputs` config [f8dc47ee](https://github.com/gohugoio/hugo/commit/f8dc47eeffa847fd0b51e376da355e3d957848a6) [@bep](https://github.com/bep) [#4487](https://github.com/gohugoio/hugo/issues/4487)
* Add a way to merge pages by language [ffaec4ca](https://github.com/gohugoio/hugo/commit/ffaec4ca8c4c6fd05b195879ccd65acf2fd5a6ac) [@bep](https://github.com/bep) [#4463](https://github.com/gohugoio/hugo/issues/4463)
* Extract `date` and `slug` from filename [68bf1511](https://github.com/gohugoio/hugo/commit/68bf1511f2be39b6576d882d071196e477c72c9f) [@bep](https://github.com/bep) [#285](https://github.com/gohugoio/hugo/issues/285)[#3310](https://github.com/gohugoio/hugo/issues/3310)[#3762](https://github.com/gohugoio/hugo/issues/3762)[#4340](https://github.com/gohugoio/hugo/issues/4340)
* Add `Delete` method to delete key from `Scratch` [e46ab29b](https://github.com/gohugoio/hugo/commit/e46ab29bd24caa9e2cfa51f24ba15037750850d6) [@paulcmal](https://github.com/paulcmal)
* Simplify Prev/Next [79dd7cb3](https://github.com/gohugoio/hugo/commit/79dd7cb31a941d7545df33b938ca3ed46593ddfd) [@bep](https://github.com/bep)
* List Chroma lexers [2c54f1ad](https://github.com/gohugoio/hugo/commit/2c54f1ad48fe2a2f7504117d351d45abc89dcb1f) [@bep](https://github.com/bep) [#4554](https://github.com/gohugoio/hugo/issues/4554)
* Add support for a `contentDir` set per language [eb42774e](https://github.com/gohugoio/hugo/commit/eb42774e587816b1fbcafbcea59ed65df703882a) [@bep](https://github.com/bep) [#4523](https://github.com/gohugoio/hugo/issues/4523)[#4552](https://github.com/gohugoio/hugo/issues/4552)[#4553](https://github.com/gohugoio/hugo/issues/4553)
* Update Chroma [7a634898](https://github.com/gohugoio/hugo/commit/7a634898c359a6af0da52be17df07cae97c7937c) [@bep](https://github.com/bep) [#4549](https://github.com/gohugoio/hugo/issues/4549)
* Add `.Site.IsServer` [1823c053](https://github.com/gohugoio/hugo/commit/1823c053c8900cb6ee53b8e5c02939c7398e34dd) [@felicianotech](https://github.com/felicianotech) [#4478](https://github.com/gohugoio/hugo/issues/4478)
* Move to Ubuntu Trusty image [511d5d3b](https://github.com/gohugoio/hugo/commit/511d5d3b7681cb76822098f430ed6862232ca529) [@anthonyfok](https://github.com/anthonyfok)
* Bump some deprecations [b6798ee8](https://github.com/gohugoio/hugo/commit/b6798ee8676c48f86b0bd8581ea244f4be4ef3fa) [@bep](https://github.com/bep)
* Update Chroma to get `Go template support` [904a3d9d](https://github.com/gohugoio/hugo/commit/904a3d9ddf523d452d04d0b5814503e0ff17bd2e) [@bep](https://github.com/bep) [#4515](https://github.com/gohugoio/hugo/issues/4515)
* Recover from error in server [f0052b6d](https://github.com/gohugoio/hugo/commit/f0052b6d0f8e113a50aeb6cd7bd34555dbf34a00) [@bep](https://github.com/bep) [#4516](https://github.com/gohugoio/hugo/issues/4516)
* Spring test cleaning, take 2 [da880157](https://github.com/gohugoio/hugo/commit/da88015776645cc68b96e8b94030c95905df53ae) [@bep](https://github.com/bep)
* Add docs for `lang.Merge` [70005364](https://github.com/gohugoio/hugo/commit/70005364a245ea3bc59c74192e1f4c56cb6879cf) [@bep](https://github.com/bep)
* Remove archetype title/date warning [ac12d51e](https://github.com/gohugoio/hugo/commit/ac12d51e7ea3a0ffb7d8053a10b6bf6acf1235ae) [@bep](https://github.com/bep) [#4504](https://github.com/gohugoio/hugo/issues/4504)
* Add docs on the new front matter configuration [0dbf79c2](https://github.com/gohugoio/hugo/commit/0dbf79c2f8cd5b1a5c91c04a8d677f956b0b8fe8) [@bep](https://github.com/bep) [#4495](https://github.com/gohugoio/hugo/issues/4495)
* Refactor the GitInfo into the date handlers [ce6e4310](https://github.com/gohugoio/hugo/commit/ce6e4310febf5659392a41b543594382441f3681) [@bep](https://github.com/bep) [#4495](https://github.com/gohugoio/hugo/issues/4495)
* Do not print build total when `--quiet` is set [50a03a5a](https://github.com/gohugoio/hugo/commit/50a03a5acc7c200c795590c3f4b964fdc56085f2) [@bep](https://github.com/bep) [#4456](https://github.com/gohugoio/hugo/issues/4456)
## Fixes
* Fix freeze in invalid front matter error case [93e24a03](https://github.com/gohugoio/hugo/commit/93e24a03ce98d3212a2d49ad04739141229d0809) [@bep](https://github.com/bep) [#4526](https://github.com/gohugoio/hugo/issues/4526)
* Fix path duplication/flattening in processed images [3fbc7553](https://github.com/gohugoio/hugo/commit/3fbc75534d1acda2be1c597aa77c919d3a02659d) [@bep](https://github.com/bep) [#4502](https://github.com/gohugoio/hugo/issues/4502)[#4501](https://github.com/gohugoio/hugo/issues/4501)
* Fix SVG and similar resource handling [ba94abbf](https://github.com/gohugoio/hugo/commit/ba94abbf5dd90f989242af8a7027d67a572a6128) [@bep](https://github.com/bep) [#4455](https://github.com/gohugoio/hugo/issues/4455)

View file

@ -0,0 +1,32 @@
---
date: 2018-04-05
title: "Some Live Reload Fixes"
description: "Hugo 0.38.1 fixes some live reload issues introduced in 0.38."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix that is mainly motivated by some issues with server live reloading introduced in Hugo 0.38.
* Fix livereload for the home page bundle [f87239e4](https://github.com/gohugoio/hugo/commit/f87239e4cab958bf59ecfb1beb8cac439441a553) [@bep](https://github.com/bep) [#4576](https://github.com/gohugoio/hugo/issues/4576)
* Fix empty BuildDate in "hugo version" [294c0f80](https://github.com/gohugoio/hugo/commit/294c0f8001fe598278c1eb8015deb6b98e8de686) [@anthonyfok](https://github.com/anthonyfok)
* Fix some livereload content regressions [a4deaeff](https://github.com/gohugoio/hugo/commit/a4deaeff0cfd70abfbefa6d40c0b86839a216f6d) [@bep](https://github.com/bep) [#4566](https://github.com/gohugoio/hugo/issues/4566)
* Update github.com/bep/gitmap to fix snap build [4d115c56](https://github.com/gohugoio/hugo/commit/4d115c56fac9060230fbac6181a05f7cc6d10b42) [@anthonyfok](https://github.com/anthonyfok) [#4538](https://github.com/gohugoio/hugo/issues/4538)
* Fix two tests that are broken on Windows [26f34fd5](https://github.com/gohugoio/hugo/commit/26f34fd59da1ce1885d4f2909c5d9ef9c1726944) [@neurocline](https://github.com/neurocline)
This release also contains some improvements:
* Add bash completion [874159b5](https://github.com/gohugoio/hugo/commit/874159b5436bc9080aec71a9c26d35f8f62c9fd0) [@anthonyfok](https://github.com/anthonyfok)
* Handle mass content etc. edits in server mode [730b66b6](https://github.com/gohugoio/hugo/commit/730b66b6520f263af16f555d1d7be51205a8e51d) [@bep](https://github.com/bep) [#4563](https://github.com/gohugoio/hugo/issues/4563)

View file

@ -0,0 +1,25 @@
---
date: 2018-04-09
title: "Hugo 0.38.2: Two Bugfixes"
description: "0.38.2 fixes --contentDir flag handling and \".\" in content filenames."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
---
This is a bug-fix release with a couple of important fixes:
* Fix handling of the `--contentDir` and possibly other related flags [080302eb](https://github.com/gohugoio/hugo/commit/080302eb8757fd94ccbd6bf99103432cd98e716c) [@bep](https://github.com/bep) [#4589](https://github.com/gohugoio/hugo/issues/4589)
* Fix handling of content files with "." in them [2817e842](https://github.com/gohugoio/hugo/commit/2817e842407c8dcbfc738297ab634392fcb41ce1) [@bep](https://github.com/bep) [#4559](https://github.com/gohugoio/hugo/issues/4559)
Also in this release:
* Set .Parent in bundled pages to its owner [6792d86a](https://github.com/gohugoio/hugo/commit/6792d86ad028571c684a776c5f00e0107838c955) [@bep](https://github.com/bep) [#4582](https://github.com/gohugoio/hugo/issues/4582)

View file

@ -95,16 +95,16 @@ Discover a new favorite bass player? Just add another `.toml` file in the same d
## Example: Accessing Named Values in a Data File
Assume you have the following YAML structure in your `User0123.yml` data file located directly in `data/`:
Assume you have the following data structure in your `User0123.[yml|toml|json]` data file located directly in `data/`:
```
{{< code-toggle file="User0123" >}}
Name: User0123
"Short Description": "He is a **jolly good** fellow."
Achievements:
- "Can create a Key, Value list from Data File"
- "Learns Hugo"
- "Reads documentation"
```
{{</ code-toggle >}}
You can use the following code to render the `Short Description` in your layout::
@ -213,12 +213,16 @@ If you don't like caching at all, you can fully disable caching with the command
Currently, you can only use those authentication methods that can be put into an URL. [OAuth][] and other authentication methods are not implemented.
### Load Local files
## Load Local files
To load local files with `getJSON` and `getCSV`, the source files must reside within Hugo's working directory. The file extension does not matter, but the content does.
It applies the same output logic as above in [Calling the Functions with a URL](#calling-the-functions-with-a-url).
{{% note %}}
The local CSV files to be loaded using `getCSV` must be located **outside** of the `data` directory.
{{% /note %}}
## LiveReload with Data Files
There is no chance to trigger a [LiveReload][] when the content of a URL changes. However, when a *local* file changes (i.e., `data/*` and `themes/<THEME>/data/*`), a LiveReload will be triggered. Symlinks are not supported. Note too that because downloading of data takes a while, Hugo stops processing your Markdown files until the data download has completed.

View file

@ -33,13 +33,9 @@ Hugo ships with internal templates for Google Analytics tracking, including both
Provide your tracking id in your configuration file:
```
{{< code-toggle file="config" >}}
googleAnalytics = "UA-123-45"
```
```
googleAnalytics: "UA-123-45"
```
{{</ code-toggle >}}
### Use the Google Analytics Template
@ -62,13 +58,9 @@ Hugo also ships with an internal template for [Disqus comments][disqus], a popul
To use Hugo's Disqus template, you first need to set a single value in your site's `config.toml` or `config.yml`:
```
{{< code-toggle file="config" >}}
disqusShortname = "yourdiscussshortname"
```
```
disqusShortname: "yourdiscussshortname"
```
{{</ code-toggle >}}
You also have the option to set the following in the front matter for a given piece of content:

View file

@ -458,7 +458,7 @@ You can arbitrarily define as many site-level parameters as you want in your [si
For instance, you might declare the following:
{{< code file="config.yaml" >}}
{{< code-toggle file="config" >}}
params:
copyrighthtml: "Copyright &#xA9; 2017 John Doe. All Rights Reserved."
twitteruser: "spf13"

View file

@ -28,34 +28,39 @@ The following is an example:
{{< code file="layouts/partials/sidebar.html" download="sidebar.html" >}}
<!-- sidebar start -->
<aside>
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a href="#">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
<ul class="sub-menu">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
<ul>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a href="#">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
<ul class="sub-menu">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<li>
<a href="{{ .URL }}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
</ul>
{{else}}
{{ end }}
<li>
<a href="{{.URL}}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
{{end}}
{{end}}
<li>
<a href="#" target="blank">Hardcoded Link 1</a>
<li>
<a href="#" target="blank">Hardcoded Link 2</a>
</ul>
<a href="#" target="_blank">Hardcoded Link 1</a>
</li>
<li>
<a href="#" target="_blank">Hardcoded Link 2</a>
</li>
</ul>
</aside>
{{< /code >}}
@ -89,16 +94,16 @@ In the above, the menu item is marked as active if on the current section's list
## Site Config menus
The above is all that's needed. But if you want custom menu items, e.g. changing weight, name, or link title attribute, you can define them manually in the site config, i.e. `config.toml`:
The above is all that's needed. But if you want custom menu items, e.g. changing weight, name, or link title attribute, you can define them manually in the site config file:
```
{{< code-toggle file="config" >}}
[[menu.main]]
name = "This is the blog section"
title = "blog section"
weight = -110
identifier = "blog"
url = "/blog/"
```
{{</ code-toggle >}}
{{% note %}}
The `identifier` *must* match the section name.

View file

@ -1,7 +1,7 @@
---
title: Custom Output Formats
linktitle: Custom Output Formats
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
date: 2017-03-22
publishdate: 2017-03-22
lastmod: 2017-03-22
@ -37,13 +37,13 @@ This is the full set of built-in media types in Hugo:
To add or modify a media type, define it in a `mediaTypes` section in your [site configuration][config], either for all sites or for a given language.
```
{{< code-toggle file="config" >}}
[mediaTypes]
[mediaTypes."text/enriched"]
suffix = "enr"
[mediaTypes."text/html"]
suffix = "asp"
```
{{</ code-toggle >}}
The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
@ -60,11 +60,11 @@ suffix = "htm"
mediaType = "text/html"
```
**Note** that for the above to work, you also need to add an`outputs` definition in your site config.
**Note** that for the above to work, you also need to add an `outputs` definition in your site config.
## Output Formats
## Output Format Definitions
Given a media type and some additional configuration, you get an `Output Format`:
Given a media type and some additional configuration, you get an **Output Format**.
This is the full set of Hugo's built-in output formats:
@ -76,13 +76,13 @@ This is the full set of Hugo's built-in output formats:
To add or modify an output format, define it in an `outputFormats` section in your site's [configuration file](/getting-started/configuration/), either for all sites or for a given language.
```
{{< code-toggle file="config" >}}
[outputFormats.MyEnrichedFormat]
mediaType = "text/enriched"
baseName = "myindex"
isPlainText = true
protocol = "bep://"
```
{{</ code-toggle >}}
The above example is fictional, but if used for the homepage on a site with `baseURL` `https://example.org`, it will produce a plain text homepage with the URL `bep://example.org/myindex.enr`.
@ -122,32 +122,44 @@ The following is the full list of configuration options for output formats and t
## Output Formats for Pages
A `Page` in Hugo can be rendered to multiple representations on the file system. By default, all pages will render as `HTML` with some of them also as `RSS` (homepage, sections, etc.).
A `Page` in Hugo can be rendered to multiple *output formats* on the file
system.
This can be changed by defining an `outputs` list of output formats in either the `Page` front matter or in the site configuration (either for all sites or per language).
### Default Output Formats
Every `Page` has a [`Kind`][page_kinds] attribute, and the default Output
Formats are set based on that.
Example from site `config.toml`:
| Kind | Default Output Formats |
|--------------- |----------------------- |
| `page` | HTML |
| `home` | HTML, RSS |
| `section` | HTML, RSS |
| `taxonomyTerm` | HTML, RSS |
| `taxonomy` | HTML, RSS |
```
### Customizing Output Formats
This can be changed by defining an `outputs` list of output formats in either
the `Page` front matter or in the site configuration (either for all sites or
per language).
Example from site config file`:
{{< code-toggle file="config" >}}
[outputs]
home = ["HTML", "AMP", "RSS"]
page = ["HTML"]
```
Example from site `config.yml`:
```
outputs:
home: ["HTML", "AMP", "RSS"]
page: ["HTML"]
```
{{</ code-toggle >}}
* The output definition is per `Page` `Kind` (i.e, `page`, `home`, `section`, `taxonomy`, or `taxonomyTerm`).
* The names used must match the `Name` of a defined `Output Format`.
* Any `Kind` without a definition will default to `HTML`.
Note that in the above examples, the *output formats* for `section`,
`taxonomyTerm` and `taxonomy` will stay at their default value `["HTML",
"RSS"]`.
* The `outputs` definition is per [`Page` `Kind`][page_kinds] (`page`, `home`, `section`, `taxonomy`, or `taxonomyTerm`).
* The names (e.g. `HTML`, `AMP`) used must match the `Name` of a defined *Output Format*.
* These names are case insensitive.
* These can be overridden per `Page` in the front matter of content files.
* Output formats are case insensitive.
The following is an example of `YAML` front matter in a content file that defines output formats for the rendered `Page`:
@ -165,7 +177,7 @@ outputs:
Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `<head>`:
```html
```go-html-template
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
@ -175,7 +187,7 @@ Note that `.Permalink` and `.RelPermalink` on `Page` will return the first outpu
This is how you link to a given output format:
```html
```go-html-template
{{ with .OutputFormats.Get "json" -}}
<a href="{{ .Permalink }}">{{ .Name }}</a>
{{- end }}
@ -183,7 +195,7 @@ This is how you link to a given output format:
From content files, you can use the [`ref` or `relref` shortcodes](/content-management/shortcodes/#ref-and-relref):
```html
```go-html-template
[Neat]({{</* ref "blog/neat.md" "amp" */>}})
[Who]({{</* relref "about.md#who" "amp" */>}})
```
@ -222,3 +234,4 @@ The partial below is a plain text template (Outpuf Format is `CSV`, and since th
[lookup order]: /templates/lookup/
[media type]: https://en.wikipedia.org/wiki/Media_type
[partials]: /templates/partials/
[page_kinds]: /templates/section-templates/#page-kinds

View file

@ -63,12 +63,12 @@ on render. Please don't include this in the template as it's not valid HTML.
Defaults for `<changefreq>`, `<priority>` and `filename` values can be set in the site's config file, e.g.:
```
{{< code-toggle file="config" >}}
[sitemap]
changefreq = "monthly"
priority = 0.5
filename = "sitemap.xml"
```
{{</ code-toggle >}}
The same fields can be specified in an individual content file's front matter in order to override the value assigned to that piece of content at render time.

View file

@ -24,6 +24,7 @@ A static website with a dynamic search function? Yes. As alternatives to embedda
* [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](http://lunrjs.com/). Hugo-lunr will create an index file of any html and markdown documents in your Hugo project.
* [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](http://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.
## Commercial Search Services

View file

@ -52,6 +52,9 @@ The following is a list of site-level (aka "global") variables. Many of these va
.Site.IsMultiLingual
: whether there are more than one language in this site. See [Multilingual](/content-management/multilingual/) for more information.
.Site.IsServer
: a boolean to indicate if the site is being served with Hugo's built-in server. See [`hugo server`](/commands/hugo_server/) for more information.
.Site.Language.Lang
: the language code of the current locale (e.g., `en`).
@ -106,15 +109,15 @@ The following is a list of site-level (aka "global") variables. Many of these va
### Example: `.Site.Params`
The following `config.toml` defines a site-wide param for `description`:
The following `config.[yaml|toml|json]` defines a site-wide param for `description`:
```
{{< code-toggle file="config" >}}
baseURL = "https://yoursite.example.com/"
[params]
description = "Tesla's Awesome Hugo Site"
author = "Nikola Tesla"
```
{{</ code-toggle >}}
You can use `.Site.Params` in a [partial template](/templates/partials/) to call the default site description:
@ -122,4 +125,4 @@ You can use `.Site.Params` in a [partial template](/templates/partials/) to call
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
{{< /code >}}
[config]: /getting-started/configuration/
[config]: /getting-started/configuration/

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
<dl>
{{ range .Site.Data.docs.chroma.lexers }}
<dt>{{ .Name }}</dt>
<dd>{{ delimit .Aliases ", " }}</dd>
{{ end }}
</dl>

View file

@ -5,6 +5,9 @@
{{ $.Scratch.Set "codeLang" (index . 0 | strings.TrimPrefix ".") }}
{{ end }}
{{ with .Get "codeLang" }}{{ $.Scratch.Set "codeLang" . }}{{ end }}
{{ if eq (.Scratch.Get "codeLang") "html"}}
{{ $.Scratch.Set "codeLang" "go-html-template" }}
{{ end }}
<div class="code relative" id="{{ $file | urlize}}">
{{- with $file -}}
<div class="filename san-serif f6 dib lh-solid pl2 pv2">{{.}}</div>

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo"
[context.production.environment]
HUGO_VERSION = "0.37.1"
HUGO_VERSION = "0.38.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --enableGitInfo"
[context.split1.environment]
HUGO_VERSION = "0.37.1"
HUGO_VERSION = "0.38.2"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.37.1"
HUGO_VERSION = "0.38.2"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
HUGO_VERSION = "0.37.1"
HUGO_VERSION = "0.38.2"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"

View file

@ -11,7 +11,7 @@ logo = "/images/sponsors/linode-logo_standard_light_medium.png"
copy = ""
[[banners]]
name = ""
link = ""
logo = ""
name = "eSolia"
link = "https://esolia.com/"
logo = "/images/sponsors/esolia-logo.svg"
copy = ""

View file

@ -7,13 +7,17 @@
outline: none;
background-color:white;
}
.tab-pane code{
background:#f1f2f2;
border-radius:0;
}
.tab-pane .chroma{
background:none;
padding:0;
}
.tab-button.active{
border-bottom-color:#f3f4f4;
background-color: #f4f4f4;
border-bottom-color:#f1f2f2;
background-color: #f1f2f2;
}
.tab-content .tab-pane{
display: none;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="325 451.6 374.2 120.8" enable-background="new 325 451.6 374.2 120.8" xml:space="preserve">
<path fill="#FFFFFF" d="M491.4,451.6c-33.6,0-59.6,22.4-63.6,53.4c5.4,1.7,9.7,3.9,12.9,6.6c2.1-25.9,23-44.5,50.7-44.5
c11.5,0,21.7,3.2,30.1,8.8c0.3-0.6,0.8-1.4,2.2-1.8c5.4-1.6,10.6-1.4,15.3,0.4c0.3-0.9,0.5-1.8,0.9-2.7
C528.2,459.4,511.2,451.6,491.4,451.6z"/>
<path fill="#FBAA19" d="M491.4,455.5c-31.9,0-56.4,21.5-59.9,50.8c2.1,0.8,3.9,1.7,5.6,2.7c3.4-26.5,25.5-45.8,54.3-45.8
c10.7,0,20.7,2.7,29,7.5c0.3-0.1,0.6-0.3,0.9-0.4c3.5-1,6.9-1.3,10.2-1C521.1,460.7,507.2,455.5,491.4,455.5z"/>
<g>
<path fill="#14499E" d="M564.5,538.1v-62.1h-7.8c-0.1,4-1.6,7.8-4,10.3c-1.3,1.3-2.7,2.3-4.1,2.8c1,2.6,2.1,5.3,2.7,8.1
c1.2,4.8,1.6,6.5,1.9,10.9c0.3,2.2,0.3,4.4,0.3,6.5c0,12.7-3.5,25.2-9.8,35.7v5h45.4v-17.6h-24.6V538.1z"/>
<path fill="#14499E" d="M613.5,555.7h-20.7v-79.5h20.7V555.7z"/>
<path fill="#14499E" d="M666.2,526.1h-17.2l8.7-25.3L666.2,526.1z M671.9,541.9l5.2,13.8h22.1l-29.9-79.5h-22.5l-30.5,79.5h21.9
l5.4-13.8H671.9z"/>
<path fill="#14499E" d="M426.1,507.2c-7-2.2-7.9-2.3-8.9-2.8c-3.6-1.7-5.4-3.7-5.4-6.2c0-3.9,3.9-6.9,8.8-6.9
c3.4,0,6.5,0.9,9.7,2.7c1.8-5.6,4.4-10.9,7.6-15.5c-6.7-2.8-13.8-4.4-20.7-4.4c-16,0-27,10.9-27,26.8c0,6.9,2.1,12,5.9,15.5
c3,2.5,6.5,4,15.5,6.7c9.7,2.8,12.4,4.9,12.4,9.2c0,4.7-4.3,7.9-10.3,8.3c-5.7,0.4-10.9,0.3-17.2-5.2l-9.6,13.3
c8.4,5.8,18,8.9,27.7,8.9c19.5,0,31-10.5,31-28.3C445.7,517.8,440,511.2,426.1,507.2z"/>
</g>
<g>
<path fill="#14499E" d="M596.7,479.9c0,6.7,0,65.2,0,71.8c3.9,0,8.9,0,12.9,0c0-6.7,0-65.2,0-71.8
C605.7,479.9,600.7,479.9,596.7,479.9z"/>
<path fill="#14499E" d="M649.3,479.9c-1.7,4.4-24.2,62.8-27.5,71.8c5.2,0,10.6,0,13.6,0c1.3-3.4,5.4-13.8,5.4-13.8h33.9
c0,0,3.9,10.5,5.2,13.8c3,0,8.5,0,13.7,0c-3.4-8.8-25.3-67.4-27-71.8C662.9,479.9,652.8,479.9,649.3,479.9z M645.4,524.8l12.4-36.2
l13.8,41.4h-27.9L645.4,524.8z"/>
<path fill="#14499E" d="M560.6,542c0,0,0-55.2,0-62.1c-0.5,0-1.2,0-1.7,0c-0.8,3.5-2.3,6.6-4.5,9.1c-0.6,0.8-1.4,1.4-2.2,1.9
c0.6,1.9,1.3,3.7,1.8,5.6c1.2,4.9,1.6,6.9,1.9,11.4c0.3,2.3,0.4,4.7,0.4,6.9c0,12.2-3.1,24-8.5,34.4c0,1.2,0,2.1,0,2.6
c5.9,0,31.8,0,37.6,0c0-3.4,0-6.5,0-9.8C579.9,542,560.6,542,560.6,542z"/>
<path fill="#14499E" d="M394.2,501c0,5.7,1.6,9.8,4.7,12.5c2.2,1.8,4.9,3.2,14,5.8c8.7,2.6,15.3,5.2,15.3,12.9
c0,6.7-5.6,11.6-14,12.2c-5.2,0.4-10.6,0.3-16.7-3.6c-1.8,2.5-3,4.1-4.8,6.6c6.9,4,14.4,6.2,22.1,6.2c17.5,0,27.2-8.7,27.2-24.4
c0-8-2.8-14.2-16.8-18.4l-1.8-0.5c-5.7-1.7-6.3-1.9-7.6-2.5c-5.2-2.3-7.6-5.7-7.6-9.7c0-5.9,5.6-10.7,12.7-10.7
c2.6,0,5,0.5,7.5,1.3c1.2-2.8,2.5-5.6,4-8.3c-4.9-1.6-10.1-2.5-14.9-2.5C403.5,478,394.2,487.2,394.2,501z"/>
</g>
<path fill="#FBAA19" d="M346.5,517.3c1.2-6.1,5.2-9.6,12-9.6c5.8,0,10.5,3.5,11.9,9.3L346.5,517.3z M389.8,529.1v-2.7
c-0.1-20.2-12.7-32.1-33-31.8c-19.5,0.1-31.9,12.8-31.8,31.9c0.1,18.9,13.7,31,34.4,30.8c15.5-0.1,25.7-7.2,29.5-21.9l-20,0.1
c-2.6,5.4-5.2,7-10,7c-8.5,0.1-12.8-4.1-12.9-13.1L389.8,529.1z"/>
<path fill="#FBAA19" d="M506.1,485.1c0,0,1.9-3.9,6.5-6.6c-6.2-3.1-13.4-4.9-21.2-4.9c-25.2,0-44,18.2-44,42.3
c0,24.2,18.9,42.4,44,42.4c25.2,0,44-18.2,44-42.4c0-10.5-3.5-19.8-9.6-27C517,484.2,506.1,485.1,506.1,485.1z M491.3,538.5
c-12.4,0-22.4-10-22.4-22.4c0-12.3,10-22.2,22.4-22.2s22.4,10,22.4,22.2C513.8,528.4,503.7,538.5,491.3,538.5z"/>
<path fill="#FBAA19" d="M356.8,498.3L356.8,498.3c-17.3,0.1-28.1,10.9-27.9,28.1c0.1,16.8,11.9,27.2,30.5,27
c12.2-0.1,20-4.8,24-14.1c-4.9,0-9.7,0.1-12.2,0.1c-2.8,4.9-6.5,7-12.3,7c-10.6,0.1-16.7-5.9-16.9-16.9c0,0,0,0,0-0.1
c0-1,0.4-1.9,1-2.7c0.8-0.8,1.7-1.2,2.7-1.2c0,0,33.2-0.3,39.7-0.4c-0.3-8.1-2.8-14.9-7.5-19.5C373.3,500.8,365.9,498.2,356.8,498.3
z M343.5,519.9c-0.8-0.9-1-2.1-0.9-3.2c1.4-8,7.2-12.7,15.8-12.8l0,0c7.6-0.1,13.8,4.8,15.6,12.3c0.3,1.2,0,2.3-0.6,3.4
c-0.8,0.9-1.8,1.6-3,1.6l-23.9,0.3C345.3,521.3,344.3,520.8,343.5,519.9z"/>
<path fill="#FBAA19" d="M506.1,485.1c0,0,0.9-1.8,3-3.9c-5.3-2.3-11.2-3.6-17.7-3.6c-22.9,0-40.1,16.5-40.1,38.4
c0,22,17.2,38.5,40.1,38.5s40.1-16.5,40.1-38.5c0-12.5-5.6-23.3-14.7-30.1C511,484.7,506.1,485.1,506.1,485.1z M517.7,516
c0,14.5-11.8,26.2-26.2,26.2s-26.2-11.8-26.2-26.2c0-14.5,11.8-26.1,26.2-26.1C505.8,489.9,517.7,501.7,517.7,516z"/>
<path fill="#14499E" d="M518.5,562.4c-7.9,4.1-16.9,6.3-26.9,6.3c-20.2,0-37.1-9.4-46.5-24.2c-0.6,1.4-1.4,2.7-2.3,3.9
c10.7,14.4,28.3,23.3,48.9,23.3c9.6,0,18.4-1.9,26.2-5.3c0.1-0.6,0.1-1.3,0.4-1.9C518.3,563.6,518.5,562.9,518.5,562.4z"/>
<path fill="#14499E" d="M552.9,472.6c-0.6-5-0.1-8,0.8-9.7c0-0.1-11.9-0.1-14.2,15.3c-5.7-3.2-11.5-3-16.3-1.6
c-0.8,0.3-0.6,0.5,0.1,0.5c3.1-0.1,6.1,0.5,8.8,1.9c-5.4-1.3-15.1-1.4-20.4,3.2c-0.3,0.1-0.5,0.3-0.5,0.4c0.5,0.1,4.9-0.8,15,3.6
c4.1,1.8,11.4,3.7,14.1-0.5c2.5,5.6,4.1,10.7,5,15.5c-1.8-3.1-4.1-4.5-4.8-4.8c-2.7-1.6-6.5-1.6-6.5-1.6s0.5,2.3,1.8,3.5
c3,3,7.4,2.1,7.2,1.8c0-0.8-0.3-1.4-0.5-1.9c2.2,2.3,3.7,8.1,4,10.9c0.9,10-1,18.4-3.1,24.8c-3.9,10-8.5,16.9-17.3,25
c-2.6-3.7-7.2-4.3-7.8-2.8v0.1c2.5-0.3,8.4,2.3,7.9,8.4c-0.6,7.4-6.5,5-5.3,0.1c0.8-3.4-0.6-5-1.9-6.1c0.6,1.3,1.6,3.1,0.5,6.5
c-2.3,7.9,7,11,8.3,0.9c0-0.5,0-1,0-1.4c15.9-12.9,24.2-34.9,22.1-56c-0.4-4.1-0.6-5.8-1.8-10.5c-0.9-3.6-2.2-7.2-3.7-10.6
C548.2,487.8,554.1,482.3,552.9,472.6z"/>
<g>
<path fill="#14499E" d="M541.7,478.5l-0.5,3.5l0,0c0.5,1.2,1.2,2.6,1.2,2.6c0.1,0.1,0.1,0.4,0.1,0.5c0.8,0,1.7,0.1,1.7,0.1
c0.9,0,2.5-0.4,3.7-1.9c1.8-1.9,2.7-4.7,2.7-7.9c0-0.8,0-1.6-0.1-2.3c-0.3-1.6-0.4-3.1-0.4-4.4c0-0.9,0.1-1.7,0.3-2.6
C547.3,467.1,543,470.1,541.7,478.5z"/>
<path fill="#14499E" d="M529.8,481.1c-3.4-0.8-6.1-0.8-10.3,0.1c2.3,0.6,4.8,1.4,7.4,2.6c4.1,1.8,9.4,3,11,0.4c0,0,1.2-1.9,1.8-3
c-0.9-0.5-1.7-1-1.7-1c-1.8-1-3.6-1.6-5.6-1.9C534,482,529.8,481.1,529.8,481.1z"/>
</g>
<path fill="#FBAA19" d="M491.3,489.9c13.6,0,24.8,10.3,26.1,23.5c0.1-0.9,0.1-1.7,0.1-2.6c0-14.5-11.8-26.1-26.2-26.1
c-14.5,0-26.2,11.8-26.2,26.1c0,0.9,0,1.8,0.1,2.6C466.5,500.2,477.7,489.9,491.3,489.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB