Doc for other supported formats (external helpers)

As Hugo now supports more formats thanks to the new "external helpers"
feature recently introduced, and as requested by some people, I added
some lines in the doc:
* basically confirming it actually exists
* how to use it
This commit is contained in:
Baptiste Mathus 2015-08-01 23:50:39 +02:00 committed by Anthony Fok
parent 04b4c996ac
commit 7a681035ce
3 changed files with 33 additions and 6 deletions

View file

@ -6,14 +6,14 @@ linktitle: Organization
menu: menu:
main: main:
parent: content parent: content
next: /content/front-matter next: /content/supported-formats
prev: /overview/source-directory prev: /overview/source-directory
title: Content Organization title: Content Organization
weight: 10 weight: 10
toc: true toc: true
--- ---
Hugo uses Markdown files with headers commonly called the *front matter*. Hugo Hugo uses files (see [supported formats](/content/supported-formats/)) with headers commonly called the *front matter*. Hugo
respects the organization that you provide for your content to minimize any respects the organization that you provide for your content to minimize any
extra configuration, though this can be overridden by additional configuration extra configuration, though this can be overridden by additional configuration
in the front matter. in the front matter.
@ -30,7 +30,7 @@ in Hugo and is used as the [section](/content/sections/).
├── post ├── post
| ├── firstpost.md // <- http://1.com/post/firstpost/ | ├── firstpost.md // <- http://1.com/post/firstpost/
| ├── happy | ├── happy
| | └── ness.md // <- http://1.com/post/happy/ness/ | | └── ness.ad // <- http://1.com/post/happy/ness/
| └── secondpost.md // <- http://1.com/post/secondpost/ | └── secondpost.md // <- http://1.com/post/secondpost/
└── quote └── quote
├── first.md // <- http://1.com/quote/first/ ├── first.md // <- http://1.com/quote/first/
@ -43,7 +43,7 @@ in Hugo and is used as the [section](/content/sections/).
├── post ├── post
| ├── firstpost.md // <- http://1.com/post/firstpost.html | ├── firstpost.md // <- http://1.com/post/firstpost.html
| ├── happy | ├── happy
| | └── ness.md // <- http://1.com/post/happy/ness.html | | └── ness.ad // <- http://1.com/post/happy/ness.html
| └── secondpost.md // <- http://1.com/post/secondpost.html | └── secondpost.md // <- http://1.com/post/secondpost.html
└── quote └── quote
├── first.md // <- http://1.com/quote/first.html ├── first.md // <- http://1.com/quote/first.html

View file

@ -0,0 +1,26 @@
---
aliases:
- /doc/supported-formats/
date: 2015-08-01
menu:
main:
parent: content
next: /content/front-matter
prev: /content/organization
title: Supported Formats
weight: 15
toc: true
---
Since 0.14, Hugo has defined a new concept called _external helpers_. It means that you can write your content using Asciidoc[tor], or reStructuredText. If you have files with associated extensions ([details](https://github.com/spf13/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65)), then Hugo will call external commands to generate the content.
This means that you will have to install the associated tool on your machine to be able to use those formats.
For example, for Asciidoc files, Hugo will try to call __asciidoctor__ or __asciidoc__ command.
To use those formats, just use the standard extension and the front matter exactly as you would do with natively supported _.md_ files.
Notes:
* as these are external commands, generation performance for that content will heavily depend on the performance of those external tools.
* this feature is still in early stage, hence feedback is even more welcome.

View file

@ -85,7 +85,7 @@ links work properly with most hosting companies.
## What does Hugo do? ## What does Hugo do?
In technical terms, Hugo takes a source directory of Markdown files and In technical terms, Hugo takes a source directory of files and
templates and uses these as input to create a complete website. templates and uses these as input to create a complete website.
Hugo boasts the following features: Hugo boasts the following features:
@ -114,7 +114,8 @@ Hugo boasts the following features:
### Content ### Content
* Content written in [Markdown](/content/example/) * Native support for content written in [Markdown](/content/example/)
* Support for other languages through _external helpers_, see [supported formats](/content/supported-formats)
* Support for TOML, YAML and JSON metadata in [frontmatter](/content/front-matter/) * Support for TOML, YAML and JSON metadata in [frontmatter](/content/front-matter/)
* Completely [customizable homepage](/layout/homepage/) * Completely [customizable homepage](/layout/homepage/)
* Support for multiple [content types](/content/types/) * Support for multiple [content types](/content/types/)