The following is the full list of Hugo-defined variables with its default value in parens.
archetypeDir ("archetypes")
: The directory where Hugo finds archetype files (content templates).
baseURL
: Hostname (and path) to the root, e.g. http://bep.is/
buildDrafts (false)
: Include drafts when building.
buildExpired (false)
: Include content already expired.
buildFuture (false)
: Include content with publishdate in the future.
canonifyURLs (false)
: Enable to turn relative URLs into absolute.
config ("config.toml")
: Config file (default is path/config.yaml|json|toml).
contentDir ("content")
: The directory from where Hugo reads content files.
dataDir ("data")
: The directory from where Hugo reads data files.
defaultContentLanguage ("en")
: Content without language indicator will default to this language.
defaultContentLanguageInSubdir (false)
: Renders the default content language in subdir, e.g. /en/. The root directory / will redirect to /en/.
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.
disableKinds ([])
: Allows you to disable all page types and will render nothing related to 'kind'. Allowed values are "page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404".
disableLiveReload (false)
: Turn off automatic live reloading of browser window.
disablePathToLower (false)
: Do not make the url/path to lowercase.
enableEmoji (false)
: Enable Emoji emoticons support for page content; see emoji-cheat-sheet.com.
enableGitInfo (false)
: If the Hugo site is versioned by Git, you will then get a `.GitInfo` object per page, and `Lastmod` will get updated by the last commit date for content.
enableMissingTranslationPlaceholders (false)
: Show a placeholder instead of the default value or an empty string if a translation is missing
enableRobotsTXT (false)
: When enabled, Hugo will generate a `robots.txt` file.
footnoteAnchorPrefix ("")
: A prefix for your footnote anchors.
footnoteReturnLinkContents ("")
: A return link for your footnote.
googleAnalytics ("")
: google analytics tracking id
hasCJKLanguage (false)
: If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly in CJK languages.
imaging
: See [Image Processing Config](/content-management/image-processing/#image-processing-config).
languages
: See [Configure Languages](/content-management/multilingual/#configure-languages).
languageCode ("")
: The site's language code.
layoutDir ("layouts")
: The directory from where Hugo reads layouts (templates).
Similar to the template [lookup order][], Hugo has a default set of rules for searching for a configuration file in the root of your website's source directory as a default behavior:
1.`./config.toml`
2.`./config.yaml`
3.`./config.json`
In your `config` file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
The following is a typical example of a YAML configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]:
The following is an example of a TOML configuration file. The values under `[params]` will populate the `.Site.Params` variable for use in [templates][]:
This is really useful if you use a service such as Netlify to deploy your site. Look at the Hugo docs [Netlify configuration file](https://github.com/gohugoio/hugoDocs/blob/master/netlify.toml) for an example.
The following statement inside `./config.toml` will cause Hugo to ignore files ending with `.foo` and `.boo` when rendering:
```
ignoreFiles = [ "\\.foo$", "\\.boo$" ]
```
The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy.
## Configure Blackfriday
[Blackfriday](https://github.com/russross/blackfriday) is Hugo's built-in Markdown rendering engine.
Hugo typically configures Blackfriday with sane default values that should fit most use cases reasonably well.
However, if you have specific needs with respect to Markdown, Hugo exposes some of its Blackfriday behavior options for you to alter. The following table lists these Hugo options, paired with the corresponding flags from Blackfriday's source code ( [html.go](https://github.com/russross/blackfriday/blob/master/html.go) and [markdown.go](https://github.com/russross/blackfriday/blob/master/markdown.go)).
1. Blackfriday flags are *case sensitive* as of Hugo v0.15.
2. Blackfriday flags must be grouped under the `blackfriday` key and can be set on both the site level *and* the page level. Any setting on a page will override its respective site setting.
{{% /note %}}
{{< code file="bf-config.toml" >}}
[blackfriday]
angledQuotes = true
fractions = false
plainIDAnchors = true
extensions = ["hardLineBreak"]
{{< /code >}}
{{< code file="bf-config.yml" >}}
blackfriday:
angledQuotes: true
fractions: false
plainIDAnchors: true
extensions:
- hardLineBreak
{{< /code >}}
## Configure Additional Output Formats
Hugo v0.20 introduced the ability to render your content to multiple output formats (e.g., to JSON, AMP html, or CSV). See [Output Formats][] for information on how to add these values to your Hugo project's configuration file.