forked from CCCHH/hacker.tours-website
Initial version
This commit is contained in:
commit
ed5653a7fc
211 changed files with 11043 additions and 0 deletions
35
themes/zen/layouts/micro/list.json.json
Normal file
35
themes/zen/layouts/micro/list.json.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{{ $list := .Pages -}}
|
||||
{{ $length := (len $list) -}}
|
||||
{
|
||||
"version" : "https://jsonfeed.org/version/1",
|
||||
"title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}",
|
||||
"description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}",
|
||||
"home_page_url" : "{{ site.BaseURL }}",
|
||||
{{ with .OutputFormats.Get "JSON" -}}
|
||||
"feed_url" : "{{ .Permalink }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "icon" -}}
|
||||
"icon" : "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "favicon" -}}
|
||||
"favicon" : "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with site.Author.name -}}
|
||||
"author" : {
|
||||
"name" : "{{ . }}"{{ with site.Author.url }},
|
||||
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
|
||||
"avatar": "{{ . | absURL }}"{{ end }}
|
||||
},
|
||||
{{ end -}}
|
||||
"items" : [
|
||||
{{ range $index, $element := $list -}}
|
||||
{
|
||||
"date_published" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"date_modified" : "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"id" : "{{ .Permalink }}",
|
||||
"url" : "{{ .Permalink }}",
|
||||
"content_html" : {{ .Content | jsonify }}
|
||||
}{{ if ne (add $index 1) $length }},{{ end }}
|
||||
{{ end -}}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue