mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 19:39:40 -04:00
Merge branch 'tmp32'
This commit is contained in:
commit
ede3e25dc3
@ -71,7 +71,7 @@ twitter = "GoHugoIO"
|
||||
[params]
|
||||
description = "The world’s fastest framework for building websites"
|
||||
## Used for views in rendered HTML (i.e., rather than using the .Hugo variable)
|
||||
release = "0.31.1"
|
||||
release = "0.33-DEV"
|
||||
## Setting this to true will add a "noindex" to *EVERY* page on the site
|
||||
removefromexternalsearch = false
|
||||
## Gh repo for site footer (include trailing slash)
|
||||
|
178
content/about/new-in-032.md
Normal file
178
content/about/new-in-032.md
Normal file
@ -0,0 +1,178 @@
|
||||
---
|
||||
title: Hugo 0.32 HOWTO
|
||||
description: About page bundles, image processing and more.
|
||||
date: 2017-12-28
|
||||
keywords: [ssg,static,performance,security]
|
||||
menu:
|
||||
docs:
|
||||
parent: "about"
|
||||
weight: 10
|
||||
weight: 10
|
||||
sections_weight: 10
|
||||
draft: false
|
||||
aliases: []
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
||||
{{% note %}}
|
||||
This documentation belongs in other places in this documentation site, but is put here first ... to get something up and running fast.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
Also see this demo project from [bep](https://github.com/bep/), the clever Norwegian behind these new features:
|
||||
|
||||
* http://hugotest.bep.is/
|
||||
* https://github.com/bep/hugotest (source)
|
||||
|
||||
## Page Resources
|
||||
|
||||
### Organize Your Content
|
||||
|
||||
{{< figure src="/images/hugo-content-bundles.png" title="Pages with image resources" >}}
|
||||
|
||||
The content folder above shows a mix of content pages (`md` (i.e. markdown) files) and image resources.
|
||||
|
||||
{{% note %}}
|
||||
You can use any file type as a content resource as long as it is a MIME type recognized by Hugo (`json` files will, as one example, work fine). If you want to get exotic, you can define your [own media type](/templates/output-formats/#media-types).
|
||||
{{% /note %}}
|
||||
|
||||
The 3 page bundles marked in red explained from top to bottom:
|
||||
|
||||
1. The home page with one image resource (`1-logo.png`)
|
||||
2. The blog section with two images resources and two pages resources (`content1.md`, `content2.md`). Note that the `_index.md` represents the URL for this section.
|
||||
3. An article (`hugo-is-cool`) with a folder with some images and one content resource (`cats-info.md`). Note that the `index.md` represents the URL for this article.
|
||||
|
||||
The content files below `blog/posts` are just regular standalone pages.
|
||||
|
||||
{{% note %}}
|
||||
Note that changes to any resource inside the `content` folder will trigger a reload when running in watch (aka server or live reload mode), it will even work with `--navigateToChanged`.
|
||||
{{% /note %}}
|
||||
|
||||
#### Sort Order
|
||||
|
||||
* Pages are sorted according to standard Hugo page sorting rules.
|
||||
* Images and other resources are sorted in lexicographical order.
|
||||
|
||||
### Handle Page Resources in Templates
|
||||
|
||||
|
||||
#### List all Resources
|
||||
|
||||
```html
|
||||
{{ range .Resources }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .ResourceType | title }}</a></li>
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
For an absolute URL, use `.Permalink`.
|
||||
|
||||
**Note:** The permalink will be relative to the content page, respecting permalink settings. Also, included page resources will not have a value for `RelPermalink`.
|
||||
|
||||
#### List All Resources by Type
|
||||
|
||||
```html
|
||||
{{ with .Resources.ByType "image" }}
|
||||
{{ end }}
|
||||
|
||||
```
|
||||
|
||||
Type here is `page` for pages, else the main type in the MIME type, so `image`, `json` etc.
|
||||
|
||||
#### Get a Specific Resource
|
||||
|
||||
```html
|
||||
{{ $logo := .Resources.GetByPrefix "logo" }}
|
||||
{{ with $logo }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
#### Include Page Resource Content
|
||||
|
||||
```html
|
||||
{{ with .Resources.ByType "page" }}
|
||||
{{ range . }}
|
||||
<h3>{{ .Title }}</h3>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Image Processing
|
||||
|
||||
The `image` resource implements the methods `Resize`, `Fit` and `Fill`:
|
||||
|
||||
Resize
|
||||
: Resize to the given dimension, `{{ $logo.Resize "200x" }}` will resize to 200 pixels wide and preserve the aspect ratio. Use `{{ $logo.Resize "200x100" }}` to control both height and width.
|
||||
|
||||
Fit
|
||||
: Scale down the image to fit the given dimensions, e.g. `{{ $logo.Fit "200x100" }}` will fit the image inside a box that is 200 pixels wide and 100 pixels high.
|
||||
|
||||
Fill
|
||||
: Resize and crop the image given dimensions, e.g. `{{ $logo.Fill "200x100" }}` will resize and crop to width 200 and height 100
|
||||
|
||||
|
||||
{{% note %}}
|
||||
Image operations in Hugo currently **do not preserve EXIF data** as this is not supported by Go's [image package](https://github.com/golang/go/search?q=exif&type=Issues&utf8=%E2%9C%93). This will be improved on in the future.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
### Image Processing Options
|
||||
|
||||
In addition to the dimensions (e.g. `200x100`) where either height or width can be omitted, Hugo supports a set of additional image options:
|
||||
|
||||
Anchor
|
||||
: Only relevant for `Fill`. This is useful for thumbnail generation where the main motive is located in, say, the left corner. Valid are `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`. Example: `{{ $logo.Fill "200x100 BottomLeft" }}`
|
||||
|
||||
JPEG Quality
|
||||
: Only relevant for JPEG images, values 1 to 100 inclusive, higher is better. Default is 75. `{{ $logo.Resize "200x q50" }}`
|
||||
|
||||
Rotate
|
||||
: Rotates an image by the given angle counter-clockwise. The rotation will be performed first to get the dimensions correct. `{{ $logo.Resize "200x r90" }}`. The main use of this is to be able to manually correct for [EXIF orientation](https://github.com/golang/go/issues/4341) of JPEG images.
|
||||
|
||||
Resample Filter
|
||||
: Filter used in resizing. Default is `Box`, a simple and fast resampling filter appropriate for downscaling. See https://github.com/disintegration/imaging for more. If you want to trade quality for faster processing, this may be a option to test.
|
||||
|
||||
|
||||
|
||||
### Performance
|
||||
|
||||
Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused.
|
||||
|
||||
If you change your image settings (e.g. size), remove or rename images etc., you will end up with unused images taking up space and cluttering your project.
|
||||
|
||||
To clean up, run:
|
||||
|
||||
```bash
|
||||
hugo --gc
|
||||
```
|
||||
|
||||
|
||||
{{% note %}}
|
||||
**GC** is short for **Garbage Collection**.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
### Default Image Processing Config
|
||||
|
||||
You can configure an `imaging` section in `config.toml` with default image processing options:
|
||||
|
||||
```toml
|
||||
[imaging]
|
||||
# Default resample filter used for resizing. Default is Box,
|
||||
# a simple and fast averaging filter appropriate for downscaling.
|
||||
# See https://github.com/disintegration/imaging
|
||||
resampleFilter = "box"
|
||||
|
||||
# Defatult JPEG quality setting. Default is 75.
|
||||
quality = 68
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo"
|
||||
slug: hugo
|
||||
url: /commands/hugo/
|
||||
@ -42,6 +42,7 @@ hugo [flags]
|
||||
--disableSitemap do not build Sitemap file
|
||||
--enableGitInfo add Git revision, date and author info to the pages
|
||||
--forceSyncStatic copy all files when static is changed.
|
||||
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||
-h, --help help for hugo
|
||||
--i18n-warnings print missing translations
|
||||
--ignoreCache ignores the cache directory
|
||||
@ -80,4 +81,4 @@ hugo [flags]
|
||||
* [hugo undraft](/commands/hugo_undraft/) - Undraft resets the content's draft status
|
||||
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo benchmark"
|
||||
slug: hugo_benchmark
|
||||
url: /commands/hugo_benchmark/
|
||||
@ -38,6 +38,7 @@ hugo benchmark [flags]
|
||||
--disableSitemap do not build Sitemap file
|
||||
--enableGitInfo add Git revision, date and author info to the pages
|
||||
--forceSyncStatic copy all files when static is changed.
|
||||
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||
-h, --help help for benchmark
|
||||
--i18n-warnings print missing translations
|
||||
--ignoreCache ignores the cache directory
|
||||
@ -72,4 +73,4 @@ hugo benchmark [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo check"
|
||||
slug: hugo_check
|
||||
url: /commands/hugo_check/
|
||||
@ -35,4 +35,4 @@ Contains some verification checks
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
* [hugo check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo check ulimit"
|
||||
slug: hugo_check_ulimit
|
||||
url: /commands/hugo_check_ulimit/
|
||||
@ -39,4 +39,4 @@ hugo check ulimit [flags]
|
||||
### SEE ALSO
|
||||
* [hugo check](/commands/hugo_check/) - Contains some verification checks
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo config"
|
||||
slug: hugo_config
|
||||
url: /commands/hugo_config/
|
||||
@ -38,4 +38,4 @@ hugo config [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo convert"
|
||||
slug: hugo_convert
|
||||
url: /commands/hugo_convert/
|
||||
@ -42,4 +42,4 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
|
||||
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
|
||||
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo convert toJSON"
|
||||
slug: hugo_convert_toJSON
|
||||
url: /commands/hugo_convert_tojson/
|
||||
@ -42,4 +42,4 @@ hugo convert toJSON [flags]
|
||||
### SEE ALSO
|
||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo convert toTOML"
|
||||
slug: hugo_convert_toTOML
|
||||
url: /commands/hugo_convert_totoml/
|
||||
@ -42,4 +42,4 @@ hugo convert toTOML [flags]
|
||||
### SEE ALSO
|
||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo convert toYAML"
|
||||
slug: hugo_convert_toYAML
|
||||
url: /commands/hugo_convert_toyaml/
|
||||
@ -42,4 +42,4 @@ hugo convert toYAML [flags]
|
||||
### SEE ALSO
|
||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo env"
|
||||
slug: hugo_env
|
||||
url: /commands/hugo_env/
|
||||
@ -38,4 +38,4 @@ hugo env [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo gen"
|
||||
slug: hugo_gen
|
||||
url: /commands/hugo_gen/
|
||||
@ -38,4 +38,4 @@ A collection of several useful generators.
|
||||
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
|
||||
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo gen autocomplete"
|
||||
slug: hugo_gen_autocomplete
|
||||
url: /commands/hugo_gen_autocomplete/
|
||||
@ -56,4 +56,4 @@ hugo gen autocomplete [flags]
|
||||
### SEE ALSO
|
||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo gen chromastyles"
|
||||
slug: hugo_gen_chromastyles
|
||||
url: /commands/hugo_gen_chromastyles/
|
||||
@ -43,4 +43,4 @@ hugo gen chromastyles [flags]
|
||||
### SEE ALSO
|
||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo gen doc"
|
||||
slug: hugo_gen_doc
|
||||
url: /commands/hugo_gen_doc/
|
||||
@ -45,4 +45,4 @@ hugo gen doc [flags]
|
||||
### SEE ALSO
|
||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo gen man"
|
||||
slug: hugo_gen_man
|
||||
url: /commands/hugo_gen_man/
|
||||
@ -41,4 +41,4 @@ hugo gen man [flags]
|
||||
### SEE ALSO
|
||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo import"
|
||||
slug: hugo_import
|
||||
url: /commands/hugo_import/
|
||||
@ -37,4 +37,4 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo import jekyll"
|
||||
slug: hugo_import_jekyll
|
||||
url: /commands/hugo_import_jekyll/
|
||||
@ -41,4 +41,4 @@ hugo import jekyll [flags]
|
||||
### SEE ALSO
|
||||
* [hugo import](/commands/hugo_import/) - Import your site from others.
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo list"
|
||||
slug: hugo_list
|
||||
url: /commands/hugo_list/
|
||||
@ -40,4 +40,4 @@ List requires a subcommand, e.g. `hugo list drafts`.
|
||||
* [hugo list expired](/commands/hugo_list_expired/) - List all posts already expired
|
||||
* [hugo list future](/commands/hugo_list_future/) - List all posts dated in the future
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo list drafts"
|
||||
slug: hugo_list_drafts
|
||||
url: /commands/hugo_list_drafts/
|
||||
@ -39,4 +39,4 @@ hugo list drafts [flags]
|
||||
### SEE ALSO
|
||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo list expired"
|
||||
slug: hugo_list_expired
|
||||
url: /commands/hugo_list_expired/
|
||||
@ -40,4 +40,4 @@ hugo list expired [flags]
|
||||
### SEE ALSO
|
||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo list future"
|
||||
slug: hugo_list_future
|
||||
url: /commands/hugo_list_future/
|
||||
@ -40,4 +40,4 @@ hugo list future [flags]
|
||||
### SEE ALSO
|
||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo new"
|
||||
slug: hugo_new
|
||||
url: /commands/hugo_new/
|
||||
@ -48,4 +48,4 @@ hugo new [path] [flags]
|
||||
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
|
||||
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo new site"
|
||||
slug: hugo_new_site
|
||||
url: /commands/hugo_new_site/
|
||||
@ -43,4 +43,4 @@ hugo new site [path] [flags]
|
||||
### SEE ALSO
|
||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo new theme"
|
||||
slug: hugo_new_theme
|
||||
url: /commands/hugo_new_theme/
|
||||
@ -42,4 +42,4 @@ hugo new theme [name] [flags]
|
||||
### SEE ALSO
|
||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo server"
|
||||
slug: hugo_server
|
||||
url: /commands/hugo_server/
|
||||
@ -50,6 +50,7 @@ hugo server [flags]
|
||||
--disableSitemap do not build Sitemap file
|
||||
--enableGitInfo add Git revision, date and author info to the pages
|
||||
--forceSyncStatic copy all files when static is changed.
|
||||
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||
-h, --help help for server
|
||||
--i18n-warnings print missing translations
|
||||
--ignoreCache ignores the cache directory
|
||||
@ -90,4 +91,4 @@ hugo server [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo undraft"
|
||||
slug: hugo_undraft
|
||||
url: /commands/hugo_undraft/
|
||||
@ -40,4 +40,4 @@ hugo undraft path/to/content [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
date: 2017-11-18T10:28:35+01:00
|
||||
date: 2017-12-28T18:49:29+01:00
|
||||
title: "hugo version"
|
||||
slug: hugo_version
|
||||
url: /commands/hugo_version/
|
||||
@ -38,4 +38,4 @@ hugo version [flags]
|
||||
### SEE ALSO
|
||||
* [hugo](/commands/hugo/) - hugo builds your site
|
||||
|
||||
###### Auto generated by spf13/cobra on 18-Nov-2017
|
||||
###### Auto generated by spf13/cobra on 28-Dec-2017
|
||||
|
@ -6,7 +6,7 @@ date: 2017-01-10
|
||||
publishdate: 2017-01-10
|
||||
lastmod: 2017-04-06
|
||||
categories: [content management]
|
||||
keywords: [markdown,asciidoc,mmark,content format]
|
||||
keywords: [markdown,asciidoc,mmark,pandoc,content format]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
@ -195,12 +195,19 @@ With this setup, everything is in place for a natural usage of MathJax on pages
|
||||
|
||||
## Additional Formats Through External Helpers
|
||||
|
||||
Hugo has new concept called _external helpers_. It means that you can write your content using [Asciidoc][ascii], [reStructuredText][rest]. If you have files with associated extensions, Hugo will call external commands to generate the content. ([See the Hugo source code for external helpers][helperssource].)
|
||||
Hugo has a new concept called _external helpers_. It means that you can write your content using [Asciidoc][ascii], [reStructuredText][rest], or [pandoc]. If you have files with associated extensions, Hugo will call external commands to generate the content. ([See the Hugo source code for external helpers][helperssource].)
|
||||
|
||||
For example, for Asciidoc files, Hugo will try to call the `asciidoctor` or `asciidoc` command. This means that you will have to install the associated tool on your machine to be able to use these formats. ([See the Asciidoctor docs for installation instructions](http://asciidoctor.org/docs/install-toolchain/)).
|
||||
|
||||
To use these formats, just use the standard extension and the front matter exactly as you would do with natively supported `.md` files.
|
||||
|
||||
Hugo passes reasonable default arguments to these external helpers by default:
|
||||
|
||||
- `asciidoc`: `--no-header-footer --safe -`
|
||||
- `asciidoctor`: `--no-header-footer --safe --trace -`
|
||||
- `rst2html`: `--leave-comments --initial-header-level=2`
|
||||
- `pandoc`: `--mathjax`
|
||||
|
||||
{{% warning "Performance of External Helpers" %}}
|
||||
Because additional formats are external commands generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
|
||||
{{% /warning %}}
|
||||
@ -235,6 +242,7 @@ Markdown syntax is simple enough to learn in a single sitting. The following are
|
||||
[mmark]: https://github.com/miekg/mmark
|
||||
[mmarkgh]: https://github.com/miekg/mmark/wiki/Syntax
|
||||
[org]: http://orgmode.org/
|
||||
[pandoc]: http://www.pandoc.org/
|
||||
[Pygments]: http://pygments.org/
|
||||
[rest]: http://docutils.sourceforge.net/rst.html
|
||||
[sc]: /content-management/shortcodes/
|
||||
|
93
content/news/0.32-relnotes-ready.md
Normal file
93
content/news/0.32-relnotes-ready.md
Normal file
@ -0,0 +1,93 @@
|
||||
|
||||
---
|
||||
date: 2017-12-31
|
||||
title: "0.32"
|
||||
description: "0.32"
|
||||
slug: "0.32"
|
||||
categories: ["Releases"]
|
||||
---
|
||||
|
||||
Hugo `0.32` features **Page Bundles and Image Processing** by [@bep](https://github.com/bep), which is very cool and useful on so many levels. Read about it in more detail in the [Hugo documentation](https://gohugo.io/about/new-in-032/), but some of the highlights include:
|
||||
|
||||
* Automatic bundling of a content page with its resources. Resources can be anything: Images, `JSON` files ... and also other content pages.
|
||||
* A `Resource` will have its `RelPermalink` and `Permalink` relative to the "owning page". This makes the complete article with both text and images portable (just send a ZIP file with a folder to your editor), and it can be previewed directly on GitHub.
|
||||
* Powerful and simple to use image processing with the new `.Resize`, `.Fill`, and `.Fit` methods on the new `Image` resource.
|
||||
* Full support for symbolic links inside `/content`, both for regular files and directories.
|
||||
|
||||
The built-in benchmarks in Hugo show that this is also the [fastest and most memory effective](https://gist.github.com/bep/2a9bbd221de2da5d39c8b32085c658f7) Hugo version to date. But note that the build time total reported in the console is now adjusted to be the *real total*, including the copy of static files. So, if it reports more milliseconds, it is still most likely faster ...
|
||||
|
||||
This release represents **30 contributions by 7 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 [@betaveros](https://github.com/betaveros), [@chaseadamsio](https://github.com/chaseadamsio), and [@kropp](https://github.com/kropp). And as always big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the documentation and the themes site in pristine condition.
|
||||
|
||||
Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
|
||||
which has received **17 contributions by 7 contributors**. A special thanks to [@bep](https://github.com/bep), [@felicianotech](https://github.com/felicianotech), [@maiki](https://github.com/maiki), and [@carlchengli](https://github.com/carlchengli) for their work on the documentation site.
|
||||
|
||||
Hugo now has:
|
||||
|
||||
* 22061+ [stars](https://github.com/gohugoio/hugo/stargazers)
|
||||
* 454+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
|
||||
* 193+ [themes](http://themes.gohugo.io/)
|
||||
|
||||
Today is **New Year's Eve.** It is the last day of 2017, a year that have seen a **string of pearls of Hugo releases**, making Hugo _the_ top choice for website development:
|
||||
|
||||
* 0.32, December 2017: **Page Bundles and Image Processing** edition.
|
||||
* 0.31, November 2017: The Language **Multihost Edition!** with one `baseURL` per language.
|
||||
* 0.30, October 2017: The Race Car Edition with the **Fast Render Mode**.
|
||||
* 0.29, September 2017: Added **Template Metrics**.
|
||||
* 0.28, September 2017: **Blistering fast and native syntax highlighting** from [Chroma](https://github.com/alecthomas/chroma).
|
||||
* 0.27, September 2017: Fast and flexible **Related Content.**
|
||||
* 0.26, August 2017: The **Language Style Edition** with AP Style or Chicago Style Title Case and « French Guillemets ».
|
||||
* 0.25, July 2017: The **Kinder Surprise** edition added, among other cool things, `hugo server --navigateToChanged` which navigates to the content page you start editing.
|
||||
* 0.24, June 2017: Was **The Revival of the Archetypes!** Now archetype files, i.e. the content file templates, can include template syntax with all of Hugo's functions and variables.
|
||||
* 0.23, June 2017: Hugo moved to it's own GitHub organization, **gohugoio**.
|
||||
* 0.22, June 2017: Added **nested sections**, a long sought after feature.
|
||||
* 0.21, May 2017: Full support for shortcodes per output format (think **AMP**).
|
||||
* 0.20, April 2017: Was all about **Custom Output Formats**.
|
||||
* 0.19, February 2017: Native Emacs Org-mode content support and lots of internal upgrades.
|
||||
|
||||
## Notes
|
||||
|
||||
* The build total in the console is now the ... total (i.e. it now includes both the copy of the static files and the Hugo build). So if your Hugo site seems to build slightly slower, it is in reality probably slightly faster than before this release.
|
||||
* Images and other static resources in folders with "_index.md" will have its `RelPermalink` relative to its page.
|
||||
* Images and other static resources in or below "index.md" folders will have its `RelPermalink` relative to its page (respecting permalink settings etc.)
|
||||
* Content pages in or below "index.md" will not get their own `URL`, but will be part of the `.Resources` collection of its page.
|
||||
* `.Site.Files` is deprecated.
|
||||
* Hugo no longer minfies CSS files inside `/content`. This was an undocumented "proof of concept feature". We may revisit the "assets handling" in a future release.
|
||||
* `Page.GetParam`does not lowercase your result anymore. If you really want to lowercase your params, do it with `.GetParam "myparam" | lower` or similar.
|
||||
|
||||
Previously deprecated that will now `ERROR`:
|
||||
|
||||
* `disable404`: Use `disableKinds=["404"]`
|
||||
* `disableRSS`: Use `disableKinds=["RSS"]`
|
||||
* `disableSitemap`: Use `disableKinds=["sitemap"]`
|
||||
* `disableRobotsTXT`: Use `disableKinds=["robotsTXT"]`
|
||||
|
||||
## Enhancements
|
||||
|
||||
* Add `.Title` and `.Page` to `MenuEntry` [9df3736f](https://github.com/gohugoio/hugo/commit/9df3736fec164c51d819797416dc263f2869be77) [@rmetzler](https://github.com/rmetzler) [#2784](https://github.com/gohugoio/hugo/issues/2784)
|
||||
* Add `Pandoc` support [e69da7a4](https://github.com/gohugoio/hugo/commit/e69da7a4cb725987f153707bf2fc59c135007e2a) [@betaveros](https://github.com/betaveros) [#234](https://github.com/gohugoio/hugo/issues/234)
|
||||
* Implement Page bundling and image handling [3cdf19e9](https://github.com/gohugoio/hugo/commit/3cdf19e9b7e46c57a9bb43ff02199177feb55768) [@bep](https://github.com/bep) [#3651](https://github.com/gohugoio/hugo/issues/3651)[#3158](https://github.com/gohugoio/hugo/issues/3158)[#1014](https://github.com/gohugoio/hugo/issues/1014)[#2021](https://github.com/gohugoio/hugo/issues/2021)[#1240](https://github.com/gohugoio/hugo/issues/1240)[#3757](https://github.com/gohugoio/hugo/issues/3757)
|
||||
* Make `chomp` return the type it receives [22cd89ad](https://github.com/gohugoio/hugo/commit/22cd89adc4792a3b55389d38acd4acfae3786775) [@kropp](https://github.com/kropp) [#2187](https://github.com/gohugoio/hugo/issues/2187)
|
||||
* Reuse the `BlackFriday` config instance when possible [db4b7a5c](https://github.com/gohugoio/hugo/commit/db4b7a5c6742c75f9cd9627d3b054d3a72802ec8) [@bep](https://github.com/bep)
|
||||
* Remove the goroutines from the shortcode lexer [24369410](https://github.com/gohugoio/hugo/commit/243694102a60da2fb1050020f68384539f9f9ef5) [@bep](https://github.com/bep)
|
||||
* Improve site benchmarks [051fa343](https://github.com/gohugoio/hugo/commit/051fa343d06d6c070df742f7cbd125432fcab665) [@bep](https://github.com/bep)
|
||||
* Update `Chroma` to `v0.2.0` [79892101](https://github.com/gohugoio/hugo/commit/7989210120dbde78da3741e2ef01b13f4aa78692) [@bep](https://github.com/bep) [#4087](https://github.com/gohugoio/hugo/issues/4087)
|
||||
* Update `goorgeous` to `v1.1.0` [7f2ae3ef](https://github.com/gohugoio/hugo/commit/7f2ae3ef39f27a9bd26ddb9258b073a840faf491) [@chaseadamsio](https://github.com/chaseadamsio)
|
||||
* Add test for homepage content for all rendering engines [407c2402](https://github.com/gohugoio/hugo/commit/407c24020ef2db90cf33fd07e7522b2257013722) [@bep](https://github.com/bep) [#4166](https://github.com/gohugoio/hugo/issues/4166)
|
||||
* Add output formats definition to benchmarks [a2d81ce9](https://github.com/gohugoio/hugo/commit/a2d81ce983d45b5742c93bd472503c88286f099a) [@bep](https://github.com/bep)
|
||||
|
||||
## Fixes
|
||||
|
||||
### Templates
|
||||
|
||||
* Do not unescape input to `highlight` [c067f345](https://github.com/gohugoio/hugo/commit/c067f34558b82455b63b9ce8f5983b4b4849c7cf) [@bep](https://github.com/bep) [#4179](https://github.com/gohugoio/hugo/issues/4179)
|
||||
* Properly close image file in `imageConfig` [6d79beb5](https://github.com/gohugoio/hugo/commit/6d79beb5f67dbb54d7714c3195addf9d8e3924e8) [@bep](https://github.com/bep)
|
||||
* Fix `opengraph` video range template [23f69efb](https://github.com/gohugoio/hugo/commit/23f69efb3914946b39ce673fcc0f2e3a9ed9d878) [@drlogout](https://github.com/drlogout) [#4136](https://github.com/gohugoio/hugo/issues/4136)
|
||||
* Fix `humanize` for multi-byte runes [e7652180](https://github.com/gohugoio/hugo/commit/e7652180a13ce149041c48a1c2754c471df569c8) [@bep](https://github.com/bep) [#4133](https://github.com/gohugoio/hugo/issues/4133)
|
||||
|
||||
### Other
|
||||
|
||||
* Fix broken live reload without a server port. [25114986](https://github.com/gohugoio/hugo/commit/25114986086e5877a0b4108d8cf5e4e95f377241) [@sainaen](https://github.com/sainaen) [#4141](https://github.com/gohugoio/hugo/issues/4141)
|
||||
* Make sure all language homes are always re-rendered in fast render mode [72903be5](https://github.com/gohugoio/hugo/commit/72903be587e9c4e3644f60b11e26238ec03da2db) [@bep](https://github.com/bep) [#4125](https://github.com/gohugoio/hugo/issues/4125)
|
||||
* Do not `tolower` result from Page.GetParam [1c114d53](https://github.com/gohugoio/hugo/commit/1c114d539b0755724443fe28c90b12fe2a19085a) [@bep](https://github.com/bep) [#4187](https://github.com/gohugoio/hugo/issues/4187)
|
BIN
static/images/blog/hugo-32-poster.png
Normal file
BIN
static/images/blog/hugo-32-poster.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
BIN
static/images/hugo-content-bundles.png
Normal file
BIN
static/images/hugo-content-bundles.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
Loading…
x
Reference in New Issue
Block a user