Merge commit '83bef6955e014d40c0f00db9cebe09113154e999'

This commit is contained in:
Bjørn Erik Pedersen 2018-05-04 09:44:59 +02:00
commit 914cc85e22
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
375 changed files with 901 additions and 397 deletions

View file

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

View file

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View file

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

View file

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

View file

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View file

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

View file

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

View file

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

View file

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

View file

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

Some files were not shown because too many files have changed in this diff Show more