summaryrefslogtreecommitdiffstats
path: root/roots/test-canonical
diff options
context:
space:
mode:
Diffstat (limited to 'roots/test-canonical')
-rw-r--r--roots/test-canonical/canonical.rst9
-rw-r--r--roots/test-canonical/conf.py18
-rw-r--r--roots/test-canonical/index.rst2
-rw-r--r--roots/test-canonical/post.rst11
-rw-r--r--roots/test-canonical/postlist.rst4
5 files changed, 44 insertions, 0 deletions
diff --git a/roots/test-canonical/canonical.rst b/roots/test-canonical/canonical.rst
new file mode 100644
index 0000000..c5e706b
--- /dev/null
+++ b/roots/test-canonical/canonical.rst
@@ -0,0 +1,9 @@
+.. post:: 2021-12-01
+ :tags: Canonical
+ :canonical_link: https://canonical.example.org/foo.html
+
+Canonical post
+=============
+
+This post will get generated, but its [canonical link](https://datatracker.ietf.org/doc/html/rfc6596)
+in the header will point to ``canonical_link``.
diff --git a/roots/test-canonical/conf.py b/roots/test-canonical/conf.py
new file mode 100644
index 0000000..a515a6e
--- /dev/null
+++ b/roots/test-canonical/conf.py
@@ -0,0 +1,18 @@
+extensions = ["ablog"]
+
+# Enable Atom feed generation
+blog_baseurl = "https://blog.example.com/"
+# Include full post in feeds
+blog_feed_fulltext = True
+# Add a social media Atom feed
+blog_feed_templates = {
+ # Use defaults, no templates
+ "atom": {},
+ # Create content text suitable posting to micro-bogging
+ "social": {
+ # Format tags as hashtags and append to the content
+ "content": "{{ title }}{% for tag in post.tags %}" " #{{ tag.name|trim()|replace(' ', '') }}" "{% endfor %}",
+ },
+}
+# Sphinx creates canonical links pointing to this base URL by default
+html_baseurl = blog_baseurl
diff --git a/roots/test-canonical/index.rst b/roots/test-canonical/index.rst
new file mode 100644
index 0000000..4a0bb51
--- /dev/null
+++ b/roots/test-canonical/index.rst
@@ -0,0 +1,2 @@
+test-external
+=============
diff --git a/roots/test-canonical/post.rst b/roots/test-canonical/post.rst
new file mode 100644
index 0000000..46ac292
--- /dev/null
+++ b/roots/test-canonical/post.rst
@@ -0,0 +1,11 @@
+.. post:: 2022-12-01
+ :tags: Foo Tag, BarTag
+
+Foo Post Title
+==============
+
+ Foo post description `with link`_.
+
+Foo post content.
+
+.. _`with link`: https://example.com
diff --git a/roots/test-canonical/postlist.rst b/roots/test-canonical/postlist.rst
new file mode 100644
index 0000000..d944b64
--- /dev/null
+++ b/roots/test-canonical/postlist.rst
@@ -0,0 +1,4 @@
+postlist
+========
+
+.. postlist::