-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make outputs front-matter var a list
- Add test for JSON output creation - Add single.json in bare_min layouts/_default for this testing purpose - Update debugprint.html partial to pretty-print the outputs Param
- Loading branch information
1 parent
55e3964
commit fd7eb84
Showing
6 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
+++ | ||
title = "Setting empty outputs is fine" | ||
tags = ["outputs", "empty"] | ||
draft = false | ||
+++ | ||
|
||
If the `EXPORT_HUGO_OUTPUTS` property is left empty/unset, `ox-hugo` | ||
will not set the `outputs` variable in the front-matter at all. So | ||
only the HTML output will be created (default). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
+++ | ||
title = "Output HTML and JSON" | ||
outputs = ["html", "json"] | ||
tags = ["outputs", "json"] | ||
draft = false | ||
+++ | ||
|
||
**Note**: A `single.json` is required to be at a valid location in the | ||
template lookup hierarchy for the JSON outputs to be created. | ||
|
||
[Here's the JSON output version of this page](./index.json). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"uri": "{{ .Permalink }}", | ||
"title": "{{ .Title | htmlEscape }}", | ||
"tags": [{{ range $tindex, $tag := .Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], | ||
"description": "{{ .Description | htmlEscape }}", | ||
"content": "{{ range $i, $words := .PlainWords }}{{ $words | htmlEscape }} {{ end }}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters