]> xn--ix-yja.es Git - alex.git/commitdiff
Fix base URL, add RSS discovery
authoralex <alex@pdp7.net>
Sun, 8 Oct 2023 14:46:02 +0000 (16:46 +0200)
committeralex <alex@pdp7.net>
Sun, 8 Oct 2023 14:46:02 +0000 (16:46 +0200)
blog_experiment/blog/blog_pages.py
blog_experiment/blog/html.py
blog_experiment/blog/meta.py

index a82857b18d1e06542b5f57e0616cc293b60c6108..401966f9e136fb3f0465a11aaf6eb2501893a1fa 100644 (file)
@@ -62,7 +62,7 @@ class Entry:
                 url = gem_element.url
                 if url.startswith("gemini://"):
                     if url.startswith("gemini://alex.corcoles.net/"):
-                        url = url.replace("gemini://alex.corcoles.net/", "https://alex.corcoles.net/")
+                        url = url.replace("gemini://alex.corcoles.net/", meta.BASE_URL + "/")
                     else:
                         url = url.replace("gemini://", "https://portal.mozz.us/gemini/")
 
index 3478eb2fc8a895a04e50a4a1fa008ce31d8f8798..0568060d50937e226f899d43bf5662f3515cbda6 100644 (file)
@@ -10,7 +10,10 @@ def html_template(*content, page_title=None):
         title += f" - {page_title}"
     return bs4.BeautifulSoup(h.render(
         h.HTML(
-            h.HEAD(h.TITLE(title)),
+            h.HEAD(
+                h.TITLE(title),
+                h.LINK(rel="alternate", type="application/rss+xml", title=meta.TITLE, href=f"{meta.BASE_URL}/feed/"),
+            ),
             h.BODY(
                 h.H1(meta.TITLE),
                 h.H2(meta.SUBTITLE),
index 8308190444886a1a85f6bc11ac3345d16c058112..81c74a9d690b426607a4c58c5d32808f6f32912a 100644 (file)
@@ -1,3 +1,3 @@
 TITLE = "El blog es mío"
 SUBTITLE = "Hay otros como él, pero este es el mío"
-BASE_URL = "https://alex.corcoles.net"
+BASE_URL = "https://blog.pdp7.net"