]> git.ardis.lu - ardislu.dev/commitdiff
Properly redirect /atom.xml instead of 404
authorArdis Lu <ardisglu@gmail.com>
Tue, 2 Aug 2022 07:15:34 +0000 (00:15 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 2 Aug 2022 07:15:34 +0000 (00:15 -0700)
script.js

index 139726719401afccba0967e3812791cc222053a3..ba983e44025aeaa90e6a34068926503d8dcb8c31 100644 (file)
--- a/script.js
+++ b/script.js
@@ -163,6 +163,9 @@ async function showPage(path) {
     document.querySelector('main').replaceWith(postMain);
     hljs.highlightAll();
   }
+  else if (path === '/atom.xml') {
+    location.href = `${location.origin}${path}`;
+  }
   else {
     // MUST redirect to a page where the web server serves an actual 404 error (i.e. not just 
     // index.html again) otherwise this triggers an infinite loop
This page took 0.035887 seconds and 4 git commands to generate.