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

all: Unify case of config variable names

All config variables starts with low-case and uses camelCase.

If there is abbreviation at the beginning of the name, the whole
abbreviation will be written in low-case.
If there is abbreviation at the end of the name, the
whole abbreviation will be written in upper-case.
For example, rssURI.
This commit is contained in:
Albert Nigmatzianov
2016-10-24 20:56:00 +02:00
committed by Bjørn Erik Pedersen
parent d9f54a13c1
commit f21e2f25c9
67 changed files with 469 additions and 469 deletions

View File

@@ -49,7 +49,7 @@ Three periods end the document:
```yaml
---
baseurl: "http://yoursite.example.com/"
baseURL: "http://yoursite.example.com/"
...
```
Following is an example TOML configuration file with some default values.
@@ -57,12 +57,12 @@ The values under `[params]` will populate the `.Site.Params` variable
for use in templates:
```toml
contentdir = "content"
layoutdir = "layouts"
publishdir = "public"
builddrafts = false
baseurl = "http://yoursite.example.com/"
canonifyurls = true
contentDir = "content"
layoutDir = "layouts"
publishDir = "public"
buildDrafts = false
baseURL = "http://yoursite.example.com/"
canonifyURLs = true
[taxonomies]
category = "categories"
@@ -76,9 +76,9 @@ Here is a YAML configuration file which sets a few more options:
```yaml
---
baseurl: "http://yoursite.example.com/"
baseURL: "http://yoursite.example.com/"
title: "Yoyodyne Widget Blogging"
footnotereturnlinkcontents: "↩"
footnoteReturnLinkContents: "↩"
permalinks:
post: /:year/:month/:title/
params:
@@ -97,7 +97,7 @@ Following is a list of Hugo-defined variables you can configure,
along with their current, default values:
---
archetypedir: "archetype"
archetypeDir: "archetype"
# hostname (and path) to the root, e.g. http://spf13.com/
baseURL: ""
# include content marked as draft
@@ -111,14 +111,14 @@ along with their current, default values:
canonifyURLs: false
# config file (default is path/config.yaml|json|toml)
config: "config.toml"
contentdir: "content"
contentDir: "content"
dataDir: "data"
defaultExtension: "html"
defaultLayout: "post"
# Missing translations will default to this content language
DefaultContentLanguage: "en"
defaultContentLanguage: "en"
# Renders the default content language in subdir, e.g. /en/. The root directory / will redirect to /en/
DefaultContentLanguageInSubdir: false
defaultContentLanguageInSubdir: false
disableLiveReload: false
# Do not build RSS files
disableRSS: false
@@ -142,7 +142,7 @@ along with their current, default values:
# google analytics tracking id
googleAnalytics: ""
languageCode: ""
layoutdir: "layouts"
layoutDir: "layouts"
# Enable Logging
log: false
# Log File path (if set, logging enabled automatically)
@@ -160,7 +160,7 @@ along with their current, default values:
# Preserve special characters in taxonomy names ("Gérard Depardieu" vs "Gerard Depardieu")
preserveTaxonomyNames: false
# filesystem path to write files to
publishdir: "public"
publishDir: "public"
# enables syntax guessing for code fences without specified language
pygmentsCodeFencesGuessSyntax: false
# color-codes for highlighting derived from this style
@@ -171,11 +171,11 @@ along with their current, default values:
sitemap:
# filesystem path to read files relative from
source: ""
staticdir: "static"
staticDir: "static"
# display memory and timing of different steps of the program
stepAnalysis: false
# theme to use (located by default in /themes/THEMENAME/)
themesdir: "themes"
themesDir: "themes"
theme: ""
title: ""
# if true, use /filename.html instead of /filename/

View File

@@ -80,7 +80,7 @@ can see what the pages look like.
The second component is used when you're ready to publish your web
site to the computer running your website. Running Hugo without any
actions will rebuild your entire web site using the `baseurl` setting
actions will rebuild your entire web site using the `baseURL` setting
from your site's configuration file. That's required to have your page
links work properly with most hosting companies.

View File

@@ -87,7 +87,7 @@ As mentioned in the command output, `bookshelf` directory has 5 sub-directories
* **archetypes**: You can create new content files in Hugo using the `hugo new` command. When you run that command, it adds few configuration properties to the post like date and title. [Archetype]({{< relref "content/archetypes.md" >}}) allows you to define your own configuration properties that will be added to the post front matter whenever `hugo new` command is used.
* **config.toml**: Every website should have a configuration file at the root. By default, the configuration file uses `TOML` format but you can also use `YAML` or `JSON` formats as well. [TOML](https://github.com/toml-lang/toml) is minimal configuration file format that's easy to read due to obvious semantics. The configuration settings mentioned in the `config.toml` are applied to the full site. These configuration settings include `baseurl` and `title` of the website.
* **config.toml**: Every website should have a configuration file at the root. By default, the configuration file uses `TOML` format but you can also use `YAML` or `JSON` formats as well. [TOML](https://github.com/toml-lang/toml) is minimal configuration file format that's easy to read due to obvious semantics. The configuration settings mentioned in the `config.toml` are applied to the full site. These configuration settings include `baseURL` and `title` of the website.
* **content**: This is where you will store content of the website. Inside content, you will create sub-directories for different sections. Let's suppose your website has three actions -- `blog`, `article`, and `tutorial` then you will have three different directories for each of them inside the `content` directory. The name of the section i.e. `blog`, `article`, or `tutorial` will be used by Hugo to apply a specific layout applicable to that section.
@@ -318,7 +318,7 @@ The website uses the dummy values specified in `bookshelf/config.toml`.
Let's update the configuration.
```toml
baseurl = "http://example.org/"
baseURL = "http://example.org/"
languageCode = "en-us"
title = "Shekhar Gulati Book Reviews"
@@ -484,10 +484,10 @@ Now, commenting will be enabled in your blog.
To generate Hugo website source you can use
to deploy your website on GitHub pages,
first edit `bookshelf/config.toml`, changing the `baseurl` line to:
first edit `bookshelf/config.toml`, changing the `baseURL` line to:
```
baseurl = "https://<your GitHub username>.github.io/bookshelf/"
baseURL = "https://<your GitHub username>.github.io/bookshelf/"
```
Then type the following command.