Merge commit '047c4188dfc854f658d16f1e4a9501f9c97a31c7'

This commit is contained in:
Bjørn Erik Pedersen 2018-04-16 07:45:38 +02:00
commit 7c597c7d75
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
41 changed files with 12140 additions and 370 deletions

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

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

@ -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

@ -250,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: "↩"
@ -266,49 +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
@ -416,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

@ -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

@ -1,16 +1,15 @@
---
date: 2018-04-02
title: "0.38"
description: "0.38"
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.

View File

@ -1,8 +1,8 @@
---
date: 2018-04-05
title: "0.38.1"
description: "0.38.1"
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

View File

@ -1,8 +1,8 @@
---
date: 2018-04-09
title: "0.38.2"
description: "0.38.2"
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

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

@ -109,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:

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