aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <m@mitjafelicijan.com>2023-07-17 02:17:52 +0200
committerMitja Felicijan <m@mitjafelicijan.com>2023-07-17 02:17:52 +0200
commit6617a034fea58da67d432ccfe99cc9025cc4b502 (patch)
treeeacd939eb8e21251b8d2d32652d5f62410b09b78
parent9fe56887a207b02d3c589f3904c4c1c374f5cdbc (diff)
downloadmitjafelicijan.com-6617a034fea58da67d432ccfe99cc9025cc4b502.tar.gz
Added robots.txt and sitemap.xml
-rw-r--r--config.yaml4
-rw-r--r--templates/robots.txt2
-rw-r--r--templates/sitemap.xml8
3 files changed, 14 insertions, 0 deletions
diff --git a/config.yaml b/config.yaml
index 324d762..1579fa1 100644
--- a/config.yaml
+++ b/config.yaml
@@ -15,3 +15,7 @@ extras:
15 url: index.xml 15 url: index.xml
16 - template: notes.xml 16 - template: notes.xml
17 url: notes.xml 17 url: notes.xml
18 - template: robots.txt
19 url: robots.txt
20 - template: sitemap.xml
21 url: sitemap.xml
diff --git a/templates/robots.txt b/templates/robots.txt
new file mode 100644
index 0000000..c2a49f4
--- /dev/null
+++ b/templates/robots.txt
@@ -0,0 +1,2 @@
1User-agent: *
2Allow: /
diff --git a/templates/sitemap.xml b/templates/sitemap.xml
new file mode 100644
index 0000000..3a9cb09
--- /dev/null
+++ b/templates/sitemap.xml
@@ -0,0 +1,8 @@
1<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
2 {{ range $idx, $page := .Pages }}
3 <url>
4 <loc>{{ $.Config.BaseURL }}/{{ $page.RelPermalink }}</loc>
5 <lastmod>{{ $page.Created.Format "2006-01-02T15:04:05" }}+00:00</lastmod>
6 </url>
7 {{ end }}
8</urlset>