diff --git a/content/templates/output-formats.md b/content/templates/output-formats.md index c8928bdb1..e044ce21a 100644 --- a/content/templates/output-formats.md +++ b/content/templates/output-formats.md @@ -138,7 +138,7 @@ outputs: The following is an example of `YAML` front matter in a content file that defines output formats for the rendered `Page`: -``` +```yaml --- date: "2016-03-19" outputs: @@ -152,7 +152,7 @@ outputs: Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `
`: -``` +```html {{ range .AlternativeOutputFormats -}} {{ end -}} @@ -162,7 +162,7 @@ Note that `.Permalink` and `.RelPermalink` on `Page` will return the first outpu This is how you link to a given output format: -``` +```html {{ with .OutputFormats.Get "json" -}} {{ .Name }} {{- end }} @@ -170,7 +170,7 @@ This is how you link to a given output format: From content files, you can use the [`ref` or `relref` shortcodes](/content-management/shortcodes/#ref-and-relref): -``` +```html [Neat]({{* ref "blog/neat.md" "amp" */>}}) [Who]({{* relref "about.md#who" "amp" */>}}) ```