aboutsummaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-02-05 22:05:04 -0300
committerEuAndreh <eu@euandre.org>2020-02-05 22:05:04 -0300
commita6ae95d8bd0e9a933160fed6381b215d19d817ee (patch)
treeaad1c7e0d360a6d99d2cc4a9209a075c252e60af /site
parentCopy feed.atom from jekyll-feed (diff)
downloadeuandre.org-a6ae95d8bd0e9a933160fed6381b215d19d817ee.tar.gz
euandre.org-a6ae95d8bd0e9a933160fed6381b215d19d817ee.tar.xz
DIY Atom feed
Diffstat (limited to '')
-rw-r--r--site.json26
-rw-r--r--sitemap.xml29
2 files changed, 55 insertions, 0 deletions
diff --git a/site.json b/site.json
new file mode 100644
index 0000000..0920bf8
--- /dev/null
+++ b/site.json
@@ -0,0 +1,26 @@
+---
+---
+{
+ "posts": [
+ {% for post in site.posts %}
+ {
+ "title": "{{ post.title | smartify }}",
+ "url": "{{ post.url }}",
+ "lang": "{{ post.lang }}",
+ "ref": "{{ post.ref }}",
+ "content": {{ post.content | strip_html | jsonify }}
+ }{% unless forloop.last %},{% endunless %}
+ {% endfor %}
+ ],
+ "pages": [
+ {% for page in site.pages %}
+ {
+ "title": "{{ page.title | smartify }}",
+ "url": "{{ page.url }}",
+ "lang": "{{ page.lang }}",
+ "ref": "{{ page.ref }}",
+ "content": {{ page.content | strip_html | jsonify }}
+ }{% unless forloop.last %},{% endunless %}
+ {% endfor %}
+ ]
+}
diff --git a/sitemap.xml b/sitemap.xml
new file mode 100644
index 0000000..1c17a14
--- /dev/null
+++ b/sitemap.xml
@@ -0,0 +1,29 @@
+---
+---
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+ {% for post in site.posts %}
+ <url>
+ <loc>{{ site.url }}{{ post.url }}</loc>
+ {% assign versions=site.posts | where:"ref", post.ref %}
+ {% for version in versions %}
+ <xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{ site.url }}{{ version.url }}" />
+ {% endfor %}
+ <lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
+ <changefreq>weekly</changefreq>
+ </url>
+ {% endfor %}
+
+ {% for page in site.pages %}
+ <url>
+ <loc>{{ site.base }}{{ page.url }}</loc>
+ {% if page.ref != nil %}
+ {% assign versions=site.pages | where:"ref", page.ref %}
+ {% for version in versions %}
+ <xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{ site.url }}{{ version.url }}" />
+ {% endfor %}
+ {% endif %}
+ <changefreq>weekly</changefreq>
+ </url>
+ {% endfor %}
+</urlset>