Sitemap & robots.txt

This commit is contained in:
JP Hastings-Spital 2023-08-19 19:22:28 +01:00
parent cfb8a110ce
commit 061d405ea8
7 changed files with 45 additions and 0 deletions

View file

@ -96,3 +96,6 @@ paginate = 36
identifier = "mail" identifier = "mail"
name = ":postbox:" name = ":postbox:"
url = "/standing-invitation" url = "/standing-invitation"
[sitemap]
filename = 'sitemap.xml'

5
content/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
sitemap:
changefreq: yearly
priority: 1.0
---

View file

@ -4,6 +4,9 @@ emoji: 🧠
draft: false draft: false
type: timeless type: timeless
summary: A list of the many curious things I've made over the years. summary: A list of the many curious things I've made over the years.
sitemap:
changefreq: weekly
priority: 0.8
--- ---
I'm a thoroughly [miriscient](https://www.miriscient.org) chap, and this often ends up in me creating toys, trinkets, projects and other artistic things. I've listed some out below. I'm a thoroughly [miriscient](https://www.miriscient.org) chap, and this often ends up in me creating toys, trinkets, projects and other artistic things. I've listed some out below.

View file

@ -5,6 +5,9 @@ draft: false
type: timeless type: timeless
stylescope: nownownow stylescope: nownownow
summary: Regularly updated context on my life at the moment. Haven't seen me in a while? This will let you know what I'm up to. summary: Regularly updated context on my life at the moment. Haven't seen me in a while? This will let you know what I'm up to.
sitemap:
changefreq: daily
priority: 1.0
--- ---
> Being intentional about what I spend my time on has been consistently rewarding through my life, so when I learned about [the Now movement](https://nownownow.com/about) I knew I'd be publishing [my own _/now_ page](https://www.byjp.me/now) too. > Being intentional about what I spend my time on has been consistently rewarding through my life, so when I learned about [the Now movement](https://nownownow.com/about) I knew I'd be publishing [my own _/now_ page](https://www.byjp.me/now) too.

5
content/photos/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
sitemap:
changefreq: monthly
priority: 0.8
---

View file

@ -0,0 +1,19 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
{{- if .Permalink -}}
<url>
<loc>{{ .Permalink }}</loc>{{ $date := .Date }}{{ if eq .Type "timeless" }}{{ $date = .Lastmod }}{{ end }}{{ if not $date.IsZero }}
<lastmod>{{ safeHTML ( $date.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ if .IsPage }}
<changefreq>{{ with .Sitemap.ChangeFreq }}{{ . }}{{ else }}{{ if gt (now.Sub $date) (duration "hour" 168) }}yearly{{ else }}daily{{ end }}{{ end }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.LanguageCode }}"
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{- end -}}
{{ end }}
</urlset>

7
static/robots.txt Normal file
View file

@ -0,0 +1,7 @@
Sitemap: /sitemap.xml
User-agent: GPTBot
Disallow: /
User-Agent: DuckDuckBot
Allow: /