summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-31 09:21:24 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-31 09:21:24 +0200
commit1c18f3fc49051fe75604b804e514be7e15712526 (patch)
tree707f38033fc6033436c70eb6baa179728ca18817 /docs
parentcb9dfc2613ae5125cafa450097fb0f62dd3770e7 (diff)
parent50ec65fbe1a48475d3320775dab2c47389c02114 (diff)
Diffstat (limited to 'docs')
-rw-r--r--docs/README.md4
-rw-r--r--docs/archetypes/default.md10
-rw-r--r--docs/archetypes/functions.md17
-rw-r--r--docs/archetypes/showcase.md13
-rw-r--r--docs/archetypes/tutorials.md16
-rw-r--r--docs/config.toml10
-rw-r--r--docs/content/_index.md2
-rw-r--r--docs/content/about/roadmap.md2
-rw-r--r--docs/content/content-management/archetypes.md20
-rw-r--r--docs/content/content-management/formats.md2
-rw-r--r--docs/content/content-management/multilingual.md2
-rw-r--r--docs/content/content-management/shortcodes.md42
-rw-r--r--docs/content/content-management/taxonomies.md6
-rw-r--r--docs/content/contribute/documentation.md42
-rw-r--r--docs/content/functions/base64.md6
-rw-r--r--docs/content/functions/default.md6
-rw-r--r--docs/content/functions/delimit.md12
-rw-r--r--docs/content/functions/eq.md2
-rw-r--r--docs/content/functions/ge.md25
-rw-r--r--docs/content/functions/gt.md25
-rw-r--r--docs/content/functions/le.md25
-rw-r--r--docs/content/functions/lt.md25
-rw-r--r--docs/content/functions/ne.md25
-rw-r--r--docs/content/functions/replacere.md2
-rw-r--r--docs/content/functions/safeURL.md12
-rw-r--r--docs/content/functions/shuffle.md6
-rw-r--r--docs/content/functions/slice.md2
-rw-r--r--docs/content/functions/urlize.md6
-rw-r--r--docs/content/getting-started/installing.md43
-rw-r--r--docs/content/getting-started/quick-start.md512
-rw-r--r--docs/content/getting-started/usage.md2
-rw-r--r--docs/content/news/http2-server-push-in-hugo.md79
-rw-r--r--docs/content/news/press-and-articles.md28
-rw-r--r--docs/content/news/release-notes.md981
-rw-r--r--docs/content/templates/data-templates.md4
-rw-r--r--docs/content/templates/lists.md4
-rw-r--r--docs/content/templates/menu-templates.md4
-rw-r--r--docs/content/templates/taxonomy-templates.md2
-rw-r--r--docs/content/themes/creating.md2
-rw-r--r--docs/content/tools/syntax-highlighting.md6
-rw-r--r--docs/content/variables/page.md6
-rw-r--r--docs/data/docs.json10
-rw-r--r--docs/layouts/shortcodes/articlelist.html18
-rw-r--r--docs/layouts/shortcodes/asciicast.html2
-rw-r--r--docs/layouts/shortcodes/output.html5
-rw-r--r--docs/static/_headers5
-rw-r--r--docs/static/images/blog/hugo-http2-push.pngbin0 -> 20544 bytes
-rw-r--r--docs/static/images/gohugoio-card-1.pngbin0 -> 73881 bytes
-rw-r--r--docs/temp/0.22.1-relnotes.md34
m---------docs/themes/gohugoioTheme0
50 files changed, 375 insertions, 1739 deletions
diff --git a/docs/README.md b/docs/README.md
index eba081c96..c482ff630 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -27,8 +27,10 @@ git submodule update --init
Also note that the documentation version for a given version of Hugo can also be found in the `/docs` sub-folder of the [Hugo source repository](https://github.com/gohugoio/hugo).
Then to view the docs in your browser, run Hugo and open up the link:
+
```bash
-hugo serve
+▶ hugo server
+
Started building sites ...
.
.
diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md
index e325a7d99..0b7f8fdbf 100644
--- a/docs/archetypes/default.md
+++ b/docs/archetypes/default.md
@@ -1,13 +1,11 @@
---
-linktitle: ""
+title: "{{ replace .TranslationBaseName "-" " " | title }}"
+date: {{ .Date }}
description: ""
-godocref: ""
-publishdate: ""
-lastmod: ""
categories: []
-tags: []
-weight: 00
+#tags: []
slug: ""
aliases: []
toc: false
+draft: true
---
diff --git a/docs/archetypes/functions.md b/docs/archetypes/functions.md
deleted file mode 100644
index 0a5dd344f..000000000
--- a/docs/archetypes/functions.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-linktitle: ""
-description: ""
-godocref: ""
-publishdate: ""
-lastmod: ""
-categories: [functions]
-tags: []
-ns: ""
-signature: []
-workson: []
-hugoversion: ""
-aliases: []
-relatedfuncs: []
-toc: false
-deprecated: false
---- \ No newline at end of file
diff --git a/docs/archetypes/showcase.md b/docs/archetypes/showcase.md
deleted file mode 100644
index 562fb9e8e..000000000
--- a/docs/archetypes/showcase.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-description: ""
-lastmod: ""
-license: ""
-licenseLink: ""
-sitelink: ""
-sourcelink: ""
-categories: [showcase]
-tags: []
-image: ""
-toc: false
-notesforauthors: "Go to gohugo.io/contribute/documentation for more info"
---- \ No newline at end of file
diff --git a/docs/archetypes/tutorials.md b/docs/archetypes/tutorials.md
deleted file mode 100644
index 0a3540c0f..000000000
--- a/docs/archetypes/tutorials.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-linktitle: ""
-description: ""
-godocref: ""
-publishdate: ""
-lastmod: ""
-categories: [tutorials]
-tags: []
-author: ""
-authorurl: ""
-originalurl: ""
-draft: false
-aliases: []
-notesforauthors: "Go to gohugo.io/contribute/documentation for more info."
----
-
diff --git a/docs/config.toml b/docs/config.toml
index 08c72176f..61df5b873 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -6,7 +6,7 @@ enableEmoji = true
footnotereturnlinkcontents = "↩"
languageCode = "en-us"
metaDataFormat = "yaml"
-title = "Hugo: A Fast and Flexible Website Generator"
+title = "Hugo"
theme = "gohugoioTheme"
googleAnalytics = "UA-7131036-4"
@@ -25,7 +25,7 @@ pygmentsCodeFences = true
pygmentsStyle = "friendly"
[outputs]
-home = [ "HTML", "RSS", "REDIR" ]
+home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
section = [ "HTML", "RSS"]
[mediaTypes]
@@ -39,7 +39,11 @@ mediatype = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true
-
+[outputFormats.HEADERS]
+mediatype = "text/netlify"
+baseName = "_headers"
+isPlainText = true
+notAlternative = true
[social]
twitter = "GoHugoIO"
diff --git a/docs/content/_index.md b/docs/content/_index.md
index 3f9ad64a4..ec8883c44 100644
--- a/docs/content/_index.md
+++ b/docs/content/_index.md
@@ -1,5 +1,5 @@
---
-title: "Hugo: A Fast and Flexible Website Generator"
+title: "A Fast and Flexible Website Generator"
date: 2017-03-02T12:00:00-05:00
features:
- heading: Blistering Speed
diff --git a/docs/content/about/roadmap.md b/docs/content/about/roadmap.md
index 0bc0b02aa..b69126a89 100644
--- a/docs/content/about/roadmap.md
+++ b/docs/content/about/roadmap.md
@@ -44,7 +44,7 @@ Feel free to [contribute to Hugo's development][devcontribute], [improve Hugo's
[migrate]: /tools/migrations/
[milestones]: https://github.com/gohugoio/hugo/milestone/14
[newissue]: https://github.com/gohugoio/hugo/issues/
-[related forum thread]: https://disourse.gohugo.io/t/web-based-editor/155
+[related forum thread]: https://discourse.gohugo.io/t/web-based-editor/155
[themes]: /themes/
[themescontrib]: /contribute/themes/
[tutorials]: /tutorials
diff --git a/docs/content/content-management/archetypes.md b/docs/content/content-management/archetypes.md
index 9fc58139b..235de4ff2 100644
--- a/docs/content/content-management/archetypes.md
+++ b/docs/content/content-management/archetypes.md
@@ -29,6 +29,8 @@ See above
**Archetypes** are content files in the [archetypes directory][] of your project that contain preconfigured [front matter][] for your website's [content types][]. Archetypes facilitate consistent metadata across your website content and allow content authors to quickly generate instances of a content type via the `hugo new` command.
+{{< youtube S3Tj3UcTFz8 >}}
+
The `hugo new` generator for archetypes assumes your working directory is the content folder at the root of your project. Hugo is able to infer the appropriate archetype by assuming the content type from the content section passed to the CLI command:
```
@@ -47,15 +49,13 @@ To override the content type Hugo infers from `[content-section]`, add the `--ki
Running this command in a new site that does not have default or custom archetypes will create the following file:
-{{% output file="content/posts/my-first-post.md" %}}
-```
+{{< output file="content/posts/my-first-post.md" >}}
+++
date = "2017-02-01T19:20:04-07:00"
title = "my first post"
draft = true
+++
-```
-{{% /output %}}
+{{< /output >}}
{{% note %}}
In this example, if you do not already have a `content/posts` directory, Hugo will create both `content/posts/` and `content/posts/my-first-post.md` for you.
@@ -119,16 +119,14 @@ $ hugo new posts/my-new-post.md
Hugo then creates a new markdown file with the following front matter:
-{{% output file="content/posts/my-new-post.md" %}}
-```
+{{< output file="content/posts/my-new-post.md" >}}
+++
categories = ["web development"]
date = "2017-02-01T19:20:04-07:00"
tags = ["golang", "hugo"]
title = "my new post"
+++
-```
-{{% /output %}}
+{{< /output >}}
We see that the `title` and `date` key-values have been added in addition to the `tags` and `categories` key-values from `archetypes/default.md`.
@@ -160,8 +158,7 @@ $ hugo new posts/post-from-custom.md
This time, Hugo recognizes our custom `archetypes/posts.md` archetype and uses it instead of `archetypes/default.md`. The generated file will now include the full list of front matter parameters, as well as the base archetype's `title` and `date`:
-{{% output file="content/posts/post-from-custom-archetype.md" %}}
-```
+{{< output file="content/posts/post-from-custom-archetype.md" >}}
+++
categories = ""
date = 2017-02-13T17:24:43-08:00
@@ -169,8 +166,7 @@ description = ""
tags = ""
title = "post from custom archetype"
+++
-```
-{{% /output %}}
+{{< /output >}}
### Hugo Docs Custom Archetype
diff --git a/docs/content/content-management/formats.md b/docs/content/content-management/formats.md
index be84e7cf4..c2837ffc4 100644
--- a/docs/content/content-management/formats.md
+++ b/docs/content/content-management/formats.md
@@ -100,7 +100,7 @@ In the event that you want to only use Mmark in specific files, you can also def
---
title: My Post
date: 2017-04-01
-markdown: mmark
+markup: mmark
---
```
diff --git a/docs/content/content-management/multilingual.md b/docs/content/content-management/multilingual.md
index e3c65a26d..958634c58 100644
--- a/docs/content/content-management/multilingual.md
+++ b/docs/content/content-management/multilingual.md
@@ -95,7 +95,7 @@ Translated articles are identified by the name of the content file.
1. `/content/about.en.md`
2. `/content/about.fr.md`
-In this eample, the `about.md` will be assigned the configured `defaultContentLanguage`.
+In this example, the `about.md` will be assigned the configured `defaultContentLanguage`.
1. `/content/about.md`
2. `/content/about.fr.md`
diff --git a/docs/content/content-management/shortcodes.md b/docs/content/content-management/shortcodes.md
index 3482d6722..a4424a996 100644
--- a/docs/content/content-management/shortcodes.md
+++ b/docs/content/content-management/shortcodes.md
@@ -95,16 +95,14 @@ The `figure` shortcode can use the following named parameters:
#### Example `figure` Output
-{{% output file="figure-output-example.html" %}}
-```
+{{< output file="figure-output-example.html" >}}
<figure>
<img src="/media/spf13.jpg" />
<figcaption>
<h4>Steve Francia</h4>
</figcaption>
</figure>
-```
-{{% /output %}}
+{{< /output >}}
### `gist`
@@ -130,11 +128,9 @@ If the gist contains several files and you want to quote just one of them, you c
#### Example `gist` Output
-{{% output file="gist-output.html" %}}
-```
+{{< output file="gist-output.html" >}}
{{< gist spf13 7896402 >}}
-```
-{{% /output %}}
+{{< /output >}}
#### Example `gist` Display
@@ -165,8 +161,7 @@ This shortcode will convert the source code provided into syntax-highlighted HTM
The `highlight` shortcode example above would produce the following HTML when the site is rendered:
-{{% output file="tutorials/learn-html/index.html" %}}
-```
+{{< output file="tutorials/learn-html/index.html" >}}
<span style="color: #f92672">&lt;section</span> <span style="color: #a6e22e">id=</span><span style="color: #e6db74">&quot;main&quot;</span><span style="color: #f92672">&gt;</span>
<span style="color: #f92672">&lt;div&gt;</span>
<span style="color: #f92672">&lt;h1</span> <span style="color: #a6e22e">id=</span><span style="color: #e6db74">&quot;title&quot;</span><span style="color: #f92672">&gt;</span>{{ .Title }}<span style="color: #f92672">&lt;/h1&gt;</span>
@@ -175,8 +170,7 @@ The `highlight` shortcode example above would produce the following HTML when th
{{ end }}
<span style="color: #f92672">&lt;/div&gt;</span>
<span style="color: #f92672">&lt;/section&gt;</span>
-```
-{{% /output %}}
+{{< /output >}}
{{% note "More on Syntax Highlighting" %}}
To see even more options for adding syntax-highlighted code blocks to your website, see [Syntax Highlighting in Developer Tools](/tools/syntax-highlighting/).
@@ -206,11 +200,9 @@ You also have the option to hide the caption:
By adding the preceding `hidecaption` example, the following HTML will be added to your rendered website's markup:
-{{% output file="instagram-hide-caption-output.html" %}}
-```
+{{< output file="instagram-hide-caption-output.html" >}}
{{< instagram BWNjjyYFxVx hidecaption >}}
-```
-{{% /output %}}
+{{< /output >}}
#### Example `instagram` Display
@@ -265,11 +257,9 @@ Extract the value from the field `data-id` and pass it to the shortcode:
#### `speakerdeck` Example Output
-{{% output file="speakerdeck-example-input.md" %}}
-```
+{{< output file="speakerdeck-example-input.md" >}}
{{< speakerdeck 4e8126e72d853c0060001f97 >}}
-```
-{{% /output %}}
+{{< /output >}}
#### `speakerdeck` Example Display
@@ -297,11 +287,9 @@ Pass the tweet's ID from the URL as a parameter to the `tweet` shortcode:
Using the preceding `tweet` example, the following HTML will be added to your rendered website's markup:
-{{% output file="example-tweet-output.html" %}}
-```
+{{< output file="example-tweet-output.html" >}}
{{< tweet 877500564405444608 >}}
-```
-{{% /output %}}
+{{< /output >}}
#### Example `tweet` Display
@@ -329,11 +317,9 @@ Extract the ID from the video's URL and pass it to the `vimeo` shortcode:
Using the preceding `vimeo` example, the following HTML will be added to your rendered website's markup:
-{{% output file="example-vimeo-output.html" %}}
-```
+{{< output file="example-vimeo-output.html" >}}
{{< vimeo 146022717 >}}
-```
-{{% /output %}}
+{{< /output >}}
{{% tip %}}
If you want to further customize the visual styling of the YouTube or Vimeo output, add a `class` named parameter when calling the shortcode. The new `class` will be added to the `<div>` that wraps the `<iframe>` *and* will remove the inline styles. Note that you will need to call the `id` as a named parameter as well.
diff --git a/docs/content/content-management/taxonomies.md b/docs/content/content-management/taxonomies.md
index fcefa5c80..b2f785056 100644
--- a/docs/content/content-management/taxonomies.md
+++ b/docs/content/content-management/taxonomies.md
@@ -32,6 +32,8 @@ Term
Value
: a piece of content assigned to a term
+{{< youtube "-np9GX6cL38" >}}
+
## Example Taxonomy: Movie Website
Let's assume you are making a website about movies. You may want to include the following taxonomies:
@@ -92,7 +94,7 @@ disableKinds = ["taxonomy","taxonomyTerm"]
### Default Destinations
-When taxonomies are used---and [taxonomy templates][] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your your configuration and used in your content front matter will create the following pages:
+When taxonomies are used---and [taxonomy templates][] are provided---Hugo will automatically create both a page listing all the taxonomy's terms and individual pages with lists of content associated with each term. For example, a `categories` taxonomy declared in your configuration and used in your content front matter will create the following pages:
* A single page at `example.com/categories/` that lists all the [terms within the taxonomy][]
* [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter][]
@@ -163,7 +165,7 @@ project_url = "https://github.com/gohugoio/hugo"
title: "Hugo: A fast and flexible static site generator"
#tags: ["Development", "Go", "fast", "Blogging"]
categories: ["Development"]
-categories: ["Go Web Dev"]
+series: ["Go Web Dev"]
slug: "hugo"
project_url: "https://github.com/gohugoio/hugo"
---
diff --git a/docs/content/contribute/documentation.md b/docs/content/contribute/documentation.md
index c2e06dcaf..80d7ad8d3 100644
--- a/docs/content/contribute/documentation.md
+++ b/docs/content/contribute/documentation.md
@@ -38,10 +38,6 @@ Adding new content to the Hugo docs follows the same pattern, regardless of the
hugo new <DOCS-SECTION>/<new-content-lowercase>.md
```
-{{% note "`title:`, `date:`, and Field Order" %}}
-`title` and `date` fields are added automatically when using archetypes via `hugo new`. Do not be worried if the order of the new file's front matter fields on your local machine is different than that of the examples provided in the Hugo docs. This is a known issue [(#452)](https://github.com/gohugoio/hugo/issues/452).
-{{% /note %}}
-
### Add a New Function
Once you have cloned the Hugo repository, you can create a new function via the following command. Keep the file name lowercase.
@@ -92,20 +88,6 @@ Here is a review of the front matter fields automatically generated for you usin
In the body of your function, expand the short description used in the front matter. Include as many examples as possible, and leverage the Hugo docs [`code` shortcode](#adding-code-blocks). If you are unable to add examples but would like to solicit help from the Hugo community, add `needsexample: true` to your front matter.
-### Add a New Tutorial
-
-Once you have cloned the Hugo repository, you can create a new tutorial via the following command. Name the markdown file accordingly:
-
-```
-hugo new tutorials/my-new-tutorial.md
-```
-
-The archetype for the `tutorials` content type is as follows:
-
-{{< code file="archetypes/tutorials.md" >}}
-{{< readfile file="/themes/gohugoioTheme/archetypes/tutorials.md">}}
-{{< /code >}}
-
## Add Code Blocks
<