1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Squashed 'docs/' changes from 327003421..39a7fac34

39a7fac34 Add .hugo_build.lock to .gitignore
920c716a4 fix a typo: to -> two (#1545)
6f0ba9593 Remove godocref from front matter (#1543)
8ec3d5948 remove link to wercker (#1544)
b56008719 Delete deployment-with-wercker.md (#1542)
e33d29b02 Fix broken links (#1538)
29e9d4c21 Sort commenting systems (#1541)
0b7ea60a7 Delete the news page "HTTP/2 Server Push in Hugo"
6e1515857 Fix quick-start.md (#1525)
62168ab35 Update comments.md (#1535)
d92191512 Small typo (#1539)
129c8834a Correct the PostCSS noMap default value (#1534)
6a5b29fcc Add example to index function (#1536)
e3dd8c507 Update output-formats.md
0c9321ca0 Remove reference to using LiveReload in production environment
4072d6776 Mod testing
09fabf7d6 Fix typo (#1524)
2fce813c8 Fix grammatical error in quick-start.md (#1523)
45230ab4a Hugo Mod testing
2dd4cd9e7 Update index.md
2c3ed62fd netlify: Bump to 0.88.1
648e2a007 Merge branch 'tempv0.88.1'
f216eade1 releaser: Add release notes to /docs for release of 0.88.1
8a7b64d4b Fix typographical errors in 0.88.0 release notes
a4bf86300 Release 0.88
738bb8f38 releaser: Add release notes to /docs for release of 0.88.0
8fcf2c55d highlight: Remove some pygments references
f2b173de2 HTTPS link
c88881c8e Adding link to nginx documentation
6b0a74fe0 Fix typos in docs (#1516)
498b8f0f1 Fix typos in time.Format (#1515)
28723fad6 Fix taxonomy and term examples (#1514)
3ffd00e12 Update front-matter.md
7cc1da82e Fix grammar in 0.86.1 release notes (#1510)
0009c51c3 Update docs helper
7e2f430f4 Update index.md
7857eae7e releaser: Add release notes to /docs for release of 0.87.0
1f08b684b releaser: Add release notes to /docs for release of 0.87.0
36a9e701c docs: Adjust config docs
0f588438e docs: Regen CLI docs
1b4682cd8 docs: Regen docs helper
bc8bbaae9 Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0
6f2480643 docs: Adjust time zone docs

git-subtree-dir: docs
git-subtree-split: 39a7fac343c289906db644c96079fdcc0298582f
This commit is contained in:
Bjørn Erik Pedersen
2021-10-31 13:51:51 +01:00
parent bd77f6e1c9
commit aa5ac36a3e
173 changed files with 749 additions and 778 deletions

View File

@@ -106,222 +106,306 @@ The following is the full list of Hugo-defined variables with their default
value in parentheses. Users may choose to override those values in their site
config file(s).
archetypeDir ("archetypes")
: The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
### archetypeDir
assetDir ("assets")
: The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
**Default value:** "archetypes"
baseURL
: Hostname (and path) to the root, e.g. https://bep.is/
The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
blackfriday
: See [Configure Blackfriday](/getting-started/configuration-markup#blackfriday)
### assetDir
build
: See [Configure Build](#configure-build)
**Default value:** "assets"
buildDrafts (false)
: Include drafts when building.
The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
buildExpired (false)
: Include content already expired.
### baseURL
Hostname (and path) to the root, e.g. https://bep.is/
buildFuture (false)
: Include content with publishdate in the future.
### blackfriday
See [Configure Blackfriday](/getting-started/configuration-markup#blackfriday)
caches
: See [Configure File Caches](#configure-file-caches)
### build
See [Configure Build](#configure-build)
cascade {{< new-in "0.86.0" >}}
: Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
### buildDrafts (false)
canonifyURLs (false)
: Enable to turn relative URLs into absolute.
**Default value:** false
contentDir ("content")
: The directory from where Hugo reads content files. {{% module-mounts-note %}}
Include drafts when building.
dataDir ("data")
: The directory from where Hugo reads data files. {{% module-mounts-note %}}
### buildExpired
defaultContentLanguage ("en")
: Content without language indicator will default to this language.
**Default value:** false
defaultContentLanguageInSubdir (false)
: Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
Include content already expired.
disableAliases (false)
: Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
### buildFuture
disableHugoGeneratorInject (false)
: Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
**Default value:** false
disableKinds ([])
: Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
Include content with publishdate in the future.
disableLiveReload (false)
: Disable automatic live reloading of browser window.
### caches
See [Configure File Caches](#configure-file-caches)
### cascade
{{< new-in "0.86.0" >}}
Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
### canonifyURLs
**Default value:** false
Enable to turn relative URLs into absolute.
### contentDir
**Default value:** "content"
The directory from where Hugo reads content files. {{% module-mounts-note %}}
### dataDir
**Default value:** "data"
The directory from where Hugo reads data files. {{% module-mounts-note %}}
### defaultContentLanguage
**Default value:** "en"
Content without language indicator will default to this language.
### defaultContentLanguageInSubdir
**Default value:** false
Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
### disableAliases
**Default value:** false
Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
### disableHugoGeneratorInject
**Default value:** false
Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
### disableKinds
**Default value:** []
Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
### disableLiveReload
**Default value:** false
Disable automatic live reloading of browser window.
### disablePathToLower
**Default value:** false
disablePathToLower (false)
: Do not convert the url/path to lowercase.
enableEmoji (false)
: Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
### enableEmoji
enableGitInfo (false)
: Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
**Default value:** false
enableInlineShortcodes (false)
: Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
enableMissingTranslationPlaceholders (false)
: Show a placeholder instead of the default value or an empty string if a translation is missing.
### enableGitInfo
enableRobotsTXT (false)
: Enable generation of `robots.txt` file.
**Default value:** false
frontmatter
Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
: See [Front matter Configuration](#configure-front-matter).
### enableInlineShortcodes
footnoteAnchorPrefix ("")
: Prefix for footnote anchors.
**Default value:** false
footnoteReturnLinkContents ("")
: Text to display for footnote return links.
Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
googleAnalytics ("")
: Google Analytics tracking ID.
### enableMissingTranslationPlaceholders
hasCJKLanguage (false)
: If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
**Default value:** false
imaging
: See [Image Processing Config](/content-management/image-processing/#image-processing-config).
Show a placeholder instead of the default value or an empty string if a translation is missing.
languages
: See [Configure Languages](/content-management/multilingual/#configure-languages).
### enableRobotsTXT
languageCode ("")
: The site's language code. It is used in the default [RSS template](/templates/rss/#configure-rss) and can be useful for [multi-lingual sites](/content-management/multilingual/#configure-multilingual-multihost).
**Default value:** false
languageName ("")
: The site's language name.
Enable generation of `robots.txt` file.
disableLanguages
: See [Disable a Language](/content-management/multilingual/#disable-a-language)
### frontmatter
layoutDir ("layouts")
: The directory from where Hugo reads layouts (templates).
See [Front matter Configuration](#configure-front-matter).
log (false)
: Enable logging.
### footnoteAnchorPrefix
logFile ("")
: Log File path (if set, logging enabled automatically).
**Default value:** ""
markup
: See [Configure Markup](/getting-started/configuration-markup).{{< new-in "0.60.0" >}}
Prefix for footnote anchors.
mediaTypes
### footnoteReturnLinkContents
**Default value:** ""
Text to display for footnote return links.
### googleAnalytics
**Default value:** ""
Google Analytics tracking ID.
### hasCJKLanguage
**Default value:** false
If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
### imaging
See [Image Processing Config](/content-management/image-processing/#image-processing-config).
### languages
See [Configure Languages](/content-management/multilingual/#configure-languages).
### disableLanguages
See [Disable a Language](/content-management/multilingual/#disable-a-language)
### markup
See [Configure Markup](/getting-started/configuration-markup).{{< new-in "0.60.0" >}}
### mediaTypes
See [Configure Media Types](/templates/output-formats/#media-types).
menu
: See [Add Non-content Entries to a Menu](/content-management/menus/#add-non-content-entries-to-a-menu).
### menus
See [Add Non-content Entries to a Menu](/content-management/menus/#add-non-content-entries-to-a-menu).
minify
: See [Configure Minify](#configure-minify)
### minify
See [Configure Minify](#configure-minify)
module
: Module config see [Module Config](/hugo-modules/configuration/).{{< new-in "0.56.0" >}}
### module
Module config see [Module Config](/hugo-modules/configuration/).{{< new-in "0.56.0" >}}
newContentEditor ("")
: The editor to use when creating new content.
### newContentEditor
The editor to use when creating new content.
noChmod (false)
: Don't sync permission mode of files.
### noChmod
Don't sync permission mode of files.
noTimes (false)
: Don't sync modification time of files.
### noTimes
Don't sync modification time of files.
outputFormats
### outputFormats
See [Configure Output Formats](#configure-additional-output-formats).
paginate (10)
: Default number of elements per page in [pagination](/templates/pagination/).
### paginate
paginatePath ("page")
: The path element used during pagination (https://example.com/page/2).
**Default value:** 10
permalinks
: See [Content Management](/content-management/urls/#permalinks).
Default number of elements per page in [pagination](/templates/pagination/).
pluralizeListTitles (true)
: Pluralize titles in lists.
### paginatePath
publishDir ("public")
: The directory to where Hugo will write the final static site (the HTML files etc.).
**Default value:** "page"
related
The path element used during pagination (`https://example.com/page/2`).
### permalinks
See [Content Management](/content-management/urls/#permalinks).
### pluralizeListTitles
**Default value:** true
Pluralize titles in lists.
### publishDir
**Default value:** "public"
The directory to where Hugo will write the final static site (the HTML files etc.).
### related
: See [Related Content](/content-management/related/#configure-related-content).{{< new-in "0.27" >}}
relativeURLs (false)
: Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
### relativeURLs
Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
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`).
### refLinksErrorLevel
refLinksNotFoundURL
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
**Default value:** "ERROR"
rssLimit (unlimited)
: Maximum number of items in the RSS feed.
When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
sectionPagesMenu ("")
: See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-for-lazy-bloggers).
### refLinksNotFoundURL
URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
sitemap
: Default [sitemap configuration](/templates/sitemap-template/#configure-sitemapxml).
### rssLimit
staticDir ("static")
: A directory or a list of directories from where Hugo reads [static files][static-files]. {{% module-mounts-note %}}
Maximum number of items in the RSS feed.
summaryLength (70)
: The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting).
### sectionPagesMenu
See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-for-lazy-bloggers).
taxonomies
: See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
### sitemap
Default [sitemap configuration](/templates/sitemap-template/#configure-sitemapxml).
theme ("")
: Theme to use (located by default in `/themes/THEMENAME/`).
### summaryLength
themesDir ("themes")
: The directory where Hugo reads the themes from.
**Default value:** 70
timeout (10000)
: Timeout for generating page contents, in milliseconds (defaults to 10&nbsp;seconds). *Note:* this is used to bail out of recursive content generation, if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents) you might need to raise this limit.
The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting).
timeZone {{< new-in "0.86.0" >}}
: The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time` function](/functions/time/).
### taxonomies
See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
title ("")
: Site title.
### theme
: See [Module Config](/hugo-modules/configuration/#module-config-imports) for how to import a theme.
titleCaseStyle ("AP")
: See [Configure Title Case](#configure-title-case)
### themesDir
uglyURLs (false)
: When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
**Default value:** "themes"
verbose (false)
: Enable verbose output.
The directory where Hugo reads the themes from.
verboseLog (false)
: Enable verbose logging.
### timeout
watch (false)
: Watch filesystem for changes and recreate as needed.
**Default value:** 10000
Timeout for generating page contents, in milliseconds (defaults to 10&nbsp;seconds). *Note:* this is used to bail out of recursive content generation, if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents) you might need to raise this limit.
### timeZone
{{< new-in "0.87.0" >}}
The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time` function](/functions/time/). The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
### title
Site title.
### titleCaseStyle
**Default value:** "AP"
See [Configure Title Case](#configure-title-case)
### uglyURLs
When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
### watch
Watch filesystem for changes and recreate as needed.
{{% note %}}
If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
@@ -366,7 +450,7 @@ noJSConfigInAssets {{< new-in "0.78.0" >}}
{{< new-in "0.67.0" >}}
This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slighly more powerful [Glob matching](https://github.com/gobwas/glob):
This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob):
{{< code-toggle file="config">}}

View File

@@ -552,7 +552,6 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp
[installgo]: https://golang.org/dl/
[linuxbrew]: https://docs.brew.sh/Homebrew-on-Linux
[Path Editor]: https://patheditor2.codeplex.com/
[pygments]: https://pygments.org
[quickstart]: /getting-started/quick-start/
[redhatforum]: https://discourse.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491
[releases]: https://github.com/gohugoio/hugo/releases

View File

@@ -23,7 +23,7 @@ This quick start uses `macOS` in the examples. For instructions about how to ins
It is recommended to have [Git installed](https://git-scm.com/downloads) to run this tutorial.
For other approaches learning Hugo like book or a video tutorial refer to the [external learning resources](/getting-started/external-learning-resources/) page.
For other approaches to learning Hugo (like books or video tutorials), refer to the [external learning resources](/getting-started/external-learning-resources/) page.
{{% /note %}}
## Step 1: Install Hugo
@@ -140,7 +140,7 @@ Press Ctrl+C to stop
**Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).**
Feel free to edit or add new content and simply refresh in browser to see changes quickly (You might need to force refresh in webbrowser, something like Ctrl-R usually works).
Feel free to edit or add new content and simply refresh in browser to see changes quickly. (You might need to force refresh your web browser, something like Ctrl-R usually works.)
## Step 6: Customize the Theme

View File

@@ -176,7 +176,7 @@ Fortunately Hugo has an easy, embedded and simple solution for this. It's the fl
LiveReload works by injecting JavaScript into the pages Hugo generates. The script creates a connection from the browser's web socket client to the Hugo web socket server.
LiveReload is awesome for development. However, some Hugo users may use `hugo server` in production to instantly display updated content. The following methods make it easy to disable LiveReload:
The following methods make it easy to disable LiveReload:
```
hugo server --watch=false