From cf7e4ec1954bac4b80790f95373ae77a2a32bc1c Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Tue, 2 Aug 2022 00:15:34 -0700 Subject: [PATCH] Properly redirect /atom.xml instead of 404 --- script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script.js b/script.js index 1397267..ba983e4 100644 --- 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 -- 2.47.3