File tree Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Expand file tree Collapse file tree 4 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,16 @@ pygmentsStyle = "vs"
8
8
9
9
[outputs ]
10
10
home = [ " RSS" , " HTML" ]
11
+ page = [" HTML" , " JSON" ]
11
12
12
13
[outputFormats ]
13
14
[outputFormats .RSS ]
14
15
mediatype = " application/rss"
15
16
baseName = " feed"
16
17
18
+ [outputFormats .JSON ]
19
+ mediatype = " application/json"
20
+ baseName = " all"
21
+
17
22
[params ]
18
23
helpRoot = " "
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout : feed
3
+ outputs :
4
+ - json
5
+ ---
Original file line number Diff line number Diff line change
1
+ { "blog" : [
2
+ {{ range $i, $e := (where .Site.Pages "Section" "blog") }}
3
+ {{ if $i }}, {{ end }}
4
+ {
5
+ "title" : " {{ .Title }}" ,
6
+ "url" : " {{ .RelPermalink }}" ,
7
+ "date" : " {{ .PublishDate.Format " 2006 -01-02 " }}" ,
8
+ "timestamp" : {{ mul (.PublishDate.Unix) 1000 }}
9
+ }
10
+ {{ end }}
11
+ ],
12
+ "help" : [
13
+ {{ range $i, $e := (where .Site.Pages "Section" "help") }}
14
+ {{ if $i }}, {{ end }}
15
+ {
16
+ "title" : " {{ .Title }}" ,
17
+ "url" : " {{ .RelPermalink }}" ,
18
+ "category" : " {{ .Params.Category }}"
19
+ }
20
+ {{ end }}
21
+ ]
22
+ }
Original file line number Diff line number Diff line change 3
3
< h1 > The JS Bin Blog</ h1 >
4
4
5
5
< ul class ="posts ">
6
- {{ range .Data.Pages -}}
6
+ {{ range where .Data.Pages "Layout" "!=" "feed" -}}
7
7
< li >
8
8
< span class ="date "> {{ .PublishDate.Format "2-Jan, 2006" }}</ span >
9
9
< a href ="{{ .Permalink }} "> {{ .Title }}</ a >
You can’t perform that action at this time.
0 commit comments