Static Archive Page

I went from an Archive Page that used an embedded Glitch app, to a static Archive Page.

Previously, I used an embedded Glitch app to dynamically create the contents for my Archive page. It worked well, but it was also slow. It was slow because every time you visit the page, the Glitch app had to wake up, then pull all my write.as posts and finally display them in a list. The slowness was a stark contrast to other pages on this site — most of which load very quickly. I also didn't like the idea of depending on a third-party service to serve up the contents of my Archive page.

So, I've been wanting to switch to a static Archive page for awhile now. My problem was that I already had over 350 posts on this site. To get me started, I needed a way to quickly generate a list of all posts on this site. For this, I created a .NET Core console app. This app would get all my posts using the write.as API. Then the app would spit out the list of all posts in HTML format. My first pass actually had it spitting out text in Markdown. But I quickly ran into issues with Markdown and <div> elements not playing well together. So, HTML it was. Anyway, once I had the output on a text file, all I had to do was copy over the HTML and paste it into my Archive page.

So, now my Archive page no longer relies on an embedded Glitch app. It is now a static page. The plan is to manually update the contents of that page every weekend. Since I don't post multiple times a day, I figure manually updating the page once a week would be manageable. I already do the same thing for my Series and Tags page anyway.


This post is Day 35 of my #100DaysToOffload challenge. Visit https://100daystooffload.com to get more info, or to get involved.

Tags: #SiteUpdates #DotNetCore #100DaysToOffload