Merge commit '978856e2ad12d2bcaf37bb9e31f806b30a4c42f4'

This commit is contained in:
Bjørn Erik Pedersen 2018-12-26 10:27:54 +01:00
commit 22afe28047
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
18 changed files with 432 additions and 15 deletions

View file

@ -0,0 +1,90 @@
baseURL = "https://gohugo.io/"
paginate = 100
defaultContentLanguage = "en"
enableEmoji = true
# Set the unicode character used for the "return" link in page footnotes.
footnotereturnlinkcontents = "↩"
languageCode = "en-us"
metaDataFormat = "yaml"
title = "Hugo"
theme = "gohugoioTheme"
googleAnalytics = "UA-7131036-4"
pluralizeListTitles = false
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
disableAliases = true
# Highlighting config (Pygments)
# It is (currently) not in use, but you can do ```go in a content file if you want to.
pygmentsCodeFences = true
pygmentsOptions = ""
# Use the Chroma stylesheet
pygmentsUseClasses = true
pygmentsUseClassic = false
# See https://help.farbox.com/pygments.html
pygmentsStyle = "trac"
[outputs]
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
section = [ "HTML", "RSS"]
[mediaTypes]
[mediaTypes."text/netlify"]
delimiter = ""
[outputFormats]
[outputFormats.REDIR]
mediatype = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true
[outputFormats.HEADERS]
mediatype = "text/netlify"
baseName = "_headers"
isPlainText = true
notAlternative = true
[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "keywords"
weight = 100
[[related.indices]]
name = "date"
weight = 10
pattern = "2006"
[social]
twitter = "GoHugoIO"
# MARKDOWN
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]
plainIDAnchors = true
# See https://github.com/gohugoio/hugo/issues/2424
hrefTargetBlank = false
angledQuotes = false
latexDashes = true
[imaging]
# See https://github.com/disintegration/imaging
# CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots.
# Note that you can also set this per image processing.
resampleFilter = "CatmullRom"
# Default JPEG quality setting. Default is 75.
quality = 75
anchor = "smart"
[taxonomies]
category = "categories"

View file

@ -0,0 +1,10 @@
[en]
contentDir = "content/en"
languageName = "English"
weight = 1
[zh]
contentDir = "content/zh"
languageName = "中文"
weight = 2

View file

