Merge commit '978856e2ad12d2bcaf37bb9e31f806b30a4c42f4'

This commit is contained in:
Bjørn Erik Pedersen
2018-12-26 10:27:54 +01:00
18 changed files with 432 additions and 15 deletions

View File

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

View File

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

View File

@@ -1,6 +1,7 @@
---
title: reflect.IsSlice
description: Reports if a value is a slice.
draft: true
godocref:
date: 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
title: "0.53"
description: "0.53"
title: "Hugo Christmas Edition"
description: "Hugo 0.53: Faster, config dir support, new unmarshal func, global site var, and more ..."
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:
* 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.
* `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 ".").
**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.
**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."