Add JSON output format for pages
This commit is contained in:
parent
8723adeec1
commit
fdc285bf02
2 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,7 @@ outputs:
|
|||
page:
|
||||
- "html"
|
||||
- "txt"
|
||||
- "json"
|
||||
|
||||
staticDir: "static/build"
|
||||
|
||||
|
|
11
layouts/_default/single.json
Normal file
11
layouts/_default/single.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "{{ .UniqueID }}",
|
||||
"title": "{{ .Title }}",
|
||||
"date": "{{ .Date }}",
|
||||
"image": "{{ absURL .Params.image }}",
|
||||
"permalink": "{{ .Permalink }}",
|
||||
"wordCount": "{{ .WordCount }}",
|
||||
"linkTitle": "{{ .LinkTitle }}",
|
||||
"section": "{{ .Section }}",
|
||||
"content": "{{ .Permalink }}index.txt"
|
||||
}
|
Loading…
Reference in a new issue