@ -0,0 +1,154 @@
[[docs]]
name = "About Hugo"
weight = 1
identifier = "about"
url = "/about/"
[[docs]]
name = "Getting Started"
weight = 5
identifier = "getting-started"
url = "/getting-started/"
[[docs]]
name = "Themes"
weight = 15
identifier = "themes"
post = "break"
url = "/themes/"
# Core Menus
[[docs]]
name = "Content Management"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/content-management/"
[[docs]]
name = "Templates"
weight = 25
identifier = "templates"
url = "/templates/"
[[docs]]
name = "Functions"
weight = 30
identifier = "functions"
url = "/functions/"
[[docs]]
name = "Variables"
weight = 35
identifier = "variables"
url = "/variables/"
[[docs]]
name = "Hugo Pipes"
weight = 36
identifier = "pipes"
url = "/hugo-pipes/"
[[docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"
# LOW LEVEL ITEMS
[[docs]]
name = "Troubleshooting"
weight = 60
identifier = "troubleshooting"
url = "/troubleshooting/"
[[docs]]
name = "Tools"
weight = 70
identifier = "tools"
url = "/tools/"
[[docs]]
name = "Hosting & Deployment"
weight = 80
identifier = "hosting-and-deployment"
url = "/hosting-and-deployment/"
[[docs]]
name = "Contribute"
weight = 100
post = "break"
identifier = "contribute"
url = "/contribute/"
#[[docs]]
# name = "Tags"
# weight = 120
# identifier = "tags"
# url = "/tags/"
# [[docs]]
# name = "Categories"
# weight = 140
# identifier = "categories"
# url = "/categories/"
######## QUICKLINKS
[[quicklinks]]
name = "Fundamentals"
weight = 1
identifier = "fundamentals"
url = "/tags/fundamentals/"
######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES
[[global]]
name = "News"
weight = 1
identifier = "news"
url = "/news/"
[[global]]
name = "Docs"
weight = 5
identifier = "docs"
url = "/documentation/"
[[global]]
name = "Themes"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"
[[global]]
name = "Showcase"
weight = 20
identifier = "showcase"
url = "/showcase/"
# Anything with a weight > 100 gets an external icon
[[global]]
name = "Community"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"
[[global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"

View file

@ -0,0 +1,121 @@
# Chinese menus
[[docs]]
name = "关于 Hugo"
weight = 1
identifier = "about"
url = "/zh/about/"
[[docs]]
name = "入门"
weight = 5
identifier = "getting-started"
url = "/zh/getting-started/"
[[docs]]
name = "主题"
weight = 15
identifier = "themes"
post = "break"
url = "/zh/themes/"
# Core languages.zh.menus
[[docs]]
name = "内容管理"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/zh/content-management/"
[[docs]]
name = "模板"
weight = 25
identifier = "templates"
url = "/zh/templates/"
[[docs]]
name = "函数"
weight = 30
identifier = "functions"
url = "/zh/functions/"
[[docs]]
name = "变量"
weight = 35
identifier = "variables"
url = "/zh/variables/"
[[docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"
# LOW LEVEL ITEMS
[[docs]]
name = "故障排除"
weight = 60
identifier = "troubleshooting"
url = "/zh/troubleshooting/"
[[docs]]
name = "工具"
weight = 70
identifier = "tools"
url = "/zh/tools/"
[[docs]]
name = "托管与部署"
weight = 80
identifier = "hosting-and-deployment"
url = "/zh/hosting-and-deployment/"
[[docs]]
name = "贡献"
weight = 100
post = "break"
identifier = "contribute"
url = "/zh/contribute/"
[[global]]
name = "新闻"
weight = 1
identifier = "news"
url = "/zh/news/"
[[global]]
name = "文档"
weight = 5
identifier = "docs"
url = "/zh/documentation/"
[[global]]
name = "主题"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"
[[global]]
name = "作品展示"
weight = 20
identifier = "showcase"
url = "/zh/showcase/"
# Anything with a weight > 100 gets an external icon
[[global]]
name = "社区"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"
[[global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"

View file

@ -0,0 +1,25 @@
description = "The worlds fastest framework for building websites"
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
release = "0.52"
## Setting this to true will add a "noindex" to *EVERY* page on the site..
removefromexternalsearch = false
## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/gohugoio/hugoDocs/"
## GH Repo for filing a new issue
github_repo = "https://github.com/gohugoio/hugo/issues/new"
### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links)
ghdocsrepo = "https://github.com/gohugoio/hugoDocs/tree/master/docs"
## Gitter URL
gitter = "https://gitter.im/spf13/hugo"
## Discuss Forum URL
forum = "https://discourse.gohugo.io/"
## Google Tag Manager
gtmid = ""
# First one is picked as the Twitter card image if not set on page.
images = ["images/gohugoio-card.png"]
flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-gray nested-copy-line-height"
#sidebar_direction = "sidebar_left"

View file

@ -0,0 +1 @@
# Params for development (server mode)

View file

@ -0,0 +1,6 @@
# Config for production
# This is turned off in development as it is relatively slow.
# This is needed to get accurate lastMod and Git commit info
# on the docs pages.
enableGitInfo = true

View file

@ -0,0 +1,6 @@
# Params for production
# This is turned off in development as it is relatively slow.
# This is needed to get accurate lastMod and Git commit info
# on the docs pages.
enableGitInfo = true

View file

@ -30,7 +30,7 @@ A Page Bundle can be one of:
| Layout type | `single` | `list` | | Layout type | `single` | `list` |
| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it | | 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` | | 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 | | Content from non-index page files... | Accessed only as page resources | Accessed only as regular pages |
## Leaf Bundles {#leaf-bundles} ## Leaf Bundles {#leaf-bundles}
@ -51,7 +51,7 @@ content/
│ │ ├── image1.jpg │ │ ├── image1.jpg
│ │ ├── image2.png │ │ ├── image2.png
│ │ └── index.md │ │ └── index.md
│ └── my-another-post │ └── my-other-post
   └── index.md    └── index.md
└── another-section └── another-section
@ -73,7 +73,7 @@ my-post
: This leaf bundle has the `index.md`, two other content : This leaf bundle has the `index.md`, two other content
Markdown files and two image files. Markdown files and two image files.
my-another-post my-other-post
: This leaf bundle has only the `index.md`. : This leaf bundle has only the `index.md`.
another-leaf-bundle another-leaf-bundle

View file

@ -1,6 +1,7 @@
--- ---
title: reflect.IsMap title: reflect.IsMap
description: Reports if a value is a map. description: Reports if a value is a map.
draft: true
godocref: godocref:
date: 2018-11-28 date: 2018-11-28
publishdate: 2018-11-28 publishdate: 2018-11-28

View file

@ -1,6 +1,7 @@
--- ---
title: reflect.IsSlice title: reflect.IsSlice
description: Reports if a value is a slice. description: Reports if a value is a slice.
draft: true
godocref: godocref:
date: 2018-11-28 date: 2018-11-28
publishdate: 2018-11-28 publishdate: 2018-11-28

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View file

@ -1,18 +1,20 @@
--- ---
date: 2018-12-24 date: 2018-12-24
title: "0.53" title: "Hugo Christmas Edition"
description: "0.53" description: "Hugo 0.53: Faster, config dir support, new unmarshal func, global site var, and more ..."
categories: ["Releases"] categories: ["Releases"]
--- ---
From all of us to all of you, a very Merry Christmas -- and Hugo `0.53`! From all of us to all of you, a very Merry Christmas -- and Hugo `0.53`!
The main new features in this release are: The main new features in this release are:
* You can now split your configuration into directories per environment. Hugo did support multiple configuration files before this release, but it was hard to manage for bigger sites, especially those with multiple languages. With this we have also formalized the concept of an `environment`; the defaults are `production` (when running `hugo`) or `development` (when running `hugo server`) but you can create any environment you like. We will update the documentation, but all the details are in [this issue](https://github.com/gohugoio/hugo/pull/5501#issue-236237630). Also, see [this PR](https://github.com/gohugoio/hugoDocs/pull/683) for how the refactored configuration for the Hugo website looks like. **Config Dir:** You can now split your configuration sections into directories per environment. Hugo did support multiple configuration files before this release, but it was hard to manage for bigger sites, especially those with multiple languages. With this we have also formalized the concept of an `environment`; the defaults are `production` (when running `hugo`) or `development` (when running `hugo server`) but you can create any environment you like. We will update the documentation, but all the details are in [this issue](https://github.com/gohugoio/hugo/pull/5501#issue-236237630). Also, see [this PR](https://github.com/gohugoio/hugoDocs/pull/683) for how the refactored configuration for the Hugo website looks like.
* `transform.Unmarshal` (see the [documentation](https://gohugo.io//functions/transform.unmarshal/) is a new and powerful template function that can turn `Resource` objects or strings with JSON, TOML, YAML or CSV into maps/arrays.
* Two new global variables in `site` and `hugo`. `hugo` gives you version info etc. (´{{ hugo.Version }}`, ´{{ hugo.Environment }}`), but the `site` is probably more useful, as it allows you to access the current [site's variables](https://gohugo.io/variables/site/) (e.g. `{{ site.RegularPages }}`) without any context (or "."). **Unmarshal JSON, TOML, YAML or CSV:** `transform.Unmarshal` (see the [documentation](https://gohugo.io//functions/transform.unmarshal/) is a new and powerful template function that can turn `Resource` objects or strings with JSON, TOML, YAML or CSV into maps/arrays.
**Global site and hugo var:** Two new global variables in `site` and `hugo`. `hugo` gives you version info etc. (`{{ hugo.Version }}`, `{{ hugo.Environment }}`), but the `site` is probably more useful, as it allows you to access the current [site's variables](https://gohugo.io/variables/site/) (e.g. `{{ site.RegularPages }}`) without any context (or ".").
This version is also the fastest to date. A site building benchmark shows around 10% faster, but that depends on the site. The important part here is that we're not getting slower. Its quite a challenge to consistently add significant new functionality and simultaneously improve performance. It's like not gaining weight during Christmas. We also had a small performance boost in version `0.50`. A user then reported that his big and complicated site had a 30% reduction in build time. This is important to us, one of the core features. It's in the slogan: "The worlds fastest framework for building websites." This version is also the fastest to date. A site building benchmark shows around 10% faster, but that depends on the site. The important part here is that we're not getting slower. Its quite a challenge to consistently add significant new functionality and simultaneously improve performance. It's like not gaining weight during Christmas. We also had a small performance boost in version `0.50`. A user then reported that his big and complicated site had a 30% reduction in build time. This is important to us, one of the core features. It's in the slogan: "The worlds fastest framework for building websites."

View file

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

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"Target":"output/css/app.min.3d04cd530b6fbca129e24fb79af6692fa64cad11185196c7a800e58b4b3e2f97.css","MediaType":"text/css","Data":{"Integrity":"sha256-PQTNUwtvvKEp4k+3mvZpL6ZMrREYUZbHqADli0s+L5c="}} {"Target":"output/css/app.min.e14b2e3b63f7e91f44cc63646938762f24be62093e9f883960605b30789b7337.css","MediaType":"text/css","Data":{"Integrity":"sha256-4UsuO2P36R9EzGNkaTh2LyS+Ygk+n4g5YGBbMHibczc="}}