summaryrefslogtreecommitdiffstats
path: root/content/en/templates
diff options
context:
space:
mode:
Diffstat (limited to 'content/en/templates')
-rw-r--r--content/en/templates/homepage.md4
-rw-r--r--content/en/templates/introduction.md2
-rw-r--r--content/en/templates/output-formats.md12
-rw-r--r--content/en/templates/shortcode-templates.md4
4 files changed, 6 insertions, 16 deletions
diff --git a/content/en/templates/homepage.md b/content/en/templates/homepage.md
index 48130c39b..55af8f99b 100644
--- a/content/en/templates/homepage.md
+++ b/content/en/templates/homepage.md
@@ -36,10 +36,6 @@ The homepage, similar to other [list pages in Hugo][lists], accepts content and
See the homepage template below or [Content Organization][contentorg] for more information on the role of `_index.md` in adding content and front matter to list pages.
-## `.Pages` on the Homepage
-
-In addition to the standard [page variables][pagevars], the homepage template has access to *all* site content via `.Pages`.
-
## Example Homepage Template
The following is an example of a homepage template that uses [partial][partials], [base][] templates, and a content file at `content/_index.md` to populate the `{{.Title}}` and `{{.Content}}` [page variables][pagevars].
diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md
index 34a993a52..abbb41f4c 100644
--- a/content/en/templates/introduction.md
+++ b/content/en/templates/introduction.md
@@ -25,8 +25,6 @@ The following is only a primer on Go Templates. For an in-depth look into Go Tem
Go Templates provide an extremely simple template language that adheres to the belief that only the most basic of logic belongs in the template or view layer.
-{{< youtube gnJbPO-GFIw >}}
-
## Basic Syntax
Go Templates are HTML files with the addition of [variables][variables] and [functions][functions]. Go Template variables and functions are accessible within `{{ }}`.
diff --git a/content/en/templates/output-formats.md b/content/en/templates/output-formats.md
index 89accaab8..50337a20c 100644
--- a/content/en/templates/output-formats.md
+++ b/content/en/templates/output-formats.md
@@ -4,7 +4,7 @@ linktitle: Custom Output Formats
description: Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
date: 2017-03-22
publishdate: 2017-03-22
-lastmod: 2017-03-22
+lastmod: 2019-12-11
categories: [templates]
keywords: ["amp","outputs","rss"]
menu:
@@ -31,7 +31,7 @@ This is the full set of built-in media types in Hugo:
**Note:**
* It is possible to add custom media types or change the defaults; e.g., if you want to change the suffix for `text/html` to `asp`.
-* The `Suffix` is the value that will be used for URLs and filenames for that media type in Hugo.
+* `Suffixes` are the values that will be used for URLs and filenames for that media type in Hugo.
* The `Type` is the identifier that must be used when defining new/custom `Output Formats` (see below).
* The full set of media types will be registered in Hugo's built-in development server to make sure they are recognized by the browser.
@@ -40,9 +40,9 @@ To add or modify a media type, define it in a `mediaTypes` section in your [site
{{< code-toggle file="config" >}}
[mediaTypes]
[mediaTypes."text/enriched"]
- suffix = "enr"
+ suffixes = ["enr"]
[mediaTypes."text/html"]
- suffix = "asp"
+ suffixes = ["asp"]
{{</ code-toggle >}}
The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
@@ -52,7 +52,7 @@ The above example adds one new media type, `text/enriched`, and changes the suff
```toml
[mediaTypes]
[mediaTypes."text/html"]
-suffix = "htm"
+suffixes = ["htm"]
# Redefine HTML to update its media type.
[outputFormats]
@@ -221,7 +221,7 @@ From content files, you can use the [`ref` or `relref` shortcodes](/content-mana
A new output format needs a corresponding template in order to render anything useful.
{{% note %}}
-The key distinction for Hugo versions 0.20 and newer is that Hugo looks at an output format's `Name` and MediaType's `Suffix` when choosing the template used to render a given `Page`.
+The key distinction for Hugo versions 0.20 and newer is that Hugo looks at an output format's `Name` and MediaType's `Suffixes` when choosing the template used to render a given `Page`.
{{% /note %}}
The following table shows examples of different output formats, the suffix used, and Hugo's respective template [lookup order][]. All of the examples in the table can:
diff --git a/content/en/templates/shortcode-templates.md b/content/en/templates/shortcode-templates.md
index cf34feedc..898296f2b 100644
--- a/content/en/templates/shortcode-templates.md
+++ b/content/en/templates/shortcode-templates.md
@@ -299,10 +299,6 @@ The rendered output of the HTML example code block will be as follows:
</pre></div>
{{< /code >}}
-{{% note %}}
-The preceding shortcode makes use of a Hugo-specific template function called `highlight`, which uses [Pygments](http://pygments.org) to add syntax highlighting to the example HTML code block. See the [developer tools page on syntax highlighting](/tools/syntax-highlighting/) for more information.
-{{% /note %}}
-
### Nested Shortcode: Image Gallery
Hugo's [`.Parent` shortcode variable][parent] returns a boolean value depending on whether the shortcode in question is called within the context of a *parent* shortcode. This provides an inheritance model for common shortcode parameters.