Bits of Simplicity

Sitemaps, slugs and pagination oh my!

Last night I finally got around to doing something that I have been wanting to do for a while. I have added sitemaps, slug based pretty urls and pagination to this site. Since this site is a pet project and written from scratch it lacks a few key features that most modern blogging platforms have these days. I still need to add archive type listings as well as a page post type, RSS feeds and gpg post signing.

 

Archive pages are a bit tricky due to datetimes being stored as UTC in the database but converted to America/Los_Angeles when displayed. It means all of the urls are generated with America/Los_Angeles but data is queried with UTC. A work around for this is to create a new field that also stores the time in America/Los_Angeles inorder to query posts. This works because I am really only dealing with one time zone, and I don't want to convert all database timestamps away from UTC.

 A page post type should be a pretty easy one. Something simple with the ability to change templates similar to WordPress.

 RSS feeds should be the same as sitemaps. At least in theory. Only posts should have feeds.

 Post signing is a bit of a tricky one. I think the best way to go about this is have a downloadable payload that can be signed and uploaded. The payload would consist of the posts data. Once it is uploaded I can add a UI element to the frontend to signify that post has been signed. Maybe find away to verify the signature online, but also have a downloadable option. I want to stay away from doing any real gpg operations in the browser as this would not be as secure. That is unless I can find a js library that will interact with my Yubikey.