mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-20 17:32:34 +00:00
docs: add ToC to some more pages
This commit is contained in:
parent
be71fda559
commit
be4a404f28
17 changed files with 24 additions and 7 deletions
|
@ -7,6 +7,7 @@ next: /content/ordering
|
|||
prev: /content/types
|
||||
title: Archetypes
|
||||
weight: 50
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo v0.11 introduced the concept of a content builder. Using the
|
||||
|
|
|
@ -9,6 +9,7 @@ next: /content/sections
|
|||
prev: /content/organization
|
||||
title: Front Matter
|
||||
weight: 20
|
||||
toc: true
|
||||
---
|
||||
|
||||
The **front matter** is one of the features that gives Hugo its strength. It enables
|
||||
|
@ -25,7 +26,7 @@ Supported formats:
|
|||
[YAML]: http://www.yaml.org/ "YAML Ain't Markup Language"
|
||||
[JSON]: http://www.json.org/ "JavaScript Object Notation"
|
||||
|
||||
### TOML Example
|
||||
## TOML Example
|
||||
|
||||
+++
|
||||
title = "spf13-vim 3.0 release and new website"
|
||||
|
@ -41,7 +42,7 @@ Supported formats:
|
|||
|
||||
Content of the file goes Here
|
||||
|
||||
### YAML Example
|
||||
## YAML Example
|
||||
|
||||
---
|
||||
title: "spf13-vim 3.0 release and new website"
|
||||
|
@ -56,7 +57,7 @@ Supported formats:
|
|||
|
||||
Content of the file goes Here
|
||||
|
||||
### JSON Example
|
||||
## JSON Example
|
||||
|
||||
{
|
||||
"title": "spf13-vim 3.0 release and new website",
|
||||
|
|
|
@ -10,6 +10,7 @@ next: /content/front-matter
|
|||
prev: /overview/source-directory
|
||||
title: Content Organization
|
||||
weight: 10
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo uses Markdown files with headers commonly called the *front matter*. Hugo
|
||||
|
|
|
@ -8,6 +8,7 @@ next: /content/archetypes
|
|||
prev: /content/sections
|
||||
title: Content Types
|
||||
weight: 40
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo has full support for different types of content. A content type can have a
|
||||
|
|
|
@ -10,6 +10,7 @@ next: /taxonomies/templates
|
|||
prev: /taxonomies/usage
|
||||
title: Displaying Taxonomies
|
||||
weight: 20
|
||||
toc: true
|
||||
---
|
||||
|
||||
There are four common ways you can display the data in your
|
||||
|
|
|
@ -11,6 +11,7 @@ next: /taxonomies/methods
|
|||
prev: /taxonomies/templates
|
||||
title: Ordering Taxonomies
|
||||
weight: 60
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo provides the ability to both:
|
||||
|
@ -22,7 +23,7 @@ Hugo provides the ability to both:
|
|||
## Ordering Taxonomies
|
||||
Taxonomies can be ordered by either alphabetical key or by the number of content pieces assigned to that key.
|
||||
|
||||
### Order Alphabetically Example:
|
||||
### Order Alphabetically Example
|
||||
|
||||
<ul>
|
||||
{{ $data := .Data }}
|
||||
|
@ -31,7 +32,7 @@ Taxonomies can be ordered by either alphabetical key or by the number of content
|
|||
{{ end }}
|
||||
</ul>
|
||||
|
||||
### Order by Popularity Example:
|
||||
### Order by Popularity Example
|
||||
|
||||
<ul>
|
||||
{{ $data := .Data }}
|
||||
|
|
|
@ -10,6 +10,7 @@ next: /templates/list
|
|||
prev: /templates/variables
|
||||
title: Single Content Template
|
||||
weight: 30
|
||||
toc: true
|
||||
---
|
||||
|
||||
The primary view of content in Hugo is the single view. Hugo, for every
|
||||
|
@ -61,7 +62,7 @@ same as the other types, but the directory must be called "\_default".
|
|||
single.html
|
||||
|
||||
|
||||
## post/single.html
|
||||
### post/single.html
|
||||
This content template is used for [spf13.com](http://spf13.com/).
|
||||
It makes use of [partial templates](/templates/partials/)
|
||||
|
||||
|
@ -109,7 +110,7 @@ It makes use of [partial templates](/templates/partials/)
|
|||
{{ partial "footer.html" . }}
|
||||
|
||||
|
||||
## project/single.html
|
||||
### project/single.html
|
||||
This content template is used for [spf13.com](http://spf13.com/).
|
||||
It makes use of [partial templates](/templates/partials/)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ next: /templates/ace
|
|||
prev: /templates/overview
|
||||
title: Go Template Primer
|
||||
weight: 15
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for
|
||||
|
|
|
@ -10,6 +10,7 @@ next: /templates/homepage
|
|||
prev: /templates/content
|
||||
title: Content List Template
|
||||
weight: 40
|
||||
toc: true
|
||||
---
|
||||
|
||||
A list template is any template that will be used to render multiple pieces of
|
||||
|
|
|
@ -12,6 +12,7 @@ next: /templates/go-templates
|
|||
prev: /themes/creation
|
||||
title: Hugo Templates
|
||||
weight: 10
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo uses the excellent Go html/template library for its template engine.
|
||||
|
|
|
@ -9,6 +9,7 @@ next: /templates/rss
|
|||
prev: /templates/views
|
||||
title: Partial Templates
|
||||
weight: 80
|
||||
toc: true
|
||||
---
|
||||
|
||||
In practice, it's very convenient to split out common template portions into a
|
||||
|
|
|
@ -11,6 +11,7 @@ notoc: one
|
|||
prev: /templates/partials
|
||||
title: RSS (feed) Templates
|
||||
weight: 90
|
||||
toc: true
|
||||
---
|
||||
|
||||
Like all other templates, you can use a single RSS template to generate all of your RSS feeds, or you can create a specific template for each individual feed.
|
||||
|
|
|
@ -12,6 +12,7 @@ next: /templates/views
|
|||
prev: /templates/homepage
|
||||
title: Taxonomy Terms Template
|
||||
weight: 60
|
||||
toc: true
|
||||
---
|
||||
|
||||
A unique template is needed to create a list of the terms for a given
|
||||
|
|
|
@ -11,6 +11,7 @@ next: /templates/content
|
|||
prev: /templates/functions
|
||||
title: Template Variables
|
||||
weight: 20
|
||||
toc: true
|
||||
---
|
||||
|
||||
Hugo makes a set of values available to the templates. Go templates are context based. The following
|
||||
|
|
|
@ -9,6 +9,7 @@ next: /templates/partials
|
|||
prev: /templates/terms
|
||||
title: Content Views
|
||||
weight: 70
|
||||
toc: true
|
||||
---
|
||||
|
||||
In addition to the [single content template](/templates/content/), Hugo can render alternative views of
|
||||
|
|
|
@ -7,6 +7,7 @@ next: /themes/creation
|
|||
prev: /themes/usage
|
||||
title: Customizing a Theme
|
||||
weight: 40
|
||||
toc: true
|
||||
---
|
||||
|
||||
_The following are key concepts for Hugo site customization. Hugo permits you to **supplement or override** any theme template or static file, with files in your working directory._
|
||||
|
|
|
@ -7,6 +7,7 @@ menu:
|
|||
next: /tutorials/migrate-from-jekyll
|
||||
prev: /tutorials/installing-on-windows
|
||||
title: MathJax Support
|
||||
toc: true
|
||||
weight: 10
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in a new issue