Permalink
Browse files

Merge commit '83bef6955e014d40c0f00db9cebe09113154e999'

  • Loading branch information...
bep committed May 4, 2018
1 parent c4200dd commit 9af79e531f60ce7ab53ff0f1c3d3ee6678bb86c5
Showing 375 changed files with 901 additions and 397 deletions.
@@ -271,3 +271,139 @@ anchor = "smart"
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"
### LANGUAGES ###
[languages]
[languages.en]
contentDir = "content/en"
languageName = "English"
weight = 1
[languages.zh]
contentDir = "content/zh"
languageName = "中文"
weight = 2
### LANGUAGE-SPECIFIC MENUS ###
# Chinese menus
[[languages.zh.menu.docs]]
name = "关于 Hugo"
weight = 1
identifier = "about"
url = "/zh/about/"
[[languages.zh.menu.docs]]
name = "入门"
weight = 5
identifier = "getting-started"
url = "/zh/getting-started/"
[[languages.zh.menu.docs]]
name = "主题"
weight = 15
identifier = "themes"
post = "break"
url = "/zh/themes/"
# Core languages.zh.menus
[[languages.zh.menu.docs]]
name = "内容管理"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/zh/content-management/"
[[languages.zh.menu.docs]]
name = "模板"
weight = 25
identifier = "templates"
url = "/zh/templates/"
[[languages.zh.menu.docs]]
name = "函数"
weight = 30
identifier = "functions"
url = "/zh/functions/"
[[languages.zh.menu.docs]]
name = "变量"
weight = 35
identifier = "variables"
url = "/zh/variables/"
[[languages.zh.menu.docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"
# LOW LEVEL ITEMS
[[languages.zh.menu.docs]]
name = "故障排除"
weight = 60
identifier = "troubleshooting"
url = "/zh/troubleshooting/"
[[languages.zh.menu.docs]]
name = "工具"
weight = 70
identifier = "tools"
url = "/zh/tools/"
[[languages.zh.menu.docs]]
name = "托管与部署"
weight = 80
identifier = "hosting-and-deployment"
url = "/zh/hosting-and-deployment/"
[[languages.zh.menu.docs]]
name = "贡献"
weight = 100
post = "break"
identifier = "contribute"
url = "/zh/contribute/"
[[languages.zh.menu.global]]
name = "新闻"
weight = 1
identifier = "news"
url = "/zh/news/"
[[languages.zh.menu.global]]
name = "文档"
weight = 5
identifier = "docs"
url = "/zh/documentation/"
[[languages.zh.menu.global]]
name = "主题"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"
[[languages.zh.menu.global]]
name = "作品展示"
weight = 20
identifier = "showcase"
url = "/zh/showcase/"
# Anything with a weight > 100 gets an external icon
[[languages.zh.menu.global]]
name = "社区"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"
[[languages.zh.menu.global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -32,8 +32,8 @@ The above will create a new content file in `content/posts/my-first-post.md` usi
1. `archetypes/posts.md`
2. `archetypes/default.md`
3. `themes/my-theme/posts.md`
4. `themes/my-theme/default.md`
3. `themes/my-theme/archetypes/posts.md`
4. `themes/my-theme/archetypes/default.md`
The last two list items is only applicable if you use a theme and it uses the `my-theme` theme name as an example.
@@ -29,7 +29,7 @@ Before you begin writing your content in markdown, Blackfriday has a known issue
You can configure multiple aspects of Blackfriday as show in the following list. See the docs on [Configuration][config] for the full list of explicit directions you can give to Hugo when rendering your site.
{{< readfile file="/content/readfiles/bfconfig.md" markdown="true" >}}
{{< readfile file="/content/en/readfiles/bfconfig.md" markdown="true" >}}
## Extend Markdown
@@ -21,13 +21,16 @@ A Page Bundle can be one of:
- Leaf Bundle (leaf means it has no children)
- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
| | Leaf Bundle | Branch Bundle |
|-----------------|--------------------------------------------------------|---------------------------------------------------------|
| Usage           | Collection of resources (pages, images etc.) for single pages | Collection of non-page resources (images etc.)for list pages |
| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] |
| Layout type | `single` | `list` |
| Nesting | Doesn't allow nesting of more bundles under it | Allows nesting of leaf/branch bundles under it |
| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` |
| | Leaf Bundle | Branch Bundle |
|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) |
| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] |
| Allowed Resources | Page and non-page (like images, pdf, etc.) types | Only non-page (like images, pdf, etc.) types |
| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). |
| Layout type | `single` | `list` |
| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it |
| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` |
| Content from non-index page files .. | Accessed only as page resources | Accessed only as regular pages |
## Leaf Bundles {#leaf-bundles}
@@ -81,7 +81,7 @@ With the available [section variables and methods](#section-page-variables-and-m
Also see [Page Variables](/variables/page/).
{{< readfile file="/content/readfiles/sectionvars.md" markdown="true" >}}
{{< readfile file="/content/en/readfiles/sectionvars.md" markdown="true" >}}
## Content Section Lists
@@ -235,7 +235,7 @@ By adding the preceding `hidecaption` example, the following HTML will be added
#### Example `instagram` Display
Using the preceding `instagram` with hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
Using the preceding `instagram` with `hidecaption` example above, the following simulates the displayed experience for visitors to your website. Naturally, the final display will be contingent on your stylesheets and surrounding markup.
{{< instagram BWNjjyYFxVx hidecaption >}}
@@ -1,6 +1,6 @@
---
title: Syntax Highlighting
description: Hugo comes with reallly fast syntax highlighting from Chroma.
description: Hugo comes with really fast syntax highlighting from Chroma.
date: 2017-02-01
publishdate: 2017-02-01
keywords: [highlighting,pygments,chroma,code blocks,syntax]
@@ -18,7 +18,7 @@ toc: true
From Hugo 0.28, the default syntax hightlighter in Hugo is [Chroma](https://github.com/alecthomas/chroma); it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments.
If you want to continue to use Pygments (see below), set `pygmentsUseClassic=true` in your site config.
If you want to continue to use Pygments (see below), set `pygmentsUseClasses=true` in your site config.
The example below shows a simple code snippet from the Hugo source highlighted with the `highlight` shortcode. Note that the gohugo.io site is generated with `pygmentsUseClasses=true` (see [Generate Syntax Highlighter CSS](#generate-syntax-highlighter-css)).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -36,7 +36,7 @@ The examples of `delimit` that follow all use the same front matter:
{{< code file="delimit-example-front-matter.toml" nocopy="true" >}}
+++
title: I love Delimit
keywords: [ "tag1", "tag2", "tag3" ]
tags: [ "tag1", "tag2", "tag3" ]
+++
{{< /code >}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -21,15 +21,15 @@ aliases: []
See [`time.Time`](https://godoc.org/time#Time).
For example, building your site on June 24, 2017 with the following templating:
For example, building your site on June 24, 2017, with the following templating:
```
<div>
<small>&copy; {{ now.Format "2006"}}</small>
</div>
```
Which will produce the following:
would produce the following:
```
<div>
@@ -40,5 +40,11 @@ Which will produce the following:
The above example uses the [`.Format` function](/functions/format), which page includes a full listing of date formatting using Golang's layout string.
{{% note %}}
Older Hugo themes may use the deprecated `.Now` (uppercase). Be sure to use the lowercase `.now` in your templating.
Older Hugo themes may still be using the obsolete Page’s `.Now` (uppercase with leading dot), which causes build error that looks like the following:
ERROR ... Error while rendering "..." in "...": ...
executing "..." at <.Now.Format>:
can't evaluate field Now in type *hugolib.PageOutput
Be sure to use `now` (lowercase with _**no**_ leading dot) in your templating.
{{% /note %}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -369,7 +369,7 @@ Hugo typically configures Blackfriday with sane default values that should fit m
However, if you have specific needs with respect to Markdown, Hugo exposes some of its Blackfriday behavior options for you to alter. The following table lists these Hugo options, paired with the corresponding flags from Blackfriday's source code ( [html.go](https://github.com/russross/blackfriday/blob/master/html.go) and [markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)).
{{< readfile file="/content/readfiles/bfconfig.md" markdown="true" >}}
{{< readfile file="/content/en/readfiles/bfconfig.md" markdown="true" >}}
{{% note %}}
1. Blackfriday flags are *case sensitive* as of Hugo v0.15.
File renamed without changes.
File renamed without changes.
@@ -3,6 +3,7 @@ date: 2016-06-06T13:54:06-04:00
description: "Hugo 0.16 is our best and biggest release ever. The Hugo community has outdone itself with continued performance improvements, beautiful themes and increased stability."
title: "Hugo 0.16"
categories: ["Releases"]
aliases: [/0-16/]
---
Hugo 0.16 is our best and biggest release ever. The Hugo community has
@@ -6,6 +6,7 @@ description: "Hugo now supports multilingual sites with the most simple and eleg
link: ""
title: "0.17: Hugo is going global"
draft: false
aliases: [/0-17/]
---
Hugo is going global with our 0.17 release. We put a lot of thought into how we could extend Hugo
to support multilingual websites with the most simple and elegant experience. Hugo's multilingual
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.18"
draft: false
author: bep
aliases: [/0-18/]
---
Hugo 0.18.1 is a bug fix release fixing some issues introduced in Hugo 0.18:
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.19"
draft: false
author: budparr
aliases: [/0-19/]
---
We're happy to announce the first release of Hugo in 2017.
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.20"
draft: false
author: bep
aliases: [/0-20/]
---
Hugo `0.20` introduces the powerful and long sought after feature [Custom Output Formats](http://gohugo.io/extras/output-formats/); Hugo isn’t just that “static HTML with an added RSS feed” anymore. _Say hello_ to calendars, e-book formats, Google AMP, and JSON search indexes, to name a few ( [#2828](//github.com/gohugoio/hugo/issues/2828) ).
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.20.1"
draft: false
author: bep
aliases: [/0-20-1/]
---
* Fix logic for base template in work dir vs in the theme [#3323](//github.com/gohugoio/hugo/issues/3323)
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.20.2"
draft: false
author: bep
aliases: [/0-20-2/]
---
Hugo `0.20.2` adds support for plain text partials included into `HTML` templates. This was a side-effect of the big new [Custom Output Format](https://gohugo.io/extras/output-formats/) feature in `0.20`, and while the change was intentional and there was an ongoing discussion about fixing it in [#3273](//github.com/gohugoio/hugo/issues/3273), it did break some themes. There were valid workarounds for these themes, but we might as well get it right.
@@ -6,6 +6,7 @@ link: ""
title: "Hugo 0.20.3"
draft: false
author: bep
aliases: [/0-20-3/]
---
This is a bug-fix release with one important fix. But it also adds some harness around [GoReleaser](https://github.com/goreleaser/goreleaser) to automate the Hugo release process. Big thanks to [@caarlos0](https://github.com/caarlos0) for great and super-fast support fixing issues along the way.