Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-02-01 11:01:04 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-02-01 11:01:04 +0300
commitddc15ed41b81b8b6493353c36f3b12a8e1d7654c (patch)
treee07180708f926ecd3fc6e5bad0a0765cde9b118a /docs/content/en
parentddc6d4e30f282f23b703a3b42da552886062c8c8 (diff)
parent5e078383a787e8b5ec3ba73f05ea4130840afbe2 (diff)
Merge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'
Diffstat (limited to 'docs/content/en')
-rw-r--r--docs/content/en/commands/hugo.md6
-rw-r--r--docs/content/en/commands/hugo_benchmark.md72
-rw-r--r--docs/content/en/commands/hugo_check.md4
-rw-r--r--docs/content/en/commands/hugo_check_ulimit.md4
-rw-r--r--docs/content/en/commands/hugo_config.md4
-rw-r--r--docs/content/en/commands/hugo_convert.md4
-rw-r--r--docs/content/en/commands/hugo_convert_toJSON.md4
-rw-r--r--docs/content/en/commands/hugo_convert_toTOML.md4
-rw-r--r--docs/content/en/commands/hugo_convert_toYAML.md4
-rw-r--r--docs/content/en/commands/hugo_env.md4
-rw-r--r--docs/content/en/commands/hugo_gen.md4
-rw-r--r--docs/content/en/commands/hugo_gen_autocomplete.md4
-rw-r--r--docs/content/en/commands/hugo_gen_chromastyles.md4
-rw-r--r--docs/content/en/commands/hugo_gen_doc.md4
-rw-r--r--docs/content/en/commands/hugo_gen_man.md4
-rw-r--r--docs/content/en/commands/hugo_import.md4
-rw-r--r--docs/content/en/commands/hugo_import_jekyll.md4
-rw-r--r--docs/content/en/commands/hugo_list.md4
-rw-r--r--docs/content/en/commands/hugo_list_drafts.md4
-rw-r--r--docs/content/en/commands/hugo_list_expired.md4
-rw-r--r--docs/content/en/commands/hugo_list_future.md4
-rw-r--r--docs/content/en/commands/hugo_new.md6
-rw-r--r--docs/content/en/commands/hugo_new_site.md4
-rw-r--r--docs/content/en/commands/hugo_new_theme.md4
-rw-r--r--docs/content/en/commands/hugo_server.md6
-rw-r--r--docs/content/en/commands/hugo_version.md4
-rw-r--r--docs/content/en/content-management/archetypes.md4
-rw-r--r--docs/content/en/content-management/cross-references.md2
-rw-r--r--docs/content/en/content-management/menus.md2
-rw-r--r--docs/content/en/content-management/organization/index.md14
-rw-r--r--docs/content/en/content-management/page-resources.md2
-rw-r--r--docs/content/en/content-management/static-files.md2
-rw-r--r--docs/content/en/content-management/taxonomies.md2
-rw-r--r--docs/content/en/content-management/toc.md4
-rw-r--r--docs/content/en/content-management/urls.md26
-rw-r--r--docs/content/en/contribute/documentation.md4
-rw-r--r--docs/content/en/functions/apply.md10
-rw-r--r--docs/content/en/functions/first.md29
-rw-r--r--docs/content/en/functions/len.md5
-rw-r--r--docs/content/en/functions/transform.Unmarshal.md11
-rw-r--r--docs/content/en/functions/where.md36
-rw-r--r--docs/content/en/getting-started/code-toggle.md4
-rw-r--r--docs/content/en/getting-started/configuration.md49
-rw-r--r--docs/content/en/getting-started/directory-structure.md10
-rw-r--r--docs/content/en/getting-started/quick-start.md29
-rw-r--r--docs/content/en/hosting-and-deployment/deployment-with-rsync.md4
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md2
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-gitlab.md2
-rw-r--r--docs/content/en/hosting-and-deployment/hosting-on-netlify.md4
-rw-r--r--docs/content/en/templates/base.md16
-rw-r--r--docs/content/en/templates/data-templates.md2
-rw-r--r--docs/content/en/templates/lists.md69
-rw-r--r--docs/content/en/templates/ordering-and-grouping.md41
-rw-r--r--docs/content/en/templates/pagination.md4
-rw-r--r--docs/content/en/templates/single-page-templates.md4
-rw-r--r--docs/content/en/templates/taxonomy-templates.md2
-rw-r--r--docs/content/en/templates/views.md4
-rw-r--r--docs/content/en/themes/creating.md5
-rw-r--r--docs/content/en/tools/editors.md2
-rw-r--r--docs/content/en/troubleshooting/build-performance.md6
-rw-r--r--docs/content/en/variables/hugo.md5
-rw-r--r--docs/content/en/variables/page.md8
-rw-r--r--docs/content/en/variables/site.md6
63 files changed, 276 insertions, 333 deletions
diff --git a/docs/content/en/commands/hugo.md b/docs/content/en/commands/hugo.md
index 67880f954..70cb53c29 100644
--- a/docs/content/en/commands/hugo.md
+++ b/docs/content/en/commands/hugo.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo"
slug: hugo
url: /commands/hugo/
@@ -55,7 +55,7 @@ hugo [flags]
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
- -t, --theme string theme to use (located in /themes/THEMENAME/)
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
-v, --verbose verbose output
--verboseLog verbose logging
@@ -75,4 +75,4 @@ hugo [flags]
* [hugo server](/commands/hugo_server/) - A high performance webserver
* [hugo version](/commands/hugo_version/) - Print the version number of Hugo
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_benchmark.md b/docs/content/en/commands/hugo_benchmark.md
deleted file mode 100644
index e1afe9f7b..000000000
--- a/docs/content/en/commands/hugo_benchmark.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-date: 2018-12-12
-title: "hugo benchmark"
-slug: hugo_benchmark
-url: /commands/hugo_benchmark/
----
-## hugo benchmark
-
-Benchmark Hugo by building a site a number of times.
-
-### Synopsis
-
-Hugo can build a site many times over and analyze the running process
-creating a benchmark.
-
-```
-hugo benchmark [flags]
-```
-
-### Options
-
-```
- -b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
- -D, --buildDrafts include content marked as draft
- -E, --buildExpired include expired content
- -F, --buildFuture include content with publishdate in the future
- --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
- --cleanDestinationDir remove files from destination not found in static directories
- -c, --contentDir string filesystem path to content directory
- -n, --count int number of times to build the site (default 13)
- --cpuprofile string path/filename for the CPU profile file
- -d, --destination string filesystem path to write files to
- --disableKinds strings disable different kind of pages (home, RSS etc.)
- --enableGitInfo add Git revision, date and author info to the pages
- -e, --environment string build environment
- --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
- -l, --layoutDir string filesystem path to layout directory
- --memprofile string path/filename for the memory profile file
- --minify minify any supported output format (HTML, XML etc.)
- --noChmod don't sync permission mode of files
- --noTimes don't sync modification time of files
- --renderToMemory render to memory (only useful for benchmark testing)
- -s, --source string filesystem path to read files relative from
- --stepAnalysis display memory and timing of different steps of the program
- --templateMetrics display metrics about template executions
- --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
- -t, --theme string theme to use (located in /themes/THEMENAME/)
- --themesDir string filesystem path to themes directory
-```
-
-### Options inherited from parent commands
-
-```
- --config string config file (default is path/config.yaml|json|toml)
- --configDir string config dir (default "config")
- --debug debug output
- --log enable Logging
- --logFile string log File path (if set, logging enabled automatically)
- --quiet build in quiet mode
- -v, --verbose verbose output
- --verboseLog verbose logging
-```
-
-### SEE ALSO
-
-* [hugo](/commands/hugo/) - hugo builds your site
-
-###### Auto generated by spf13/cobra on 12-Dec-2018
diff --git a/docs/content/en/commands/hugo_check.md b/docs/content/en/commands/hugo_check.md
index 7318cb4b5..4e649fb56 100644
--- a/docs/content/en/commands/hugo_check.md
+++ b/docs/content/en/commands/hugo_check.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo check"
slug: hugo_check
url: /commands/hugo_check/
@@ -36,4 +36,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_check_ulimit.md b/docs/content/en/commands/hugo_check_ulimit.md
index 7e0373206..185ef310f 100644
--- a/docs/content/en/commands/hugo_check_ulimit.md
+++ b/docs/content/en/commands/hugo_check_ulimit.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo check ulimit"
slug: hugo_check_ulimit
url: /commands/hugo_check_ulimit/
@@ -40,4 +40,4 @@ hugo check ulimit [flags]
* [hugo check](/commands/hugo_check/) - Contains some verification checks
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_config.md b/docs/content/en/commands/hugo_config.md
index b0970ecd9..c488cc7e0 100644
--- a/docs/content/en/commands/hugo_config.md
+++ b/docs/content/en/commands/hugo_config.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo config"
slug: hugo_config
url: /commands/hugo_config/
@@ -40,4 +40,4 @@ hugo config [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_convert.md b/docs/content/en/commands/hugo_convert.md
index eb826be45..7f95c3675 100644
--- a/docs/content/en/commands/hugo_convert.md
+++ b/docs/content/en/commands/hugo_convert.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo convert"
slug: hugo_convert
url: /commands/hugo_convert/
@@ -43,4 +43,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_convert_toJSON.md b/docs/content/en/commands/hugo_convert_toJSON.md
index fa079c047..a663177d7 100644
--- a/docs/content/en/commands/hugo_convert_toJSON.md
+++ b/docs/content/en/commands/hugo_convert_toJSON.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo convert toJSON"
slug: hugo_convert_toJSON
url: /commands/hugo_convert_tojson/
@@ -43,4 +43,4 @@ hugo convert toJSON [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_convert_toTOML.md b/docs/content/en/commands/hugo_convert_toTOML.md
index a0ad847fb..357376fcb 100644
--- a/docs/content/en/commands/hugo_convert_toTOML.md
+++ b/docs/content/en/commands/hugo_convert_toTOML.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo convert toTOML"
slug: hugo_convert_toTOML
url: /commands/hugo_convert_totoml/
@@ -43,4 +43,4 @@ hugo convert toTOML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_convert_toYAML.md b/docs/content/en/commands/hugo_convert_toYAML.md
index 98372cf3d..c5352a719 100644
--- a/docs/content/en/commands/hugo_convert_toYAML.md
+++ b/docs/content/en/commands/hugo_convert_toYAML.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo convert toYAML"
slug: hugo_convert_toYAML
url: /commands/hugo_convert_toyaml/
@@ -43,4 +43,4 @@ hugo convert toYAML [flags]
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_env.md b/docs/content/en/commands/hugo_env.md
index 0aed2f670..c801f1ae3 100644
--- a/docs/content/en/commands/hugo_env.md
+++ b/docs/content/en/commands/hugo_env.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo env"
slug: hugo_env
url: /commands/hugo_env/
@@ -39,4 +39,4 @@ hugo env [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_gen.md b/docs/content/en/commands/hugo_gen.md
index 930d33e74..364187d47 100644
--- a/docs/content/en/commands/hugo_gen.md
+++ b/docs/content/en/commands/hugo_gen.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo gen"
slug: hugo_gen
url: /commands/hugo_gen/
@@ -39,4 +39,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_gen_autocomplete.md b/docs/content/en/commands/hugo_gen_autocomplete.md
index 9d4a78545..385b027c5 100644
--- a/docs/content/en/commands/hugo_gen_autocomplete.md
+++ b/docs/content/en/commands/hugo_gen_autocomplete.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo gen autocomplete"
slug: hugo_gen_autocomplete
url: /commands/hugo_gen_autocomplete/
@@ -57,4 +57,4 @@ hugo gen autocomplete [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_gen_chromastyles.md b/docs/content/en/commands/hugo_gen_chromastyles.md
index 3faca28fa..b939b30f7 100644
--- a/docs/content/en/commands/hugo_gen_chromastyles.md
+++ b/docs/content/en/commands/hugo_gen_chromastyles.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo gen chromastyles"
slug: hugo_gen_chromastyles
url: /commands/hugo_gen_chromastyles/
@@ -44,4 +44,4 @@ hugo gen chromastyles [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_gen_doc.md b/docs/content/en/commands/hugo_gen_doc.md
index 1308b9502..8c8516850 100644
--- a/docs/content/en/commands/hugo_gen_doc.md
+++ b/docs/content/en/commands/hugo_gen_doc.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo gen doc"
slug: hugo_gen_doc
url: /commands/hugo_gen_doc/
@@ -46,4 +46,4 @@ hugo gen doc [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_gen_man.md b/docs/content/en/commands/hugo_gen_man.md
index 205188699..bbe87178a 100644
--- a/docs/content/en/commands/hugo_gen_man.md
+++ b/docs/content/en/commands/hugo_gen_man.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo gen man"
slug: hugo_gen_man
url: /commands/hugo_gen_man/
@@ -42,4 +42,4 @@ hugo gen man [flags]
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_import.md b/docs/content/en/commands/hugo_import.md
index 8f84b7a23..473431836 100644
--- a/docs/content/en/commands/hugo_import.md
+++ b/docs/content/en/commands/hugo_import.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo import"
slug: hugo_import
url: /commands/hugo_import/
@@ -38,4 +38,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_import_jekyll.md b/docs/content/en/commands/hugo_import_jekyll.md
index ca30e1855..f78fcd135 100644
--- a/docs/content/en/commands/hugo_import_jekyll.md
+++ b/docs/content/en/commands/hugo_import_jekyll.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo import jekyll"
slug: hugo_import_jekyll
url: /commands/hugo_import_jekyll/
@@ -42,4 +42,4 @@ hugo import jekyll [flags]
* [hugo import](/commands/hugo_import/) - Import your site from others.
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_list.md b/docs/content/en/commands/hugo_list.md
index 0d18aa278..de3cb7839 100644
--- a/docs/content/en/commands/hugo_list.md
+++ b/docs/content/en/commands/hugo_list.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo list"
slug: hugo_list
url: /commands/hugo_list/
@@ -41,4 +41,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_list_drafts.md b/docs/content/en/commands/hugo_list_drafts.md
index 32f94bbd4..aa65e787d 100644
--- a/docs/content/en/commands/hugo_list_drafts.md
+++ b/docs/content/en/commands/hugo_list_drafts.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo list drafts"
slug: hugo_list_drafts
url: /commands/hugo_list_drafts/
@@ -40,4 +40,4 @@ hugo list drafts [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_list_expired.md b/docs/content/en/commands/hugo_list_expired.md
index 703711c3c..106e41df2 100644
--- a/docs/content/en/commands/hugo_list_expired.md
+++ b/docs/content/en/commands/hugo_list_expired.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo list expired"
slug: hugo_list_expired
url: /commands/hugo_list_expired/
@@ -41,4 +41,4 @@ hugo list expired [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_list_future.md b/docs/content/en/commands/hugo_list_future.md
index 6bfa3cf25..6e0c99857 100644
--- a/docs/content/en/commands/hugo_list_future.md
+++ b/docs/content/en/commands/hugo_list_future.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo list future"
slug: hugo_list_future
url: /commands/hugo_list_future/
@@ -41,4 +41,4 @@ hugo list future [flags]
* [hugo list](/commands/hugo_list/) - Listing out various types of content
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_new.md b/docs/content/en/commands/hugo_new.md
index 86adb91f4..cce7f4ecb 100644
--- a/docs/content/en/commands/hugo_new.md
+++ b/docs/content/en/commands/hugo_new.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo new"
slug: hugo_new
url: /commands/hugo_new/
@@ -52,7 +52,7 @@ hugo new [path] [flags]
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
- -t, --theme string theme to use (located in /themes/THEMENAME/)
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
```
@@ -75,4 +75,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 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_new_site.md b/docs/content/en/commands/hugo_new_site.md
index b3419e89d..4bb9cda50 100644
--- a/docs/content/en/commands/hugo_new_site.md
+++ b/docs/content/en/commands/hugo_new_site.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo new site"
slug: hugo_new_site
url: /commands/hugo_new_site/
@@ -44,4 +44,4 @@ hugo new site [path] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_new_theme.md b/docs/content/en/commands/hugo_new_theme.md
index b6c91a13a..a49301928 100644
--- a/docs/content/en/commands/hugo_new_theme.md
+++ b/docs/content/en/commands/hugo_new_theme.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo new theme"
slug: hugo_new_theme
url: /commands/hugo_new_theme/
@@ -43,4 +43,4 @@ hugo new theme [name] [flags]
* [hugo new](/commands/hugo_new/) - Create new content for your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_server.md b/docs/content/en/commands/hugo_server.md
index d4a42e160..501a5a99e 100644
--- a/docs/content/en/commands/hugo_server.md
+++ b/docs/content/en/commands/hugo_server.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo server"
slug: hugo_server
url: /commands/hugo_server/
@@ -66,7 +66,7 @@ hugo server [flags]
--stepAnalysis display memory and timing of different steps of the program
--templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
- -t, --theme string theme to use (located in /themes/THEMENAME/)
+ -t, --theme strings themes to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
-w, --watch watch filesystem for changes and recreate as needed (default true)
```
@@ -88,4 +88,4 @@ hugo server [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/commands/hugo_version.md b/docs/content/en/commands/hugo_version.md
index 4cc05e4e2..1b3d9080b 100644
--- a/docs/content/en/commands/hugo_version.md
+++ b/docs/content/en/commands/hugo_version.md
@@ -1,5 +1,5 @@
---
-date: 2018-12-23
+date: 2019-01-30
title: "hugo version"
slug: hugo_version
url: /commands/hugo_version/
@@ -39,4 +39,4 @@ hugo version [flags]
* [hugo](/commands/hugo/) - hugo builds your site
-###### Auto generated by spf13/cobra on 23-Dec-2018
+###### Auto generated by spf13/cobra on 30-Jan-2019
diff --git a/docs/content/en/content-management/archetypes.md b/docs/content/en/content-management/archetypes.md
index 3fc8a9f3f..354ef0fef 100644
--- a/docs/content/en/content-management/archetypes.md
+++ b/docs/content/en/content-management/archetypes.md
@@ -85,10 +85,10 @@ archetypes
```
```bash
-hugo new --kind post-bundle post/my-post
+hugo new --kind post-bundle posts/my-post
```
-Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
+Will create a new folder in `/content/posts/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
diff --git a/docs/content/en/content-management/cross-references.md b/docs/content/en/content-management/cross-references.md
index 59733555b..145c2d338 100644
--- a/docs/content/en/content-management/cross-references.md
+++ b/docs/content/en/content-management/cross-references.md
@@ -35,7 +35,7 @@ The single parameter to `ref` is a string with a content `documentname` (e.g., `
**Paths without a leading `/` will first be tried resolved relative to the current page.**
-You will get an error if you document could not be uniquely resolved. The error behaviour can be configured, see below.
+You will get an error if your document could not be uniquely resolved. The error behaviour can be configured, see below.
### Link to another language version
diff --git a/docs/content/en/content-management/menus.md b/docs/content/en/content-management/menus.md
index bc48c82e7..9ac6f8bff 100644
--- a/docs/content/en/content-management/menus.md
+++ b/docs/content/en/content-management/menus.md
@@ -111,7 +111,7 @@ The following order is used to determine an Identifier:
This means that `.Title` will be used unless `.LinkTitle` is present, etc. In practice, `.Name` and `.Identifier` are only used to structure relationships and therefore never displayed.
-In this example, the top level of the menu is defined in your [site `config` file][config]). All content entries are attached to one of these entries via the `.Parent` field.
+In this example, the top level of the menu is defined in your [site `config` file][config]. All content entries are attached to one of these entries via the `.Parent` field.
## Render Menus
diff --git a/docs/content/en/content-management/organization/index.md b/docs/content/en/content-management/organization/index.md
index b1bc8b368..e9ae91b57 100644
--- a/docs/content/en/content-management/organization/index.md
+++ b/docs/content/en/content-management/organization/index.md
@@ -19,7 +19,7 @@ toc: true
## Page Bundles
-Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`.
+Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`.
These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture.
@@ -38,7 +38,7 @@ The bundle documentation is **work in progress**. We will publish more comprehen
In Hugo, your content should be organized in a manner that reflects the rendered website.
-While Hugo supports content nested at any level, the top levels (i.e. `content/<DIRECTORIES>`) are special in Hugo and are considered the content type used to determine layouts etc. To read more about sections, including how to nest them, see [sections][].
+While Hugo supports content nested at any level, the top levels (i.e. `content/<DIRECTORIES>`) are special in Hugo and are considered the content type used to determine layouts etc. To read more about sections, including how to nest them, see [sections][].
Without any additional configuration, the following will just work:
@@ -47,11 +47,11 @@ Without any additional configuration, the following will just work:
└── content
└── about
| └── _index.md // <- https://example.com/about/
- ├── post
- | ├── firstpost.md // <- https://example.com/post/firstpost/
+ ├── posts
+ | ├── firstpost.md // <- https://example.com/posts/firstpost/
| ├── happy
- | | └── ness.md // <- https://example.com/post/happy/ness/
- | └── secondpost.md // <- https://example.com/post/secondpost/
+ | | └── ness.md // <- https://example.com/posts/happy/ness/
+ | └── secondpost.md // <- https://example.com/posts/secondpost/
└── quote
├── first.md // <- https://example.com/quote/first/
└── second.md // <- https://example.com/quote/second/
@@ -64,7 +64,7 @@ The following demonstrates the relationships between your content organization a
### Index Pages: `_index.md`
-`_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists]. These templates include those for [section templates][], [taxonomy templates][], [taxonomy terms templates][], and your [homepage template][].
+`_index.md` has a special role in Hugo. It allows you to add front matter and content to your [list templates][lists]. These templates include those for [section templates][], [taxonomy templates][], [taxonomy terms templates][], and your [homepage template][].
{{% note %}}
**Tip:** You can get a reference to the content and metadata in `_index.md` using the [`.Site.GetPage` function](/functions/getpage/).
diff --git a/docs/content/en/content-management/page-resources.md b/docs/content/en/content-management/page-resources.md
index c3c29e452..dcd19e42f 100644
--- a/docs/content/en/content-management/page-resources.md
+++ b/docs/content/en/content-management/page-resources.md
@@ -23,7 +23,7 @@ Name
: Default value is the filename (relative to the owning page). Can be set in front matter.
Title
-: Default blank. Can be set in front matter.
+: Default value is the same as `.Name`. Can be set in front matter.
Permalink
: The absolute URL to the resource. Resources of type `page` will have no value.
diff --git a/docs/content/en/content-management/static-files.md b/docs/content/en/content-management/static-files.md
index 8967f5983..e42ee9088 100644
--- a/docs/content/en/content-management/static-files.md
+++ b/docs/content/en/content-management/static-files.md
@@ -14,7 +14,7 @@ toc: true
---
By default, the `static/` directory in the site project is used for
-all **static files** (e.g. stylesheets, JavaScript, images).
+all **static files** (e.g. stylesheets, JavaScript, images). The static files are served on the site root path (eg. if you have the file `static/image.png` you can access it using `http://{server-url}/image.png`, to include it in a document you can use `![Example image](/image.png) )`.
Hugo can be configured to look into a different directory, or even
**multiple directories** for such static files by configuring the
diff --git a/docs/content/en/content-management/taxonomies.md b/docs/content/en/content-management/taxonomies.md
index c06b2385b..7957bf29d 100644
--- a/docs/content/en/content-management/taxonomies.md
+++ b/docs/content/en/content-management/taxonomies.md
@@ -86,7 +86,7 @@ Moonrise Kingdom <- Value
Hugo natively supports taxonomies.
-Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be same as manually [configuring your taxonomies](#configuring-taxonomies) as below:
+Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configuring-taxonomies) as below:
{{< code-toggle copy="false" >}}
[taxonomies]
diff --git a/docs/content/en/content-management/toc.md b/docs/content/en/content-management/toc.md
index a500bcf66..56f51049d 100644
--- a/docs/content/en/content-management/toc.md
+++ b/docs/content/en/content-management/toc.md
@@ -74,7 +74,7 @@ The following is an example of a very basic [single page template][]:
The following is a [partial template][partials] that adds slightly more logic for page-level control over your table of contents. It assumes you are using a `toc` field in your content's [front matter][] that, unless specifically set to `false`, will add a TOC to any page with a `.WordCount` (see [Page Variables][pagevars]) greater than 400. This example also demonstrates how to use [conditionals][] in your templating:
{{< code file="layouts/partials/toc.html" download="toc.html" >}}
-{{ if and (gt .WordCount 400 ) (ne .Params.toc "false") }}
+{{ if and (gt .WordCount 400 ) (.Params.toc) }}
<aside>
<header>
<h2>{{.Title}}</h2>
@@ -92,4 +92,4 @@ With the preceding example, even pages with > 400 words *and* `toc` not set to `
[front matter]: /content-management/table-of-contents/
[pagevars]: /variables/page/
[partials]: /templates/partials/
-[single page template]: /templates/single-page-templates/ \ No newline at end of file
+[single page template]: /templates/single-page-templates/
diff --git a/docs/content/en/content-management/urls.md b/docs/content/en/content-management/urls.md
index ae58a6277..25bd09165 100644
--- a/docs/content/en/content-management/urls.md
+++ b/docs/content/en/content-management/urls.md
@@ -27,16 +27,16 @@ The `permalinks` option in your [site configuration][config] allows you to adjus
These examples use the default values for `publishDir` and `contentDir`; i.e., `public` and `content`, respectively. You can override the default values in your [site's `config` file](/getting-started/configuration/).
{{% /note %}}
-For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
+For example, if one of your [sections][] is called `posts` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively.
### Permalinks Configuration Example
{{< code-toggle file="config" copy="false" >}}
permalinks:
- post: /:year/:month/:title/
+ posts: /:year/:month/:title/
{{< /code-toggle >}}
-Only the content under `post/` will have the new URL structure. For example, the file `content/post/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.
+Only the content under `posts/` will have the new URL structure. For example, the file `content/posts/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`.
You can also configure permalinks of taxonomies with the same syntax, by using the plural form of the taxonomy instead of the section. You will probably only want to use the configuration values `:slug` or `:title`.
@@ -156,7 +156,7 @@ Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias
The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `<meta name="robots" content="noindex">` lets search engine bots know that they should not crawl and index your new alias page.
-### Customize
+### Customize
You may customize this alias page by creating an `alias.html` template in the
layouts folder of your site (i.e., `layouts/alias.html`). In this case, the data passed to the template is
@@ -199,11 +199,11 @@ See [Content Organization][contentorg] for more details on paths.
└── content
└── about
| └── _index.md // <- https://example.com/about/
- ├── post
- | ├── firstpost.md // <- https://example.com/post/firstpost/
+ ├── posts
+ | ├── firstpost.md // <- https://example.com/posts/firstpost/
| ├── happy
- | | └── ness.md // <- https://example.com/post/happy/ness/
- | └── secondpost.md // <- https://example.com/post/secondpost/
+ | | └── ness.md // <- https://example.com/posts/happy/ness/
+ | └── secondpost.md // <- https://example.com/posts/secondpost/
└── quote
├── first.md // <- https://example.com/quote/first/
└── second.md // <- https://example.com/quote/second/
@@ -216,11 +216,11 @@ Here's the same organization run with `hugo --uglyURLs`:
└── content
└── about
| └── _index.md // <- https://example.com/about.html
- ├── post
- | ├── firstpost.md // <- https://example.com/post/firstpost.html
+ ├── posts
+ | ├── firstpost.md // <- https://example.com/posts/firstpost.html
| ├── happy
- | | └── ness.md // <- https://example.com/post/happy/ness.html
- | └── secondpost.md // <- https://example.com/post/secondpost.html
+ | | └── ness.md // <- https://example.com/posts/happy/ness.html
+ | └── secondpost.md // <- https://example.com/posts/secondpost.html
└── quote
├── first.md // <- https://example.com/quote/first.html
└── second.md // <- https://example.com/quote/second.html
@@ -265,7 +265,7 @@ By default, all relative URLs are left unchanged by Hugo, which can be problemat
Setting `relativeURLs` to `true` in your [site configuration][config] will cause Hugo to rewrite all relative URLs to be relative to the current content.
-For example, if your `/post/first/` page contains a link to `/about/`, Hugo will rewrite the URL to `../../about/`.
+For example, if your `/posts/first/` page contains a link to `/about/`, Hugo will rewrite the URL to `../../about/`.
[config]: /getting-started/configuration/
[contentorg]: /content-management/organization/
diff --git a/docs/content/en/contribute/documentation.md b/docs/content/en/contribute/documentation.md
index 7b198a4ca..0e97aba1a 100644
--- a/docs/content/en/contribute/documentation.md
+++ b/docs/content/en/contribute/documentation.md
@@ -192,7 +192,7 @@ The output of this example will render to the Hugo docs as follows:
The `output` shortcode is almost identical to the `code` shortcode but only takes and requires `file`. The purpose of `output` is to show *rendered* HTML and therefore almost always follows another basic code block *or* and instance of the `code` shortcode:
```
-{{%/* output file="post/my-first-post/index.html" */%}}
+{{%/* output file="posts/my-first-post/index.html" */%}}
<h1>This is my First Hugo Blog Post</h1>
<p>I am excited to be using Hugo.</p>
{{%/* /output */%}}
@@ -200,7 +200,7 @@ The `output` shortcode is almost identical to the `code` shortcode but only take
The preceding `output` example will render as follows to the Hugo docs:
-{{< output file="post/my-first-post/index.html" >}}
+{{< output file="posts/my-first-post/index.html" >}}
<h1>This is my First Hugo Blog Post</h1>
<p>I am excited to be using Hugo.</p>
{{< /output >}} -->
diff --git a/docs/content/en/functions/apply.md b/docs/content/en/functions/apply.md
index 9690837d6..df22732a0 100644
--- a/docs/content/en/functions/apply.md
+++ b/docs/content/en/functions/apply.md
@@ -59,25 +59,25 @@ However, it is not possible to provide the output of a range to the [`delimit` f
If you have `post-tag-list.html` and `post-tag-link.html` as [partials][], you *could* use the following snippets, respectively:
-{{< code file="layouts/partial/post-tag-list.html" copy="false" >}}
+{{< code file="layouts/partials/post-tag-list.html" copy="false" >}}
{{ with .Params.tags }}
<div class="tags-list">
Tags:
{{ $len := len . }}
{{ if eq $len 1 }}
- {{ partial "post/tag/link" (index . 0) }}
+ {{ partial "post-tag-link" (index . 0) }}
{{ else }}
{{ $last := sub $len 1 }}
{{ range first $last . }}
- {{ partial "post/tag/link" . }},
+ {{ partial "post-tag-link" . }},
{{ end }}
- {{ partial "post/tag/link" (index . $last) }}
+ {{ partial "post-tag-link" (index . $last) }}
{{ end }}
</div>
{{ end }}
{{< /code >}}
-{{< code file="layouts/partial/post-tag-link.html" copy="false" >}}
+{{< code file="layouts/partials/post-tag-link.html" copy="false" >}}
<a class="post-tag post-tag-{{ . | urlize }}" href="/tags/{{ . | urlize }}">{{ . }}</a>
{{< /code >}}
diff --git a/docs/content/en/functions/first.md b/docs/content/en/functions/first.md
index e4c0a848d..a0c7ca146 100644
--- a/docs/content/en/functions/first.md
+++ b/docs/content/en/functions/first.md
@@ -19,11 +19,36 @@ deprecated: false
aliases: []
---
+`first` works in a similar manner to the [`limit` keyword in
+SQL][limitkeyword]. It reduces the array to only the `first N`
+elements. It takes the array and number of elements as input.
-```
+`first` takes two arguments:
+1. `number of elements`
+2. `array` *or* `slice of maps or structs`
+
+{{< code file="layout/_default/section.html" >}}
{{ range first 10 .Pages }}
{{ .Render "summary" }}
{{ end }}
-```
+{{< /code >}}
*Note: Exclusive to `first`, LIMIT can be '0' to return an empty array.*
+
+## `first` and `where` Together
+
+Using `first` and [`where`][wherefunction] together can be very
+powerful. Below snippet gets a list of posts only from [**main
+sections**][mainsections], sorts it by the `title` parameter, and then
+ranges through only the first 5 posts in that list:
+
+{{< code file="first-and-where-together.html" >}}
+{{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections).ByTitle }}
+ {{ .Content }}
+{{ end }}
+{{< /code >}}
+
+
+[limitkeyword]: https://www.techonthenet.com/sql/select_limit.php
+[wherefunction]: /functions/where/
+[mainsections]: /functions/where/#mainsections
diff --git a/docs/content/en/functions/len.md b/docs/content/en/functions/len.md
index e054ed5f8..e95d49c4a 100644
--- a/docs/content/en/functions/len.md
+++ b/docs/content/en/functions/len.md
@@ -43,10 +43,11 @@ You may want to append a class to a heading according to the length of the strin
## `len` Example 2: Counting Pages with `where`
-The following templating uses [`where`][] in conjunction with `len` to figure out the total number of content pages in a `posts` [section][]:
+The following templating uses [`where`][] in conjunction with `len` to
+figure out the total number of content pages in a `posts` [section][]:
{{< code file="how-many-posts.html" >}}
-{{ $posts := (where .Site.RegularPages "Section" "==" "post") }}
+{{ $posts := (where .Site.RegularPages "Section" "==" "posts") }}
{{ $postCount := len $posts }}
{{< /code >}}
diff --git a/docs/content/en/functions/transform.Unmarshal.md b/docs/content/en/functions/transform.Unmarshal.md
index 7197a6eb1..571117090 100644
--- a/docs/content/en/functions/transform.Unmarshal.md
+++ b/docs/content/en/functions/transform.Unmarshal.md
@@ -7,13 +7,12 @@ menu:
docs:
parent: "functions"
keywords: []
-signature: ["RESOURCE or STRING | transform.Unmarshal [OPTIONS]" ]
+signature: ["RESOURCE or STRING | transform.Unmarshal [OPTIONS]"]
hugoversion: "0.53"
aliases: []
---
-
-The function accept either a `Resource` created in [Hugo Pipes](/hugo-pipes/) or via [Page Bundles](content-management/page-bundles/), or simply a string. The two examples below will produce the same map:
+The function accept either a `Resource` created in [Hugo Pipes](/hugo-pipes/) or via [Page Bundles](/content-management/page-bundles/), or simply a string. The two examples below will produce the same map:
```go-html-template
{{ $greetings := "hello = \"Hello Hugo\"" | transform.Unmarshal }}`
@@ -36,15 +35,13 @@ The above prints `Hello Hugo`.
Unmarshal with CSV as input has some options you can set:
delimiter
-: The delimiter used, default is `,`
+: The delimiter used, default is `,`.
comment
-: The comment character ued in the CSV. If set, lines beginning with the comment character without preceding whitespace are ignored.:
-
+: The comment character used in the CSV. If set, lines beginning with the comment character without preceding whitespace are ignored.:
Example:
```go-html-template
{{ $csv := "a;b;c" | transform.Unmarshal (dict "delimiter" ";") }}
```
-
diff --git a/docs/content/en/functions/where.md b/docs/content/en/functions/where.md
index 9ad8daf2a..29623c908 100644
--- a/docs/content/en/functions/where.md
+++ b/docs/content/en/functions/where.md
@@ -20,10 +20,14 @@ toc: true
needsexample: true
---
-`where` filters an array to only the elements containing a matching value for a given field.
+`where` filters an array to only the elements containing a matching
+value for a given field.
+
+It works in a similar manner to the [`where` keyword in
+SQL][wherekeyword].
```go-html-template
-{{ range where .Pages "Section" "post" }}
+{{ range where .Pages "Section" "foo" }}
{{ .Content }}
{{ end }}
```
@@ -45,7 +49,7 @@ series: golang
It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`.
```go-html-template
-{{ range where .Pages "Section" "!=" "post" }}
+{{ range where .Pages "Section" "!=" "foo" }}
{{ .Content }}
{{ end }}
```
@@ -101,10 +105,14 @@ You can also put the returned value of the `where` clauses into a variable:
## Use `where` with `first`
-The following grabs the first five content files in `post` using the [default ordering](/templates/lists/) for lists (i.e., `weight => date`):
+Using `first` and [`where`][wherefunction] together can be very
+powerful. Below snippet gets a list of posts only from [**main
+sections**](#mainsections), sorts it using the [default
+ordering](/templates/lists/) for lists (i.e., `weight => date`), and
+then ranges through only the first 5 posts in that list:
-{{< code file="where-with-first.html" >}}
-{{ range first 5 (where .Pages "Section" "post") }}
+{{< code file="first-and-where-together.html" >}}
+{{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ .Content }}
{{ end }}
{{< /code >}}
@@ -134,21 +142,27 @@ Only the following operators are available for `nil`
{{ end }}
```
-## Portable `where` filters
+## Portable `where` filters -- `site.Params.mainSections` {#mainsections}
-This is especially important for themes, but to list the most relevant pages on the front page or similar, you can use `.Site.Params.mainSections` list.
+**This is especially important for themes.**
-This will, by default, list pages from the _section with the most pages_.
+To list the most relevant pages on the front page or similar, you
+should use the `site.Params.mainSections` list instead of comparing
+section names to hard-coded values like `"posts"` or `"post"`.
```go-html-template
-{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
+{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
```
+If the user has not set this config parameter in their site config, it
+will default to the _section with the most pages_.
+
The user can override the default in `config.toml`:
```toml
[params]
-mainSections = ["blog", "docs"]
+ mainSections = ["blog", "docs"]
```
[intersect]: /functions/intersect/
+[wherekeyword]: https://www.techonthenet.com/sql/where.php
diff --git a/docs/content/en/getting-started/code-toggle.md b/docs/content/en/getting-started/code-toggle.md
index 51c887a47..c15391b04 100644
--- a/docs/content/en/getting-started/code-toggle.md
+++ b/docs/content/en/getting-started/code-toggle.md
@@ -12,7 +12,7 @@ toc: true
## The Config Toggler!
-This is an example for the Config Toggle shortcode.
+This is an example for the Config Toggle shortcode.
Its purpose is to let users choose a Config language by clicking on its corresponding tab. Upon doing so, every Code toggler on the page will be switched to the target language. Also, target language will be saved in user's `localStorage` so when they go to a different pages, Code Toggler display their last "toggled" config language.
{{% note %}}
@@ -27,7 +27,7 @@ baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
footnoteReturnLinkContents: "↩"
permalinks:
- post: /:year/:month/:title/
+ posts: /:year/:month/:title/
params:
Subtitle: "Hugo is Absurdly Fast!"
AuthorName: "Jon Doe"
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md
index edd52f321..b37fa48e7 100644
--- a/docs/content/en/getting-started/configuration.md
+++ b/docs/content/en/getting-started/configuration.md
@@ -18,6 +18,9 @@ aliases: [/overview/source-directory/,/overview/configuration/]
toc: true
---
+
+## Configuration File
+
Hugo uses the `config.toml`, `config.yaml`, or `config.json` (if found in the
site root) as the default site config file.
@@ -35,6 +38,37 @@ hugo --config a.toml,b.toml,c.toml
Multiple site config files can be specified as a comma-separated string to the `--config` switch.
{{% /note %}}
+TODO: distinct config.toml and others (the root object files)
+
+## Configuration Directory
+
+In addition to using a single site config file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings.
+
+- Each file represents a configuration root object, such as `Params`, `Menus`, `Languages` etc...
+- Each directory holds a group of files containing settings unique to an environment.
+- Files can be localized to become language specific.
+
+
+```
+config
+├── _default
+│ ├── config.toml
+│ ├── languages.toml
+│ ├── menus.en.toml
+│ ├── menus.zh.toml
+│ └── params.toml
+├── staging
+│ ├── config.toml
+│ └── params.toml
+└── production
+ ├── config.toml
+ └── params.toml
+```
+
+Considering the structure above, when running `hugo --environment staging`, Hugo will use every settings from `config/_default` and merge `staging`'s on top of those.
+{{% note %}}
+Default environments are __development__ with `hugo serve` and __production__ with `hugo`.
+{{%/ note %}}
## All Configuration Settings
The following is the full list of Hugo-defined variables with their default
@@ -163,7 +197,7 @@ noTimes (false)
: Don't sync modification time of files.
paginate (10)
-: Default number of pages per page in [pagination](/templates/pagination/).
+: Default number of elements per page in [pagination](/templates/pagination/).
paginatePath ("page")
: The path element used during pagination (https://example.com/page/2).
@@ -195,7 +229,7 @@ related
relativeURLs (false)
: Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
-refLinksErrorLevel ("ERROR")
+refLinksErrorLevel ("ERROR")
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
refLinksNotFoundURL
@@ -280,7 +314,7 @@ baseURL: "https://yoursite.example.com/"
title: "My Hugo Site"
footnoteReturnLinkContents: "↩"
permalinks:
- post: /:year/:month/:title/
+ posts: /:year/:month/:title/
params:
Subtitle: "Hugo is Absurdly Fast!"
AuthorName: "Jon Doe"
@@ -430,23 +464,22 @@ maxAge = -1
```
-You can override any of these cache setting in your own `config.toml`.
+You can override any of these cache setting in your own `config.toml`.
### The keywords explained
-:cacheDir
+`:cacheDir`
: This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
`:project`
-
-The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
+: The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
`:resourceDir`
: This is the value of the `resourceDir` config option.
maxAge
: This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
-
+
dir
: The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
diff --git a/docs/content/en/getting-started/directory-structure.md b/docs/content/en/getting-started/directory-structure.md
index bf06dc538..4842409d2 100644
--- a/docs/content/en/getting-started/directory-structure.md
+++ b/docs/content/en/getting-started/directory-structure.md
@@ -28,7 +28,7 @@ Running the `hugo new site` generator from the command line will create a direct
.
├── archetypes
├── assets
-├── config.toml
+├── config
├── content
├── data
├── layouts
@@ -48,8 +48,12 @@ By default, Hugo will create new content files with at least `date`, `title` (in
[`assets`][]
: Stores all the files which need be processed by [Hugo Pipes]({{< ref "/hugo-pipes" >}}). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory.
-[`config.toml`](/getting-started/configuration/)
-: Every Hugo project should have a configuration file in TOML, YAML, or JSON format at the root. Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website.
+[`config`](/getting-started/configuration/)
+: Hugo ships with a large number of [configuration directives](https://gohugo.io/getting-started/configuration/#all-variables-yaml).
+The [config directory](/getting-started/configuration/#configuration-directory) is where those directives are stored as JSON, YAML, or TOML files. Every root setting object can stand as its own file and structured by environments.
+Projects with minimal settings and no need for environment awareness can use a single `config.toml` file at its root.
+
+Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website.
[`content`][]
: All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section][]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types][].
diff --git a/docs/content/en/getting-started/quick-start.md b/docs/content/en/getting-started/quick-start.md
index 16b69d7c1..59f9f96e1 100644
--- a/docs/content/en/getting-started/quick-start.md
+++ b/docs/content/en/getting-started/quick-start.md
@@ -21,7 +21,7 @@ toc: true
{{% note %}}
This quick start uses `macOS` in the examples. For instructions about how to install Hugo on other operating systems, see [install](/getting-started/installing).
-You also need [Git installed](https://git-scm.com/downloads) to run this tutorial.
+It is recommended to have [Git installed](https://git-scm.com/downloads) to run this tutorial.
{{% /note %}}
@@ -62,9 +62,18 @@ The above will create a new Hugo site in a folder named `quickstart`.
See [themes.gohugo.io](https://themes.gohugo.io/) for a list of themes to consider. This quickstart uses the beautiful [Ananke theme](https://themes.gohugo.io/gohugo-theme-ananke/).
```bash
-cd quickstart;\
-git init;\
-git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke;\
+cd quickstart
+
+# Download the theme
+git init
+git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
+# Note for non-git users:
+# - If you do not have git installed, you can download the archive of the latest
+# version of this theme from:
+# https://github.com/budparr/gohugo-theme-ananke/archive/master.zip
+# - Extract that .zip file to get a "gohugo-theme-ananke-master" directory.
+# - Rename that directory to "ananke", and move it into the "themes/" directory.
+# End of note for non-git users.
# Edit your config.toml configuration file
# and add the Ananke theme.
@@ -81,7 +90,12 @@ hugo new posts/my-first-post.md
```
-Edit the newly created content file if you want. Now, start the Hugo server with [drafts](/getting-started/usage/#draft-future-and-expired-content) enabled:
+Edit the newly created content file if you want.
+
+
+## Step 5: Start the Hugo server
+
+Now, start the Hugo server with [drafts](/getting-started/usage/#draft-future-and-expired-content) enabled:
```
▶ hugo server -D
@@ -108,8 +122,7 @@ Press Ctrl+C to stop
**Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).**
-
-## Step 5: Customize the Theme
+## Step 6: Customize the Theme
Your new site already looks great, but you will want to tweak it a little before you release it to the public.
@@ -124,7 +137,7 @@ title = "My New Hugo Site"
theme = "ananke"
```
-Replace the `title` above with something more personal. Also, if you already have a domain ready, set the `baseURL`. Note that this value is not needed when running the local development server.
+Replace the `title` above with something more personal. Also, if you already have a domain ready, set the `baseURL`. Note that this value is not needed when running the local development server.
{{% note %}}
**Tip:** Make the changes to the site configuration or any other file in your site while the Hugo server is running, and you will see the changes in the browser right away, though you may need to [clear your cache](https://kb.iu.edu/d/ahic).
diff --git a/docs/content/en/hosting-and-deployment/deployment-with-rsync.md b/docs/content/en/hosting-and-deployment/deployment-with-rsync.md
index e8222ad54..8d0137ad7 100644
--- a/docs/content/en/hosting-and-deployment/deployment-with-rsync.md
+++ b/docs/content/en/hosting-and-deployment/deployment-with-rsync.md
@@ -125,8 +125,8 @@ cours-versailles/index.html
exercices/index.html
exercices/index.xml
exercices/barycentre-et-carres-des-distances/index.html
-post/
-post/index.html
+posts/
+posts/index.html
sujets/index.html
sujets/index.xml
sujets/2016-09_supelec-jp/index.html
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md b/docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md
index f66abed5d..03710690e 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-bitbucket.md
@@ -120,7 +120,7 @@ aero apikey
### Step 3: Edit and Commit Code
```
-hugo new post/good-to-great.md
+hugo new posts/good-to-great.md
hugo server --buildDrafts -t liquorice #Check that all looks good
# commit and push code to master branch
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-gitlab.md b/docs/content/en/hosting-and-deployment/hosting-on-gitlab.md
index c38908cae..eda592d43 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-gitlab.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-gitlab.md
@@ -37,7 +37,7 @@ cd your-hugo-site
In the root directory of your Hugo site, create a `.gitlab-ci.yml` file. The `.gitlab-ci.yml` configures the GitLab CI on how to build your page. Simply add the content below.
-{{< code file="gitlab-ci.yml" >}}
+{{< code file=".gitlab-ci.yml" >}}
image: monachus/hugo
variables:
diff --git a/docs/content/en/hosting-and-deployment/hosting-on-netlify.md b/docs/content/en/hosting-and-deployment/hosting-on-netlify.md
index 3fb4ee6cd..a04333d89 100644
--- a/docs/content/en/hosting-and-deployment/hosting-on-netlify.md
+++ b/docs/content/en/hosting-and-deployment/hosting-on-netlify.md
@@ -67,14 +67,14 @@ For production:
```
[context.production.environment]
- HUGO_VERSION = "0.36"
+ HUGO_VERSION = "0.53"
```
For testing:
```
[context.deploy-preview.environment]
- HUGO_VERSION = "0.36"
+ HUGO_VERSION = "0.53"
```
The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:
diff --git a/docs/content/en/templates/base.md b/docs/content/en/templates/base.md
index 4948f6f35..5643f8d4b 100644
--- a/docs/content/en/templates/base.md
+++ b/docs/content/en/templates/base.md
@@ -42,18 +42,18 @@ Variables are denoted by capitalized text set within `<>`. Note that Hugo's defa
### Example Base Template Lookup Order
-As an example, let's assume your site is using a theme called "mytheme" when rendering the section list for a `post` section. Hugo picks `layout/section/post.html` as the template for [rendering the section][]. The `{{define}}` block in this template tells Hugo that the template is an extension of a base template.
+As an example, let's assume your site is using a theme called "mytheme" when rendering the section list for a `posts` section. Hugo picks `layout/section/posts.html` as the template for [rendering the section][]. The `{{define}}` block in this template tells Hugo that the template is an extension of a base template.
-Here is the lookup order for the `post` base template:
+Here is the lookup order for the `posts` base template:
-1. `/layouts/section/post-baseof.html`
-2. `/themes/mytheme/layouts/section/post-baseof.html`
-3. `/layouts/post/baseof.html`
-4. `/themes/mytheme/layouts/post/baseof.html`
+1. `/layouts/section/posts-baseof.html`
+2. `/themes/mytheme/layouts/section/posts-baseof.html`
+3. `/layouts/posts/baseof.html`
+4. `/themes/mytheme/layouts/posts/baseof.html`
5. `/layouts/section/baseof.html`
6. `/themes/mytheme/layouts/section/baseof.html`
-7. `/layouts/_default/post-baseof.html`
-8. `/themes/mytheme/layouts/_default/post-baseof.html`
+7. `/layouts/_default/posts-baseof.html`
+8. `/themes/mytheme/layouts/_default/posts-baseof.html`
9. `/layouts/_default/baseof.html`
10. `/themes/mytheme/layouts/_default/baseof.html`
diff --git a/docs/content/en/templates/data-templates.md b/docs/content/en/templates/data-templates.md
index 460a657ef..e70840b7d 100644
--- a/docs/content/en/templates/data-templates.md
+++ b/docs/content/en/templates/data-templates.md
@@ -184,7 +184,7 @@ For `getCSV`, the one-character-long separator must be placed in the first posit
</tr>
</thead>
<tbody>
- {{ $url := "http://a-big-corp.com/finance/employee-salaries.csv" }}
+ {{ $url := "https://example.com/finance/employee-salaries.csv" }}
{{ $sep := "," }}
{{ range $i, $r := getCSV $sep $url }}
<tr>
diff --git a/docs/content/en/templates/lists.md b/docs/content/en/templates/lists.md
index 2871b181e..91df60704 100644
--- a/docs/content/en/templates/lists.md
+++ b/docs/content/en/templates/lists.md
@@ -63,7 +63,7 @@ The following is an example of a typical Hugo project directory's content:
.
...
├── content
-| ├── post
+| ├── posts
| | ├── _index.md
| | ├── post-01.md
| | └── post-02.md
@@ -73,9 +73,9 @@ The following is an example of a typical Hugo project directory's content:
...
```
-Using the above example, let's assume you have the following in `content/post/_index.md`:
+Using the above example, let's assume you have the following in `content/posts/_index.md`:
-{{< code file="content/post/_index.md" >}}
+{{< code file="content/posts/_index.md" >}}
---
title: My Go Journey
date: 2017-03-23
@@ -100,7 +100,7 @@ You can now access this `_index.md`'s' content in your list template:
{{.Content}}
</article>
<ul>
- <!-- Ranges through content/post/*.md -->
+ <!-- Ranges through content/posts/*.md -->
{{ range .Pages }}
<li>
<a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a>
@@ -113,7 +113,7 @@ You can now access this `_index.md`'s' content in your list template:
This above will output the following HTML:
-{{< code file="example.com/post/index.html" copy="false" >}}
+{{< code file="example.com/posts/index.html" copy="false" >}}
<!--top of your baseof code-->
<main>
<article>
@@ -124,8 +124,8 @@ This above will output the following HTML:
<p>Follow my journey through this new blog.</p>
</article>
<ul>
- <li><a href="/post/post-01/">Post 1</a></li>
- <li><a href="/post/post-02/">Post 2</a></li>
+ <li><a href="/posts/post-01/">Post 1</a></li>
+ <li><a href="/posts/post-02/">Post 2</a></li>
</ul>
</main>
<!--bottom of your baseof-->
@@ -164,14 +164,14 @@ The default behavior of Hugo is to pluralize list titles; hence the inflection o
This list template has been modified slightly from a template originally used in [spf13.com](http://spf13.com/). It makes use of [partial templates][partials] for the chrome of the rendered page rather than using a [base template][base] The examples that follow also use the [content view templates][views] `li.html` or `summary.html`.
-{{< code file="layouts/section/post.html" >}}
+{{< code file="layouts/section/posts.html" >}}
{{ partial "header.html" . }}
{{ partial "subheader.html" . }}
<main>
<div>
<h1>{{ .Title }}</h1>
<ul>
- <!-- Renders the li.html content view for each content/post/*.md -->
+ <!-- Renders the li.html content view for each content/posts/*.md -->
{{ range .Pages }}
{{ .Render "li"}}
{{ end }}
@@ -524,49 +524,14 @@ Here is the ordering for the example that follows:
{{ end }}
{{< /code >}}
-## Filter and Limiting Lists
+## Filtering and Limiting Lists {#filtering-and-limiting-lists}
-Sometimes you only want to list a subset of the available content. A common is to only display “Posts” on blog's homepage. You can accomplish this with the `where` function.
+Sometimes you only want to list a subset of the available content. A
+common is to only display posts from [**main sections**][mainsections]
+on the blog's homepage.
-### `where`
-
-`where` works in a similar manner to the [`where` keyword in SQL][wherekeyword]. It selects all elements of the array or slice that match the provided field and value. `where` takes three arguments:
-
-1. `array` *or* `slice of maps or structs`
-2. `key` *or* `field name`
-3. `match value`
-
-{{< code file="layouts/_default/index.html" >}}
-{{ range where .Pages "Section" "post" }}
- {{ .Content }}
-{{ end }}
-{{< /code >}}
-
-You can see more examples in the [functions documentation for `where`][wherefunction].
-
-### `first`
-
-`first` works in a similar manner to the [`limit` keyword in SQL][limitkeyword]. It reduces the array to only the `first N` elements. It takes the array and number of elements as input. `first` takes two arguments:
-
-1. `array` *or* `slice of maps or structs`
-2. `number of elements`
-
-{{< code file="layout/_default/section.html" >}}
-{{ range first 10 .Pages }}
- {{ .Render "summary" }}
-{{ end }}
-{{< /code >}}
-
-### `first` and `where` Together
-
-Using `first` and `where` together can be very powerful:
-
-{{< code file="first-and-where-together.html" >}}
-<!-- Orders the content inside the "posts" section by the "title" field and then ranges through only the first 5 posts -->
-{{ range first 5 (where .Pages "Section" "post").ByTitle }}
- {{ .Content }}
-{{ end }}
-{{< /code >}}
+See the documentation on [`where` function][wherefunction] and
+[`first` function][firstfunction] for further details.
[base]: /templates/base/
[bepsays]: http://bepsays.com/en/2016/12/19/hugo-018/
@@ -576,7 +541,6 @@ Using `first` and `where` together can be very powerful:
[getpage]: /functions/getpage/
[homepage]: /templates/homepage/
[homepage]: /templates/homepage/
-[limitkeyword]: https://www.techonthenet.com/sql/select_limit.php
[mentalmodel]: http://webstyleguide.com/wsg3/3-information-architecture/3-site-structure.html
[pagevars]: /variables/page/
[partials]: /templates/partials/
@@ -590,4 +554,5 @@ Using `first` and `where` together can be very powerful:
[taxvars]: /variables/taxonomy/
[views]: /templates/views/
[wherefunction]: /functions/where/
-[wherekeyword]: https://www.techonthenet.com/sql/where.php
+[firstfunction]: /functions/first/
+[mainsections]: /functions/where/#mainsections
diff --git a/docs/content/en/templates/ordering-and-grouping.md b/docs/content/en/templates/ordering-and-grouping.md
index 2125ee6a4..078adab2c 100644
--- a/docs/content/en/templates/ordering-and-grouping.md
+++ b/docs/content/en/templates/ordering-and-grouping.md
@@ -336,44 +336,9 @@ within each group is ordered alphabetically by title.
## Filter and Limiting Lists
-Sometimes you only want to list a subset of the available content. A common request is to only display “Posts” on the homepage. You can accomplish this with the `where` function.
-
-### `where`
-
-`where` works in a similar manner to the `where` keyword in SQL. It selects all elements of the array or slice that match the provided field and value. `where` takes three arguments:
-
-1. `array` or a `slice of maps or structs`
-2. `key` or `field name`
-3. `match value`
-
-{{< code file="layouts/_default/index.html" >}}
-{{ range where .Pages "Section" "post" }}
- {{ .Content }}
-{{ end }}
-{{< /code >}}
-
-### `first`
-
-`first` works in a similar manner to the [`limit` keyword in SQL][limitkeyword]. It reduces the array to only the `first N` elements. It takes the array and number of elements as input. `first` takes two arguments:
-
-1. `array` or `slice of maps or structs`
-2. `number of elements`
-
-{{< code file="layout/_default/section.html" >}}
-{{ range first 10 .Pages }}
- {{ .Render "summary" }}
-{{ end }}
-{{< /code >}}
-
-### `first` and `where` Together
-
-Using `first` and `where` together can be very powerful:
-
-{{< code file="first-and-where-together.html" >}}
-{{ range first 5 (where .Pages "Section" "post") }}
- {{ .Content }}
-{{ end }}
-{{< /code >}}
+See the [_Lists/Filtering and Limiting Lists_
+section][filteringandlimitinglists] for details.
[views]: /templates/views/
+[filteringandlimitinglists]: /templates/lists/#filtering-and-limiting-lists
diff --git a/docs/content/en/templates/pagination.md b/docs/content/en/templates/pagination.md
index 2ea1daae9..bd4176761 100644
--- a/docs/content/en/templates/pagination.md
+++ b/docs/content/en/templates/pagination.md
@@ -50,7 +50,7 @@ For a given **Page**, it's one of the options above. The `.Paginator` is static
The global page size setting (`Paginate`) can be overridden by providing a positive integer as the last argument. The examples below will give five items per page:
* `{{ range (.Paginator 5).Pages }}`
-* `{{ $paginator := .Paginate (where .Pages "Type" "post") 5 }}`
+* `{{ $paginator := .Paginate (where .Pages "Type" "posts") 5 }}`
It is also possible to use the `GroupBy` functions in combination with pagination:
@@ -75,7 +75,7 @@ If you use any filters or ordering functions to create your `.Paginator` *and* y
The following example shows how to create `.Paginator` before its used:
```
-{{ $paginator := .Paginate (where .Pages "Type" "post") }}
+{{ $paginator := .Paginate (where .Pages "Type" "posts") }}
{{ template "_internal/pagination.html" . }}
{{ range $paginator.Pages }}
{{ .Title }}
diff --git a/docs/content/en/templates/single-page-templates.md b/docs/content/en/templates/single-page-templates.md
index 79e1312b2..e8b72e598 100644
--- a/docs/content/en/templates/single-page-templates.md
+++ b/docs/content/en/templates/single-page-templates.md
@@ -26,11 +26,11 @@ See [Template Lookup](/templates/lookup-order/).
Content pages are of the type `page` and will therefore have all the [page variables][pagevars] and [site variables][] available to use in their templates.
-### `post/single.html`
+### `posts/single.html`
This single page template makes use of Hugo [base templates][], the [`.Format` function][] for dates, the [`.WordCount` page variable][pagevars], and ranges through the single content's specific [taxonomies][pagetaxonomy]. [`with`][] is also used to check whether the taxonomies are set in the front matter.
-{{< code file="layouts/post/single.html" download="single.html" >}}
+{{< code file="layouts/posts/single.html" download="single.html" >}}
{{ define "main" }}
<section id="main">
<h1 id="title">{{ .Title }}</h1>
diff --git a/docs/content/en/templates/taxonomy-templates.md b/docs/content/en/templates/taxonomy-templates.md
index d1f9e380f..c827376c2 100644
--- a/docs/content/en/templates/taxonomy-templates.md
+++ b/docs/content/en/templates/taxonomy-templates.md
@@ -238,7 +238,7 @@ Because we are leveraging the front matter system to define taxonomies for conte
<ul id="{{ $taxo }}">
{{ range .Param $taxo }}
{{ $name := . }}
- {{ with $.Site.GetPage (printf "/%s/%s" $taxo $name) }}
+ {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
<li><a href="{{ .Permalink }}">{{ $name }}</a></li>
{{ end }}
{{ end }}
diff --git a/docs/content/en/templates/views.md b/docs/content/en/templates/views.md
index b1a6451b2..eb158eed0 100644
--- a/docs/content/en/templates/views.md
+++ b/docs/content/en/templates/views.md
@@ -27,11 +27,11 @@ The following are common use cases for content views:
## Create a Content View
-To create a new view, create a template in each of your different content type directories with the view name. The following example contains an "li" view and a "summary" view for the `post` and `project` content types. As you can see, these sit next to the [single content view][single] template, `single.html`. You can even provide a specific view for a given type and continue to use the `_default/single.html` for the primary view.
+To create a new view, create a template in each of your different content type directories with the view name. The following example contains an "li" view and a "summary" view for the `posts` and `project` content types. As you can see, these sit next to the [single content view][single] template, `single.html`. You can even provide a specific view for a given type and continue to use the `_default/single.html` for the primary view.
```
▾ layouts/
- ▾ post/
+ ▾ posts/
li.html
single.html
summary.html
diff --git a/docs/content/en/themes/creating.md b/docs/content/en/themes/creating.md
index 3950472a5..d96942a58 100644
--- a/docs/content/en/themes/creating.md
+++ b/docs/content/en/themes/creating.md
@@ -20,7 +20,10 @@ wip: true
---
{{% warning "Use Absolute Links" %}}
-If you're creating a theme with plans to share it on the [Hugo Themes website](https://themes.gohugo.io/) please note that your theme's demo will be available in a sub-directory of website and for the theme's assets to load properly you will need to create absolute paths in the templates by using either the [absURL](/functions/absurl) function or `.Permalink`. Also make sure not to use a forward slash `/` in the beginning of a `PATH`, because Hugo will turn it into a relative URL and the `absURL` function will have no effect.
+If you're creating a theme with plans to share it on the [Hugo Themes website](https://themes.gohugo.io/) please note the following:
+- If using inline styles you will need to use absolute URLs, for the linked assets to be served properly, e.g. `<div style="background: url('{{ "images/background.jpg" | absURL }}')">`
+- Make sure not to use a forward slash `/` in the beginning of a `URL`, because it will point to the host root. Your theme's demo will be available in a subdirectory of the Hugo website and in this scenario Hugo will not generate the correct `URL` for theme assets.
+- If using external CSS and JS from a CDN, make sure to load these assets over `https`. Please do not use relative protocol URLs in your theme's templates.
{{% /warning %}}
Hugo can initialize a new blank theme directory within your existing `themes` using the `hugo new` command:
diff --git a/docs/content/en/tools/editors.md b/docs/content/en/tools/editors.md
index 419a2a04c..f0d82d65d 100644
--- a/docs/content/en/tools/editors.md
+++ b/docs/content/en/tools/editors.md
@@ -27,6 +27,8 @@ The Hugo community uses a wide range of preferred tools and has developed plug-i
## Visual Studio Code
* [Hugofy](https://marketplace.visualstudio.com/items?itemName=akmittal.hugofy). Hugofy is a plugin for Visual Studio Code to "make life easier" when developing with Hugo. The source code can be found [here](https://github.com/akmittal/hugofy-vscode).
+* [Hugo Helper](https://marketplace.visualstudio.com/items?itemName=rusnasonov.vscode-hugo). Hugo Helper is a plugin for Visual Studio Code that has some useful commands for Hugo. The source code can be found [here](https://github.com/rusnasonov/vscode-hugo).
+* [Hugo Language and Syntax Support](https://marketplace.visualstudio.com/items?itemName=budparr.language-hugo-vscode). Hugo Language and Syntax Support is a Visual Studio Code plugin for Hugo syntax highlighting and snippets. The source code can be found [here](https://github.com/budparr/language-hugo-vscode).
## Emacs
diff --git a/docs/content/en/troubleshooting/build-performance.md b/docs/content/en/troubleshooting/build-performance.md
index f2242ea2e..bc75ce262 100644
--- a/docs/content/en/troubleshooting/build-performance.md
+++ b/docs/content/en/troubleshooting/build-performance.md
@@ -58,17 +58,17 @@ Template Metrics:
---------- -------- -------- ----- --------
6.419663ms 583.605µs 994.374µs 11 _internal/_default/rss.xml
4.718511ms 1.572837ms 3.880742ms 3 indexes/category.html
- 4.642666ms 2.321333ms 3.282842ms 2 post/single.html
+ 4.642666ms 2.321333ms 3.282842ms 2 posts/single.html
4.364445ms 396.767µs 2.451372ms 11 partials/header.html
2.346069ms 586.517µs 903.343µs 4 indexes/tag.html
2.330919ms 211.901µs 2.281342ms 11 partials/header.includes.html
- 1.238976ms 103.248µs 446.084µs 12 post/li.html
+ 1.238976ms 103.248µs 446.084µs 12 posts/li.html
972.16µs 972.16µs 972.16µs 1 _internal/_default/sitemap.xml
953.597µs 953.597µs 953.597µs 1 index.html
822.263µs 822.263µs 822.263µs 1 indexes/post.html
567.498µs 51.59µs 112.205µs 11 partials/navbar.html
348.22µs 31.656µs 88.249µs 11 partials/meta.html
- 346.782µs 173.391µs 276.176µs 2 post/summary.html
+ 346.782µs 173.391µs 276.176µs 2 posts/summary.html
235.184µs 21.38µs 124.383µs 11 partials/footer.copyright.html
132.003µs 12µs 117.999µs 11 partials/menu.html
72.547µs 6.595µs 63.764µs 11 partials/footer.html
diff --git a/docs/content/en/variables/hugo.md b/docs/content/en/variables/hugo.md
index c0c5c9601..a563831ff 100644
--- a/docs/content/en/variables/hugo.md
+++ b/docs/content/en/variables/hugo.md
@@ -27,12 +27,17 @@ It contains the following fields:
.Hugo.Version
: the current version of the Hugo binary you are using e.g. `0.13-DEV`<br>
+.Hugo.Environment
+: the current running environment as defined through the `--environment` cli tag.
+
.Hugo.CommitHash
: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247`
.Hugo.BuildDate
: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`<br>
+
+
{{% note "Use the Hugo Generator Tag" %}}
We highly recommend using `.Hugo.Generator` in your website's `<head>`. `.Hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](http://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo.
{{% /note %}}
diff --git a/docs/content/en/variables/page.md b/docs/content/en/variables/page.md
index 5ef6247d4..9dcbdcc43 100644
--- a/docs/content/en/variables/page.md
+++ b/docs/content/en/variables/page.md
@@ -78,9 +78,6 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables.
.Kind
: the page's *kind*. Possible return values are `page`, `home`, `section`, `taxonomy`, or `taxonomyTerm`. Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
-.Lang
-: language taken from the language extension notation.
-
.Language
: a language object that points to the language's definition in the site
`config`.
@@ -178,10 +175,7 @@ http://remarkjs.com)
: a boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary. See [Summaries](/content-management/summaries/) for more information.
.Type
-: the [content type](/content-management/types/) of the content (e.g., `post`).
-
-.URL
-: the URL for the page relative to the web root. Note that a `url` set directly in front matter overrides the default relative URL for the rendered page.
+: the [content type](/content-management/types/) of the content (e.g., `posts`).
.UniqueID
: the MD5-checksum of the content file's path.
diff --git a/docs/content/en/variables/site.md b/docs/content/en/variables/site.md
index eaacafa32..94e67fa1a 100644
--- a/docs/content/en/variables/site.md
+++ b/docs/content/en/variables/site.md
@@ -88,15 +88,9 @@ The following is a list of site-level (aka "global") variables. Many of these va
.Site.Pages
: array of all content ordered by Date with the newest first. This array contains only the pages in the current language. See [`.Site.Pages`](#site-pages).
-.Site.Permalinks
-: a string to override the default [permalink](/content-management/urls/) format as defined in the site configuration.
-
.Site.RegularPages
: a shortcut to the *regular* page collection. `.Site.RegularPages` is equivalent to `where .Site.Pages "Kind" "page"`. See [`.Site.Pages`](#site-pages).
-.Site.RSSLink
-: the URL for the site RSS.
-
.Site.Sections
: top-level directories of the site.