summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md28
-rw-r--r--docs/content/content/archetypes.md20
-rw-r--r--docs/content/content/example.md4
-rw-r--r--docs/content/content/front-matter.md13
-rw-r--r--docs/content/content/ordering.md12
-rw-r--r--docs/content/content/types.md12
-rw-r--r--docs/content/extras/aliases.md4
-rw-r--r--docs/content/extras/comments.md4
-rw-r--r--docs/content/extras/highlighting.md12
-rw-r--r--docs/content/extras/menus.md6
-rw-r--r--docs/content/extras/permalinks.md28
-rw-r--r--docs/content/extras/toc.md4
-rw-r--r--docs/content/overview/configuration.md4
-rw-r--r--docs/content/overview/introduction.md24
-rw-r--r--docs/content/overview/source-directory.md8
-rw-r--r--docs/content/overview/usage.md2
-rw-r--r--docs/content/templates/404.md6
-rw-r--r--docs/content/templates/content.md14
-rw-r--r--docs/content/templates/functions.md40
-rw-r--r--docs/content/templates/go-templates.md105
-rw-r--r--docs/content/templates/homepage.md12
-rw-r--r--docs/content/templates/list.md26
-rw-r--r--docs/content/templates/partials.md30
-rw-r--r--docs/content/templates/rss.md16
-rw-r--r--docs/content/templates/terms.md20
-rw-r--r--docs/content/templates/views.md8
-rw-r--r--docs/content/tutorials/github_pages_blog.md10
-rw-r--r--docs/content/tutorials/mathjax.md10
-rw-r--r--docs/content/tutorials/migrate-from-jekyll.md24
-rwxr-xr-xdocs/layouts/index.html2
-rw-r--r--main.go2
31 files changed, 258 insertions, 252 deletions
diff --git a/README.md b/README.md
index fd77853ed..7afd97aad 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,9 @@ and [friends](http://github.com/spf13/hugo/graphs/contributors) in Go.
Hugo is a static site generator written in Go. It is optimized for
speed, easy use and configurability. Hugo takes a directory with content and
-templates and renders them into a full html website.
+templates and renders them into a full HTML website.
-Hugo makes use of markdown files with front matter for meta data.
+Hugo makes use of Markdown files with front matter for meta data.
A typical website of moderate size can be
rendered in a fraction of a second. A good rule of thumb is that Hugo
@@ -26,21 +26,21 @@ kind of website including blogs, tumbles and docs.
## Installing Hugo
-Hugo is written in Go with support for Windows, Linux, FreeBSD and OSX.
+Hugo is written in Go with support for Windows, Linux, FreeBSD and OS X.
The latest release can be found at [hugo releases](https://github.com/spf13/hugo/releases).
-We currently build for Windows, Linux, FreeBSD and OS X for x64
-and 386 architectures.
+We currently build for Windows, Linux, FreeBSD and OS X for x64
+and i386 architectures.
### Installing Hugo (binary)
Installation is very easy. Simply download the appropriate version for your
-platform from [hugo releases](https://github.com/spf13/hugo/releases).
-Once downloaded it can be run from anywhere. You don't need to install
+platform from [Hugo Releases](https://github.com/spf13/hugo/releases).
+Once downloaded, it can be run from anywhere. You don't need to install
it into a global location. This works well for shared hosts and other systems
where you don't have a privileged account.
-Ideally you should install it somewhere in your path for easy use. `/usr/local/bin`
+Ideally, you should install it somewhere in your path for easy use. `/usr/local/bin`
is the most probable location.
*The Hugo executable has no external dependencies.*
@@ -60,17 +60,17 @@ is the most probable location.
cd hugo
go get
-Because go expects all of your libraries to be found in either $GOROOT or $GOPATH,
+Because Go expects all of your libraries to be found in either $GOROOT or $GOPATH,
it's helpful to symlink the project to one of the following paths:
- * ln -s /path/to/your/hugo $GOPATH/src/github.com/spf13/hugo
- * ln -s /path/to/your/hugo $GOROOT/src/pkg/github.com/spf13/hugo
+ * `ln -s /path/to/your/hugo $GOPATH/src/github.com/spf13/hugo`
+ * `ln -s /path/to/your/hugo $GOROOT/src/pkg/github.com/spf13/hugo`
-#### Get directly from Github:
+#### Get directly from GitHub:
If you only want to build from source, it's even easier.
- go get github.com/spf13/hugo
+ go get -v github.com/spf13/hugo
#### Building Hugo
@@ -93,7 +93,7 @@ We welcome your contributions. To make the process as seamless as possible, we
* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
* Run `go fmt`
* Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
- * Make sure `go test ./...` passes, and go build completes. Our Travis CI loop will catch most things that are missing. The exception: Windows. We run on windows from time to time, but if you have access please check on a Windows machine too.
+ * Make sure `go test ./...` passes, and go build completes. Our Travis CI loop will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too.
**Complete documentation is available at [Hugo Documentation](http://hugo.spf13.com).**
diff --git a/docs/content/content/archetypes.md b/docs/content/content/archetypes.md
index 9004542ef..5c0743120 100644
--- a/docs/content/content/archetypes.md
+++ b/docs/content/content/archetypes.md
@@ -29,9 +29,9 @@ I use ‘tags’ and ‘categories’ for my taxonomies.
+++
-## using archetypes
+## Using archetypes
-If I wanted to create a new post in the `posts` section I would run the following command...
+If I wanted to create a new post in the `posts` section, I would run the following command:
`hugo new posts/my-new-post.md`
@@ -49,7 +49,7 @@ Hugo would create the file with the following contents:
## Using a different front matter format
-By default the front matter will be created in the TOML format
+By default, the front matter will be created in the TOML format
regardless of what format the archetype is using.
You can specify a different default format in your config file using
@@ -60,15 +60,15 @@ the `MetaDataFormat` directive. Possible values are `toml`, `yaml` and `json`.
The following rules apply:
-* If an archetype with a filename that matches the content type being created it will be used.
-* If no match is found `archetypes/default.md` will be used.
-* If neither are present and a theme is in use then within the theme...
- * If an archetype with a filename that matches the content type being created it will be used.
- * If no match is found `archetypes/default.md` will be used.
-* If no archetype files are present then the one that ships with hugo will be used.
+* If an archetype with a filename that matches the content type being created, it will be used.
+* If no match is found, `archetypes/default.md` will be used.
+* If neither are present and a theme is in use, then within the theme:
+ * If an archetype with a filename that matches the content type being created, it will be used.
+ * If no match is found, `archetypes/default.md` will be used.
+* If no archetype files are present, then the one that ships with Hugo will be used.
Hugo provides a simple archetype which sets the title (based on the
-file name) and the date based on now().
+file name) and the date based on `now()`.
Content type is automatically detected based on the path. You are welcome to declare which
type to create using the `--kind` flag during creation.
diff --git a/docs/content/content/example.md b/docs/content/content/example.md
index d4934871c..ff008308a 100644
--- a/docs/content/content/example.md
+++ b/docs/content/content/example.md
@@ -13,9 +13,9 @@ title: Example Content File
weight: 70
---
-Somethings are better shown than explained. The following is a very basic example of a content file:
+Some things are better shown than explained. The following is a very basic example of a content file:
-**mysite/project/nitro.md <- http://mysite.com/project/nitro.html**
+**mysite/project/nitro.md ← http://mysite.com/project/nitro.html**
---
Title: "Nitro : A quick and simple profiler for Go"
diff --git a/docs/content/content/front-matter.md b/docs/content/content/front-matter.md
index 26fef3b40..c0ad1514c 100644
--- a/docs/content/content/front-matter.md
+++ b/docs/content/content/front-matter.md
@@ -13,12 +13,13 @@ weight: 20
The front matter is one of the features that gives Hugo its strength. It enables
you to include the meta data of the content right with it. Hugo supports a few
-different formats each with their own identifying tokens.
+different formats, each with their own identifying tokens.
-Supported formats: <br>
- **YAML**, identified by '\-\-\-'. <br>
- **TOML**, indentified with '+++'.<br>
- **JSON**, a single JSON object which is surrounded by '{' and '}' each on their own line.
+Supported formats:
+
+ * **YAML**, identified by '`---`'.
+ * **TOML**, identified with '`+++`'.
+ * **JSON**, a single JSON object which is surrounded by '`{`' and '`}`', each on their own line.
### YAML Example
@@ -68,7 +69,7 @@ Supported formats: <br>
There are a few predefined variables that Hugo is aware of and utilizes. The user can also create
any variable they want to. These will be placed into the `.Params` variable available to the templates.
-Field names are always normalized to lowercase (eg. `camelCase: true` is available as `.Params.camelcase`).
+Field names are always normalized to lowercase (e.g. `camelCase: true` is available as `.Params.camelcase`).
### Required
diff --git a/docs/content/content/ordering.md b/docs/content/content/ordering.md
index 009f6101a..5190d777b 100644
--- a/docs/content/content/ordering.md
+++ b/docs/content/content/ordering.md
@@ -13,15 +13,15 @@ weight: 60
Hugo provides you with all the flexibility you need to organize how your content is ordered.
By default, content is ordered by weight, then by date with the most
-recent date first, but alternative sorting (by title and linktitle) is
-also available. The order the content will appear will be specified in
+recent date first, but alternative sorting (by `title` and `linktitle`) is
+also available. The order the content would appear is specified in
the [list template](/templates/list).
-_Both the date and weight fields are optional._
+_Both the `date` and `weight` fields are optional._
Unweighted pages appear at the end of the list. If no weights are provided (or
-if weights are the same) date will be used to sort. If neither are provided
-content will be ordered based on how it's read off the disk and no order is
+if weights are the same), `date` will be used to sort. If neither is provided,
+content will be ordered based on how it's read off the disk, and no order is
guaranteed.
## Assigning weight to content
@@ -36,4 +36,4 @@ guaranteed.
## Ordering Content Within Taxonomies
-Please see the [Taxonomy Ordering Documentation](/taxonomies/ordering/)
+Please see the [Taxonomy Ordering Documentation](/taxonomies/ordering/).
diff --git a/docs/content/content/types.md b/docs/content/content/types.md
index 2e8a3c8ce..ef259d2ff 100644
--- a/docs/content/content/types.md
+++ b/docs/content/content/types.md
@@ -14,7 +14,7 @@ Hugo has full support for different types of content. A content type can have a
unique set of meta data, template and can be automatically created by the new
command through using content [archetypes](/content/archetypes).
-A good example of when multiple types are needed is to look at Tumblr. A piece
+A good example of when multiple types are needed is to look at [Tumblr](https://www.tumblr.com/). A piece
of content could be a photo, quote or post, each with different meta data and
rendered differently.
@@ -22,7 +22,7 @@ rendered differently.
Hugo assumes that your site will be organized into [sections](/content/sections)
and each section will use the corresponding type. If you are taking advantage of
-this then each new piece of content you place into a section will automatically
+this, then each new piece of content you place into a section will automatically
inherit the type.
Alternatively you can set the type in the meta data under the key "type".
@@ -34,11 +34,11 @@ Hugo has the ability to create a new content file and populate the front matter
with the data set corresponding to that type. Hugo does this by utilizing
[archetypes](/content/archetypes).
-To create a new piece of content use:
+To create a new piece of content, use:
hugo new relative/path/to/content.md
-For example if I wanted to create a new post inside the post section I would type:
+For example, if I wanted to create a new post inside the post section, I would type:
hugo new post/my-newest-post.md
@@ -53,13 +53,13 @@ whenever a specific file is not present.
*Remember, all of the following are optional:*
### Create Type Directory
-Create a directory with the name of the type in layouts.Type is always singular. *Eg /layouts/post*.
+Create a directory with the name of the type in layouts. Type is always singular. *Eg /layouts/post*.
### Create single template
Create a file called single.html inside your directory. *Eg /layouts/post/single.html*.
### Create list template
-Create a file called list.html inside your directory *Eg /layouts/post/list.html*.
+Create a file called list.html inside your directory. *Eg /layouts/post/list.html*.
### Create views
Many sites support rendering content in a few different ways, for
diff --git a/docs/content/extras/aliases.md b/docs/content/extras/aliases.md
index 936666983..1822135e2 100644
--- a/docs/content/extras/aliases.md
+++ b/docs/content/extras/aliases.md
@@ -13,7 +13,7 @@ title: Aliases
weight: 10
---
-For people migrating existing published content to Hugo there's a good chance
+For people migrating existing published content to Hugo, there's a good chance
you need a mechanism to handle redirecting old URLs.
Luckily, this can be handled easily with aliases in Hugo.
@@ -27,7 +27,7 @@ Luckily, this can be handled easily with aliases in Hugo.
- /2010/even-earlier-url.html
---
-Now when you go to any of the aliases locations they
+Now when you go to any of the aliases locations, they
will redirect to the page.
## Important Behaviors
diff --git a/docs/content/extras/comments.md b/docs/content/extras/comments.md
index 2b8cce7c4..9f7040f86 100644
--- a/docs/content/extras/comments.md
+++ b/docs/content/extras/comments.md
@@ -33,7 +33,7 @@ Simply include the following line where you want your comments to appear
## Configuring Disqus
-That template requires you to set a single value in your site config file, eg. config.yaml.
+That template requires you to set a single value in your site config file, e.g. config.yaml.
disqusShortname = "XYW"
@@ -73,7 +73,7 @@ Notice that there is a simple if statement that detects when you are running on
Now reference the partial template from your page template:
- {{ template "partials/disqus.html" . }}
+ {{ partial "disqus.html" . }}
# Alternatives
diff --git a/docs/content/extras/highlighting.md b/docs/content/extras/highlighting.md
index 89391f6f6..7c5ce3fa3 100644
--- a/docs/content/extras/highlighting.md
+++ b/docs/content/extras/highlighting.md
@@ -15,13 +15,13 @@ Hugo provides the ability for you to highlight source code in two different
ways &mdash; either pre-processed server side from your content, or to defer
the processing to the client side, using a JavaScript library. The advantage of
server side is that it doesn’t depend on a JavaScript library and consequently
-works very well when read from an rss feed. The advantage of client side is that
+works very well when read from an RSS feed. The advantage of client side is that
it doesn’t cost anything when building your site and some of the highlighting
-scripts available cover more languages than pygments does.
+scripts available cover more languages than Pygments does.
For the pre-processed approach, Highlighting is performed by an external
-python based program called [pygments](http://pygments.org) and is triggered
-via an embedded shortcode. If pygments is absent from the path, it will
+Python-based program called [Pygments](http://pygments.org) and is triggered
+via an embedded shortcode. If Pygments is absent from the path, it will
silently simply pass the content along unhighlighted.
## Server-side
@@ -83,7 +83,7 @@ a library and a corresponding theme. Some popular libraries are:
This example uses the popular [Highlight.js] library, hosted by [Yandex], a
popular Russian search engine.
-In your `./layouts/chrome/` folder, depending on your specific theme, there
+In your `./layouts/partials/` (or `./layouts/chrome/`) folder, depending on your specific theme, there
will be a snippet that will be included in every generated HTML page, such
as `header.html` or `header.includes.html`. Simply add:
@@ -98,4 +98,4 @@ You can of course use your own copy of these files, typically in `./static/`.
[Google Prettify]: https://code.google.com/p/google-code-prettify/
[Yandex]: http://yandex.ru/
-Please see individual libraries documentation for how to implement the JavaScript based libraries.
+Please see individual libraries documentation for how to implement the JavaScript-based libraries.
diff --git a/docs/content/extras/menus.md b/docs/content/extras/menus.md
index 6e06f4e42..3647e3977 100644
--- a/docs/content/extras/menus.md
+++ b/docs/content/extras/menus.md
@@ -22,7 +22,7 @@ Some of the features of Hugo Menus:
## What is a menu?
A menus is a named array of menu entries accessible on the site under
-`.Site.Menus` by name. For example if I have a menu called `main` I would
+`.Site.Menus` by name. For example, if I have a menu called `main`, I would
access it via `.Site.Menus.main`.
A menu entry has the following properties:
@@ -89,7 +89,7 @@ available.
You can also add entries to menus that aren’t attached to a piece of
content. This takes place in the site wide [config file](http://hugo.spf13.com/overview/configuration).
-Here’s an example (in toml):
+Here’s an example (in TOML):
[[menu.main]]
name = "about hugo"
@@ -101,7 +101,7 @@ Here’s an example (in toml):
pre = "<i class='fa fa-road'></i>"
weight = -100
-Here’s an example (in yaml):
+Here’s an example (in YAML):
---
menu:
diff --git a/docs/content/extras/permalinks.md b/docs/content/extras/permalinks.md
index 4018b37ed..ed95612e0 100644
--- a/docs/content/extras/permalinks.md
+++ b/docs/content/extras/permalinks.md
@@ -21,7 +21,7 @@ internal "canonical" location, such that template references to
`.RelPermalink` will honour the adjustments made as a result of the mappings
in this option.
-For instance, if one of your sections is called `post` and you want to adjust
+For instance, if one of your sections is called `post`, and you want to adjust
the canonical path to be hierarchical based on the year and month, then you
might use:
@@ -36,18 +36,18 @@ A file named `content/post/sample-entry` which contains a line
appearing at `public/2013/11/sample-entry/index.html` and be reachable via
the URL <http://yoursite.example.com/2013/11/sample-entry/>.
-The following is a list of values that can be used in a permalink definition,
-all references to time are dependent on the content's date.
+The following is a list of values that can be used in a permalink definition.
+All references to time are dependent on the content's date.
-**:year** the 4 digit year<br/>
-**:month** the 2 digit month<br/>
-**:monthname** the name of the month<br/>
-**:day** the 2 digit day<br/>
-**:weekday** the 1 digit day of the week (Sunday = 0)<br/>
-**:weekdayname** the name of the day of the week<br/>
-**:yearday** the 1-3 digit day of the year<br/>
-**:section** the content's section<br/>
-**:title** the content's title<br/>
-**:slug** the content's slug (or title if no slug)<br/>
-**:filename** the content's filename (without extension)<br/>
+ * **:year** the 4-digit year
+ * **:month** the 2-digit month
+ * **:monthname** the name of the month
+ * **:day** the 2-digit day
+ * **:weekday** the 1-digit day of the week (Sunday = 0)
+ * **:weekdayname** the name of the day of the week
+ * **:yearday** the 1- to 3-digit day of the year
+ * **:section** the content's section
+ * **:title** the content's title
+ * **:slug** the content's slug (or title if no slug)
+ * **:filename** the content's filename (without extension)
diff --git a/docs/content/extras/toc.md b/docs/content/extras/toc.md
index bd21545f7..68376e117 100644
--- a/docs/content/extras/toc.md
+++ b/docs/content/extras/toc.md
@@ -26,12 +26,12 @@ Hugo will take this Markdown and create a table of contents stored in the
This is example code of a [single.html template](/layout/content).
- {{ template "partials/header.html" . }}
+ {{ partial "header.html" . }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
<h1>{{ .Title }}</h1>
{{ .Content }}
- {{ template "partials/footer.html" . }}
+ {{ partial "footer.html" . }}
diff --git a/docs/content/overview/configuration.md b/docs/content/overview/configuration.md
index 4a499ca63..3b52c43ca 100644
--- a/docs/content/overview/configuration.md
+++ b/docs/content/overview/configuration.md
@@ -14,11 +14,11 @@ weight: 40
---
The directory structure and templates provide the majority of the
-configuration for a site. In fact a config file isn't even needed for many
+configuration for a site. In fact, a config file isn't even needed for many
websites since the defaults follow commonly used patterns.
Hugo expects to find the config file in the root of the source directory and
-will look there first for a `config.toml` file. If none is present it will
+will look there first for a `config.toml` file. If none is present, it will
then look for a `config.yaml` file, followed by a `config.json` file.
The config file is a site-wide config. The config file provides directions to
diff --git a/docs/content/overview/introduction.md b/docs/content/overview/introduction.md
index 0d409e332..4ac2ee337 100644
--- a/docs/content/overview/introduction.md
+++ b/docs/content/overview/introduction.md
@@ -12,17 +12,17 @@ weight: 5
## What is Hugo?
Hugo is a general-purpose website framework. Technically speaking, Hugo is
-a static site generator. This means that unlike systems like WordPress,
-Ghost and Drupal which run on your web server expensively building a page
+a static site generator. This means that, unlike systems like WordPress,
+Ghost and Drupal, which run on your web server expensively building a page
every time a visitor requests one, Hugo does the building when you create
your content. Since websites are viewed far more often then they are
edited, Hugo is optimized for website viewing while providing a great
writing experience.
Sites built with Hugo are extremely fast and very secure. Hugo sites can
-be hosted anywhere including Heroku, GoDaddy, GitHub pages, S3
-and Cloudfront and work well with CDNs. Hugo sites run without dependencies
-on expensive run times like Ruby, Python or PHP and without dependencies
+be hosted anywhere, including Heroku, GoDaddy, GitHub Pages, Amazon S3
+and CloudFront, and work well with CDNs. Hugo sites run without dependencies
+on expensive runtimes like Ruby, Python or PHP and without dependencies
on any databases.
We think of Hugo as the ideal website creation tool. With nearly instant
@@ -32,7 +32,7 @@ designing websites, but also very useful when creating content.
## What does Hugo do?
</