Eerste ondersteuning IndexNow
This commit is contained in:
parent
b24026eec1
commit
62d29a653c
|
@ -5,11 +5,16 @@
|
||||||
mediatype = "application/xml"
|
mediatype = "application/xml"
|
||||||
baseName = "atom"
|
baseName = "atom"
|
||||||
|
|
||||||
# JSON Feed, index.json
|
# JSON Feed: feed.json
|
||||||
[JSON]
|
[JSON]
|
||||||
mediatype = "application/json"
|
mediatype = "application/json"
|
||||||
baseName = "feed"
|
baseName = "feed"
|
||||||
|
|
||||||
|
# IndexNow-bestand: indexnow.json
|
||||||
|
[IndexNow]
|
||||||
|
mediatype = "application/json"
|
||||||
|
baseName = "indexnow"
|
||||||
|
|
||||||
# CalendarEvent genereerd een iCal-bestand voor evenementen
|
# CalendarEvent genereerd een iCal-bestand voor evenementen
|
||||||
[CalendarEvent]
|
[CalendarEvent]
|
||||||
mediaType = "text/calendar"
|
mediaType = "text/calendar"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Voor de home-page maken we een HTML, RSS en JSON Feed
|
# Voor de home-page maken we een HTML, RSS en JSON Feed
|
||||||
# Secties alleen in HTML en voor pagina's in zowel HTML als CalendarEvent (iCAL) waar het van toepassing is
|
# Secties alleen in HTML en voor pagina's in zowel HTML als CalendarEvent (iCAL) waar het van toepassing is
|
||||||
home = ["HTML", "RSS", "JSON", "SearchIndex"]
|
home = ["HTML", "RSS", "JSON", "IndexNow", "SearchIndex"]
|
||||||
section = ["HTML"]
|
section = ["HTML"]
|
||||||
page = ["HTML", "CalendarEvent"]
|
page = ["HTML", "CalendarEvent"]
|
||||||
|
|
||||||
|
|
14
themes/nluug/layouts/list.indexnow.json
Normal file
14
themes/nluug/layouts/list.indexnow.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{{- $url := urls.Parse (absURL "") -}}
|
||||||
|
{{- $domainname := split $url.Host "." -}}
|
||||||
|
{{- index $domainname 1 -}}
|
||||||
|
{
|
||||||
|
"host": "{{ $domainname }}",
|
||||||
|
"key": "eef97f0eab614e95ba7b54615dc59f9d",
|
||||||
|
"keyLocation": "{{ absURL "/eef97f0eab614e95ba7b54615dc59f9d.txt" }}",
|
||||||
|
{{ $index_time := (time now).AddDate 0 0 -1 }}
|
||||||
|
"urlList": [
|
||||||
|
{{- range .Site.RegularPages -}}
|
||||||
|
{{ if ge (time .Date) $index_time }}"{{ .Permalink }}",{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
]
|
||||||
|
}
|
Reference in a new issue