diff --git a/content/_index.md b/content/_index.md index 68c9d76..27e7b04 100644 --- a/content/_index.md +++ b/content/_index.md @@ -26,7 +26,7 @@ Alternately: "If I had a nickel for every time I accidentally wrote something with heavy plural undertones that I hadn't intended but nonetheless made me doubt my identity, I'd have two nickels! Which isn't a lot, but it is weird that it happened twice." -->

Updates

- +
+ diff --git a/static/rss.js b/static/rss.js new file mode 100644 index 0000000..00eb50a --- /dev/null +++ b/static/rss.js @@ -0,0 +1,27 @@ + + +const RSS_URL = `https://cohost.org/post-self/rss/public.atom`; + +fetch(RSS_URL) + .then(response => response.text()) + .then(str => new window.DOMParser().parseFromString(str, "text/xml")) + .then(data => { + console.log(data); + const items = data.querySelectorAll("item"); + let html = ``; + items.forEach(el => { + html += ` +
+ +

+ + ${el.querySelector("title").innerHTML} + +

+
+ `; + }); + document.querySelector('#feed').html = html; + }); + +