Update params.yaml and list.json.json to enhance site configuration and JSON feed structure
This commit is contained in:
@@ -4,6 +4,8 @@ image: /img/pilogo.jpg
|
||||
logo: /img/logo.png
|
||||
images:
|
||||
- /img/Opengraph.png
|
||||
favicon: "apple-touch-icon.png"
|
||||
icon: "apple-touch-icon.png"
|
||||
defaultColor:
|
||||
"dark" # set color mode: dark, light, auto
|
||||
# Setting it to 'auto' applies the color scheme based on the visitor's device color preference.If you don't specify anything, ignore this parameter, or leave it blank,
|
||||
@@ -51,6 +53,7 @@ author:
|
||||
name: "Fundor333"
|
||||
description: "Pythonista, Backend Developer, Photographer, Dev Ops, Ex-Scout, Bookworm and Tea Lover. Sometime you can find me in a GDG, a DataBeers, a Pycon, a Comicon or other similar event. Huge Open Source fan and user I am allways searching something new to do or to study. Huge fan of automation, autodeploy, data sharing and bots. A lot of my personal stuff are here in my blog and some in my Github."
|
||||
fediverseAccount: "@fundor333@mastodon.social"
|
||||
url: "https://fundor333.com"
|
||||
|
||||
Hcard:
|
||||
avatar: "img/logo.png"
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{{- $pctx := . }}
|
||||
{{- $pctx := . }}
|
||||
{{- if .IsHome }}{{ $pctx = .Site }}{{ end }}
|
||||
{{- $pages := slice }}
|
||||
{{- if or $.IsHome $.IsSection }}
|
||||
@@ -34,31 +28,42 @@
|
||||
{{ with $.Param "favicon" -}}
|
||||
"favicon": "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with site.Params.author -}}
|
||||
{{ with site.Params.author.name -}}
|
||||
"authors": [
|
||||
{{ .| jsonify }}
|
||||
{
|
||||
"name": "{{ . }}"{{ with site.Params.author.url }},
|
||||
"url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }},
|
||||
"avatar": "{{ . | absURL }}"{{ end }}
|
||||
}
|
||||
],
|
||||
{{ end -}}
|
||||
"items": [
|
||||
{{ range $index, $element := $pages -}}
|
||||
{
|
||||
"title": {{ .Title | jsonify }},
|
||||
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
{{ with .Params.author -}}
|
||||
"authors": [
|
||||
{
|
||||
"name": "{{ . }}"
|
||||
}
|
||||
],
|
||||
{{ end -}}
|
||||
"tags":[
|
||||
{{ range .Params.tags }}"{{ . }}", {{ end }}{{ range .Params.categories }}"{{ . }}", {{ end }}
|
||||
],
|
||||
"content_html": {{ .Content | jsonify }}
|
||||
}{{ if ne (add $index 1) $length }},{{ end }}
|
||||
{
|
||||
"title": {{ .Title | jsonify }},
|
||||
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
{{ with .Params.author -}}
|
||||
"authors": [
|
||||
{
|
||||
"name": "{{ . }}"
|
||||
}
|
||||
],
|
||||
{{ end -}}
|
||||
"tags":[
|
||||
{{ range .Params.tags }}"{{ . }}", {{ end }}{{ range .Params.categories }}"{{ . }}", {{ end }}
|
||||
],
|
||||
"content_html": {{ .Content | jsonify }},
|
||||
"content_text":{{ .Content | plainify | jsonify }},
|
||||
{{ $image := .Resources.GetMatch "{cover.webp,cover.jpg,cover.png,cover.jpeg}" }}
|
||||
{{ if $image }}
|
||||
"image": "{{ $image.Permalink }}",
|
||||
"banner_image": "{{ $image.Permalink }}",
|
||||
{{ end }}
|
||||
}
|
||||
{{ if ne (add $index 1) (len $pages) }},{{ end }}
|
||||
{{ end -}}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user