summaryrefslogtreecommitdiffstats
path: root/exampleSite
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-17 21:02:53 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-17 21:02:53 +0200
commit58f744a22380c42c25ee4059bb4b2bcfd255fd53 (patch)
treec1d34bf628f1887edf0d4e38e341eaf35f0d6c09 /exampleSite
parent2e2e603a3ba1923087f949956bbf66456afbe7bf (diff)
downloadgohugo-theme-ed-58f744a22380c42c25ee4059bb4b2bcfd255fd53.tar.gz
Add json feed
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/config.toml13
1 files changed, 11 insertions, 2 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 3e57fe9..5a3ae85 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -16,9 +16,8 @@ disableKinds = ['RSS']
[outputs]
# TODO:
- # home = [ "HTML", "Atom", "JSON", "humanstxt" ]
# section = [ "HTML", "Atom" ]
- home = [ 'HTML', 'Atom', 'FEED', 'humanstxt' ]
+ home = [ 'HTML', 'Atom', 'FEED', 'JSON', 'humanstxt' ]
# Atom feed.
# For more see: https://validator.w3.org/feed/docs/atom.html#whatIsAtom
@@ -51,6 +50,16 @@ disableKinds = ['RSS']
noUgly = true
permalinkable = false
+# For more see: https://www.jsonfeed.org/
+[outputFormats.JSON]
+ name = 'Json'
+ mediaType = 'application/json'
+ baseName = 'feeds/feed'
+ rel = 'alternate'
+ isPlainText = true
+ isHTML = false
+ noUgly = false
+
# For more see: https://gohugo.io/templates/output-formats/
[outputFormats.humanstxt]
mediaType = 'text/plain'