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
path: root/docs
diff options
context:
space:
mode:
authorAlbert Nigmatzianov <albertnigma@gmail.com>2016-10-24 21:56:00 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-24 21:56:00 +0300
commitf21e2f25c99c547a2f35d209935f8f1c52fa2671 (patch)
treef2bb860213e88b0244c31144cfcd872665096f06 /docs
parentd9f54a13c14f12ccc8af33e9dbd611c2cd113324 (diff)
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.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/content/multilingual.md12
-rw-r--r--docs/content/extras/aliases.md2
-rw-r--r--docs/content/extras/menus.md6
-rw-r--r--docs/content/extras/urls.md12
-rw-r--r--docs/content/meta/release-notes.md6
-rw-r--r--docs/content/overview/configuration.md34
-rw-r--r--docs/content/overview/introduction.md2
-rw-r--r--docs/content/overview/quickstart.md8
-rw-r--r--docs/content/templates/content.md12
-rw-r--r--docs/content/templates/go-templates.md4
-rw-r--r--docs/content/templates/variables.md2
-rw-r--r--docs/content/tutorials/create-a-multilingual-site.md28
-rw-r--r--docs/content/tutorials/creating-a-new-theme.md6
-rw-r--r--docs/content/tutorials/github-pages-blog.md30
-rw-r--r--docs/content/tutorials/migrate-from-jekyll.md2
15 files changed, 82 insertions, 84 deletions
diff --git a/docs/content/content/multilingual.md b/docs/content/content/multilingual.md
index 0f3f44295..5d591bc29 100644
--- a/docs/content/content/multilingual.md
+++ b/docs/content/content/multilingual.md
@@ -14,7 +14,7 @@ Hugo supports multiple languages side-by-side (added in `Hugo 0.17`). Define the
Example:
```
-DefaultContentLanguage = "en"
+defaultContentLanguage = "en"
Languages:
en:
@@ -38,7 +38,7 @@ value for that key (like `copyright` for the English (`en`) language in this exa
With the config above, all content, sitemap, RSS feeds, paginations
and taxonomy pages will be rendered below `/` in English (your default content language), and below `/fr` in French.
-If you want all of the languages to be put below their respective language code, enable `DefaultContentLanguageInSubdir: true` in your configuration.
+If you want all of the languages to be put below their respective language code, enable `defaultContentLanguageInSubdir: true` in your configuration.
Only the obvious non-global options can be overridden per language. Examples of global options are `BaseURL`, `BuildDrafts`, etc.
@@ -81,10 +81,10 @@ You can also have:
1. `/content/about.md`
2. `/content/about.fr.md`
-In which case the config variable `DefaultContentLanguage` will be used to affect the default language `about.md`. This way, you can
+In which case the config variable `defaultContentLanguage` will be used to affect the default language `about.md`. This way, you can
slowly start to translate your current content without having to rename everything.
-If left unspecified, the value for `DefaultContentLanguage` defaults to `en`.
+If left unspecified, the value for `defaultContentLanguage` defaults to `en`.
By having the same _base file name_, the content pieces are linked together as translated pieces.
@@ -159,14 +159,12 @@ To track down missing translation strings, run Hugo with the `--i18n-warnings` f
i18n|MISSING_TRANSLATION|en|wordCount
```
-
-
### Menus
You can define your menus for each language independently. The [creation of a menu]({{< relref "extras/menus.md" >}}) works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file:
```toml
-DefaultContentLanguage = "en"
+defaultContentLanguage = "en"
[languages.en]
weight = 0
diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md
index da861387c..252c348cc 100644
--- a/docs/content/extras/aliases.md
+++ b/docs/content/extras/aliases.md
@@ -79,7 +79,7 @@ aliases:
When aliases are specified, Hugo creates a physical folder structure to match the alias entry, and, an html file specifying the canonical URL for the page, and a redirect target.
-Assuming a baseurl of `mysite.tld`, the contents of the html file will look something like:
+Assuming a baseURL of `mysite.tld`, the contents of the html file will look something like:
```html
<!DOCTYPE html>
diff --git a/docs/content/extras/menus.md b/docs/content/extras/menus.md
index 3184b6f39..3817a7257 100644
--- a/docs/content/extras/menus.md
+++ b/docs/content/extras/menus.md
@@ -127,7 +127,7 @@ And the equivalent example `config.yaml`:
---
-**NOTE:** The URLs must be relative to the context root. If the `BaseURL` is `http://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will overide the BaseURL. If the `URL` is `http://subdomain.example.com/`, the output will be `http://subdomain.example.com`.
+**NOTE:** The URLs must be relative to the context root. If the `baseURL` is `http://example.com/mysite/`, then the URLs in the menu must not include the context root `mysite`. Using an absolute URL will overide the baseURL. If the `URL` is `http://subdomain.example.com/`, the output will be `http://subdomain.example.com`.
## Nesting
@@ -136,9 +136,9 @@ All nesting of content is done via the `parent` field.
The parent of an entry should be the identifier of another entry.
Identifier should be unique (within a menu).
-The following order is used to determine an Identifier:
+The following order is used to determine an Identifier:
-> Name > LinkTitle > Title.
+> Name > LinkTitle > Title.
This means that the title will be used unless
linktitle is present, etc. In practice Name and Identifier are never
diff --git a/docs/content/extras/urls.md b/docs/content/extras/urls.md
index 95e80a0cf..af540088d 100644
--- a/docs/content/extras/urls.md
+++ b/docs/content/extras/urls.md
@@ -35,11 +35,11 @@ Organization](/content/organization/) for more details.
By default, all relative URLs encountered in the input are left unmodified,
e.g. `/css/foo.css` would stay as `/css/foo.css`,
-i.e. `canonifyurls` defaults to `false`.
+i.e. `canonifyURLs` defaults to `false`.
-By setting `canonifyurls` to `true`, all relative URLs would instead
-be *canonicalized* using `baseurl`. For example, assuming you have
-`baseurl = http://yoursite.example.com/` defined in the site-wide
+By setting `canonifyURLs` to `true`, all relative URLs would instead
+be *canonicalized* using `baseURL`. For example, assuming you have
+`baseURL = http://yoursite.example.com/` defined in the site-wide
`config.toml`, the relative URL `/css/foo.css` would be turned into
the absolute URL `http://yoursite.example.com/css/foo.css`.
@@ -51,9 +51,9 @@ Benefits of non-canonicalization include being able to have resource inclusion
be scheme-relative, so that http vs https can be decided based on how this
page was retrieved.
-> Note: In the May 2014 release of Hugo v0.11, the default value of `canonifyurls` was switched from `true` to `false`, which we think is the better default and should continue to be the case going forward. So, please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions.
+> Note: In the May 2014 release of Hugo v0.11, the default value of `canonifyURLs` was switched from `true` to `false`, which we think is the better default and should continue to be the case going forward. So, please verify and adjust your website accordingly if you are upgrading from v0.10 or older versions.
-To find out the current value of `canonifyurls` for your website, you may use the handy `hugo config` command added in v0.13:
+To find out the current value of `canonifyURLs` for your website, you may use the handy `hugo config` command added in v0.13:
hugo config | grep -i canon
diff --git a/docs/content/meta/release-notes.md b/docs/content/meta/release-notes.md
index e9ed75ca2..76650620a 100644
--- a/docs/content/meta/release-notes.md
+++ b/docs/content/meta/release-notes.md
@@ -218,7 +218,7 @@ times decreased anywhere from 10% to 99%.
* Use absolute path when editing with editor {{<gh 1589>}}
* Fix hugo server "Watching for changes" path display {{<gh 1721>}}
* Do not strip special characters out of URLs {{<gh 1292>}}
-* Fix `RSSLink` when uglyurls are enabled {{<gh 175>}}
+* Fix `RSSLink` when uglyURLs are enabled {{<gh 175>}}
* Get BaseURL from viper in server mode {{<gh 1821>}}
* Fix shortcode handling in RST {{<gh 1904>}}
* Use default sitemap configuration for homepage {{<gh 1304>}}
@@ -411,7 +411,7 @@ Hugo also depends on a lot of other great projects. A big thanks to all of our d
* More Pygments highlighting options, including `line numbers`
* Show help information to Windows users who try to double click on `hugo.exe`.
* Add `bind` flag to `hugo server` to set the interface to which the server will bind
-* Add support for `canonifyurls` in `srcset`
+* Add support for `canonifyURLs` in `srcset`
* Add shortcode support for HTML (content) files
* Allow the same `shortcode` to be used with or without inline content
* Configurable RSS output filename
@@ -420,7 +420,7 @@ Hugo also depends on a lot of other great projects. A big thanks to all of our d
* Fix panic with paginator and zero pages in result set.
* Fix crossrefs on Windows.
* Fix `eq` and `ne` template functions when used with a raw number combined with the result of `add`, `sub` etc.
-* Fix paginator with uglyurls
+* Fix paginator with uglyURLs
* Fix {{< gh 998 >}}, supporting UTF8 characters in Permalinks.
## Notices
diff --git a/docs/content/overview/configuration.md b/docs/content/overview/configuration.md
index 4ba00664d..cbf7938ac 100644
--- a/docs/content/overview/configuration.md
+++ b/docs/content/overview/configuration.md
@@ -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/
diff --git a/docs/content/overview/introduction.md b/docs/content/overview/introduction.md
index 9f344c00a..f2ad71cd8 100644
--- a/docs/content/overview/introduction.md
+++ b/docs/content/overview/introduction.md
@@ -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.
diff --git a/docs/content/overview/quickstart.md b/docs/content/overview/quickstart.md
index a44892e89..78bd75ec3 100644
--- a/docs/content/overview/quickstart.md
+++ b/docs/content/overview/quickstart.md
@@ -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.
diff --git a/docs/content/templates/content.md b/docs/content/templates/content.md
index c5c551cc8..f0db5f8ce 100644
--- a/docs/content/templates/content.md
+++ b/docs/content/templates/content.md
@@ -69,7 +69,7 @@ It makes use of [partial templates](/templates/partials/)
{{ partial "header.html" . }}
{{ partial "subheader.html" . }}
- {{ $baseurl := .Site.BaseURL }}
+ {{ $baseURL := .Site.BaseURL }}
<section id="main">
<h1 id="title">{{ .Title }}</h1>
@@ -88,12 +88,12 @@ It makes use of [partial templates](/templates/partials/)
</section>
<ul id="categories">
{{ range .Params.topics }}
- <li><a href="{{ $baseurl }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
+ <li><a href="{{ $baseURL }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
<ul id="tags">
{{ range .Params.tags }}
- <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
+ <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
</div>
@@ -118,7 +118,7 @@ It makes use of [partial templates](/templates/partials/)
{{ partial "header.html" . }}
{{ partial "subheader.html" . }}
- {{ $baseurl := .Site.BaseURL }}
+ {{ $baseURL := .Site.BaseURL }}
<section id="main">
<h1 id="title">{{ .Title }}</h1>
@@ -137,12 +137,12 @@ It makes use of [partial templates](/templates/partials/)
</section>
<ul id="categories">
{{ range .Params.topics }}
- <li><a href="{{ $baseurl }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
+ <li><a href="{{ $baseURL }}/topics/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
<ul id="tags">
{{ range .Params.tags }}
- <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
+ <li> <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a> </li>
{{ end }}
</ul>
</div>
diff --git a/docs/content/templates/go-templates.md b/docs/content/templates/go-templates.md
index 58ad75cc2..114d02d11 100644
--- a/docs/content/templates/go-templates.md
+++ b/docs/content/templates/go-templates.md
@@ -267,7 +267,7 @@ access this from within the loop, you will likely want to do one of the followin
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li>
- <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a>
+ <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a>
- {{ $title }}
</li>
{{ end }}
@@ -281,7 +281,7 @@ access this from within the loop, you will likely want to do one of the followin
{{ range .Params.tags }}
<li>
- <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a>
+ <a href="{{ $baseURL }}/tags/{{ . | urlize }}">{{ . }}</a>
- {{ $.Site.Title }}
</li>
{{ end }}
diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md
index b85387b46..970be23ce 100644
--- a/docs/content/templates/variables.md
+++ b/docs/content/templates/variables.md
@@ -159,7 +159,7 @@ Also available is `.Site` which has the following:
**.Site.AllPages** Array of all pages regardless of their translation.<br>
**.Site.Params** A container holding the values from the `params` section of your site configuration file. For example, a TOML config file might look like this:
- baseurl = "http://yoursite.example.com/"
+ baseURL = "http://yoursite.example.com/"
[params]
description = "Tesla's Awesome Hugo Site"
diff --git a/docs/content/tutorials/create-a-multilingual-site.md b/docs/content/tutorials/create-a-multilingual-site.md
index c5d35379d..8a2dd960e 100644
--- a/docs/content/tutorials/create-a-multilingual-site.md
+++ b/docs/content/tutorials/create-a-multilingual-site.md
@@ -11,7 +11,7 @@ title: Create a Multilingual Site
weight: 10
---
-> **Note:** Since v0.17 Hugo has built-in support for the creation of multilingual website. [Read more about it]({{< relref "content/multilingual.md" >}}).
+> **Note:** Since v0.17 Hugo has built-in support for the creation of multilingual website. [Read more about it]({{< relref "content/multilingual.md" >}}).
## Introduction
@@ -30,10 +30,10 @@ Create your site configs in the root of your repository, for example for an Engl
**English Config `config_en.toml`**:
~~~toml
-baseurl = "http://acme.com/"
+baseURL = "http://acme.com/"
title = "Acme Inc."
-contentdir = "content/en"
-publishdir = "public/en"
+contentDir = "content/en"
+publishDir = "public/en"
[params]
locale = "en-US"
@@ -42,10 +42,10 @@ publishdir = "public/en"
**Japanese Config `config_ja.toml`**:
~~~toml
-baseurl = "http://acme.jp/"
+baseURL = "http://acme.jp/"
title = "有限会社アクミー"
-contentdir = "content/ja"
-publishdir = "public/ja"
+contentDir = "content/ja"
+publishDir = "public/ja"
[params]
locale = "ja-JP"
@@ -60,16 +60,16 @@ Create `.yaml` (or `.json` or `.toml`) files for each language, under `/data/tra
**English Strings `en-US.yaml`**:
~~~yaml
-topslogan: Acme Inc.
-topsubslogan: You'll love us
+topSlogan: Acme Inc.
+topSubslogan: You'll love us
...
~~~
**Japanese Strings `ja-JP.yaml`**:
~~~yaml
-topslogan: 有限会社アクミー
-topsubslogan: キット勝つぞ
+topSlogan: 有限会社アクミー
+topSubslogan: キット勝つぞ
...
~~~
@@ -90,8 +90,8 @@ Now you can reference the strings in your templates. One way is to do it like in
</head>
<body>
<div class="container">
- <h1 class="header">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topslogan }}</h1>
- <h3 class="subheader">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topsubslogan }}</h3>
+ <h1 class="header">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topSlogan }}</h1>
+ <h3 class="subheader">{{ ( index $.Site.Data.translations $.Site.Params.locale ).topSubslogan }}</h3>
</div>
</body>
</html>
@@ -126,7 +126,7 @@ At the time of this writing, Golang does not yet have support for internationali
</time>
~~~
-This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.
+This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file.
## Create Multilingual Content
diff --git a/docs/content/tutorials/creating-a-new-theme.md b/docs/content/tutorials/creating-a-new-theme.md
index 2f5f93fe3..17846d375 100644
--- a/docs/content/tutorials/creating-a-new-theme.md
+++ b/docs/content/tutorials/creating-a-new-theme.md
@@ -489,7 +489,7 @@ So, let's edit your configuration file to add the theme name:
```toml
$ vi config.toml
theme = "zafta"
-baseurl = "http://example.org/"
+baseURL = "http://example.org/"
title = "My New Hugo Site"
languageCode = "en-us"
:wq
@@ -1074,13 +1074,13 @@ templates _much_ easier &mdash; so, I'll cover them, now.
### Base URL
While developing and testing your theme, did you notice that the links in the
-rendered `./public/index.html` file use the full "baseurl" from your
+rendered `./public/index.html` file use the full "baseURL" from your
`./config.toml` file? That's because those files are intended to be deployed
to your web server.
Whenever you test your theme, you start Hugo in web server mode
(with `hugo server`) and connect to it with your web browser.
-That command is smart enough to replace the "baseurl" with
+That command is smart enough to replace the "baseURL" with
`http://localhost:1313` on the fly, so that the links automatically
work for you.
diff --git a/docs/content/tutorials/github-pages-blog.md b/docs/content/tutorials/github-pages-blog.md
index 4e11e4783..a5c5d5937 100644
--- a/docs/content/tutorials/github-pages-blog.md
+++ b/docs/content/tutorials/github-pages-blog.md
@@ -31,22 +31,22 @@ As our goal is to host a website using GitHub Pages, it is natural for us to hos
### Write a `config.yaml` File
-The very first step in creating a new Hugo site is to [write the config file](/overview/configuration/). This config file is important for at least two reasons: (1) this is where site-wide settings (like the websites `baseurl`) go, and (2) the config file dictates to some extent how Hugo will generate the website. For the example website I created a file `config.yaml` with the following contents
+The very first step in creating a new Hugo site is to [write the config file](/overview/configuration/). This config file is important for at least two reasons: (1) this is where site-wide settings (like the websites `baseURL`) go, and (2) the config file dictates to some extent how Hugo will generate the website. For the example website I created a file `config.yaml` with the following contents
---
- contentdir: "content"
- layoutdir: "layouts"
- publishdir: "public"
+ contentDir: "content"
+ layoutDir: "layouts"
+ publishDir: "public"
indexes:
category: "categories"
- baseurl: "http://spencerlyon2.github.io/hugo_gh_blog"
+ baseURL: "http://spencerlyon2.github.io/hugo_gh_blog"
title: "Hugo Blog Template for GitHub Pages"
- canonifyurls: true
+ canonifyURLs: true
...
-> **Caveat:** Hugo's former default of `canonifyurls: true` has been changed
+> **Caveat:** Hugo's former default of `canonifyURLs: true` has been changed
> to `false` since this tutorial has written. **Please make sure you manually
-> add `canonifyurls: true` to your `config.yaml`** if you are using Spencer's
+> add `canonifyURLs: true` to your `config.yaml`** if you are using Spencer's
> https://github.com/spencerlyon2/hugo_gh_blog for this tutorial, or you *will*
> run into problems such as the CSS files not loading.
@@ -55,7 +55,7 @@ The very first step in creating a new Hugo site is to [write the config file](/o
### Define Structure of Website
-Hugo assumes that you organize the content of your site in a meaningful way and uses the same structure to render the website. Notice that we have the line `contentdir: "content"` in our configuration file. This means that all the actual content of the website should be placed somewhere within a folder named `content`. Hugo treats all directories in `content` as sections. For our example we only need one section: a place to hold our blog posts. So we created two new folders:
+Hugo assumes that you organize the content of your site in a meaningful way and uses the same structure to render the website. Notice that we have the line `contentDir: "content"` in our configuration file. This means that all the actual content of the website should be placed somewhere within a folder named `content`. Hugo treats all directories in `content` as sections. For our example we only need one section: a place to hold our blog posts. So we created two new folders:
```
▾ <root>/
@@ -115,7 +115,7 @@ The keys set in this section are the mandatory `title` and `date` as well as the
Once the site is set up and working properly, we need to push it to the correct branch of a GitHub repository so the website can be served through GitHub Pages. There are many ways to do this. Here I will show the workflow I currently use to manage my websites that are hosted through GitHub Pages.
-GitHub Pages will serve up a website for any repository that has a branch called `gh-pages` with a valid `index.html` file at that branch's root. A typical workflow might be to keep the content of a website on the `master` branch of a repository and the generated website on the `gh-pages` branch. This provides nice separation between input and output, but can be very tedious to work with. As a workaround, we will use the `git subtree` family of commands to have the `public` directory (or whatever `publishdir` is set to in your `config.yaml`) mirror the root of the `gh-pages` branch of the repository. This will allow us to do all our work on the `master` branch, run Hugo to have the site output into the `public` directory, and then push that directory directly to the correct place for GitHub Pages to serve our site.
+GitHub Pages will serve up a website for any repository that has a branch called `gh-pages` with a valid `index.html` file at that branch's root. A typical workflow might be to keep the content of a website on the `master` branch of a repository and the generated website on the `gh-pages` branch. This provides nice separation between input and output, but can be very tedious to work with. As a workaround, we will use the `git subtree` family of commands to have the `public` directory (or whatever `publishDir` is set to in your `config.yaml`) mirror the root of the `gh-pages` branch of the repository. This will allow us to do all our work on the `master` branch, run Hugo to have the site output into the `public` directory, and then push that directory directly to the correct place for GitHub Pages to serve our site.
To get this properly set up, we will execute a series of commands at the terminal. I will include all of them in one place here for easy copy and paste, and will explain what each line does via comments. Note that this is to be run from the `<root>` directory (wherever the `content` and `layout` folders of your Hugo project live). Also note that you will need to change the commands that have the example repository GitHub address so that they point to your repo.
@@ -190,22 +190,22 @@ To build all draft posts *(If you only have drafts, no site will be generated)*
**Deploy.sh:**
#!/bin/bash
-
+
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
-
+
# Build the project.
hugo
-
+
# Add changes to git.
git add -A
-
+
# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"
-
+
# Push source and build repos.
git push origin master
git subtree push --prefix=public git@github.com:spencerlyon2/hugo_gh_blog.git gh-pages
diff --git a/docs/content/tutorials/migrate-from-jekyll.md b/docs/content/tutorials/migrate-from-jekyll.md
index a797949a7..0fd5d4af7 100644
--- a/docs/content/tutorials/migrate-from-jekyll.md
+++ b/docs/content/tutorials/migrate-from-jekyll.md
@@ -46,7 +46,7 @@ The default is for Jekyll to publish to `_site` and for Hugo to publish to `publ
{
..
- "publishdir": "_site",
+ "publishDir": "_site",
..
}