We have ignition!
Victory! This blog is now generated by a Node app that creates an RSS feed, an index and individual archives by date. I realized I had to race ahead and get the basic stuff up and running to save my sanity from updating the index and RSS feed by hand. Hopefully this will straighten out the RSS issues. Also: permalinks!
I'm still refining the core engine and working making the code less gross.
So far I haven't had to install a ton of npm libraries, although the ones I've installed so far have done a lot of heavy lifting:
- markdown-it for converting Markdown text into HTML, used for post content.
- frontmatter for parsing Frontmatter-formatted files into a JSON object.
I have also rediscovered the sheer hell of date handling. I'm using a library for date and time formatting, but it's pretty limited in what it offers. Moment seems to be the hotness for this, but seems kind of heavy (2.8 MB!) for my purposes.
To make my life easier, I wrote a separate script called
create-post that outputs an empty Markdown file with some defaults. I'll write about this later, but to create this post, I ran:
node ./build/create-post.js --title 'We have ignition!'
And the output was a file with the following Frontmatter header:
--- title: "We have ignition!" date: 2019-12-10 22:15:55 filename: 2019-12-10_22-15-55-728_we_have_ignition.md status: publish author_uid: scottandrew slug: we_have_ignition guid: /posts/2019/12/10/we_have_ignition/ thumbnail_image: opengraph_image: tags: excerpt: ---
A good start! Anyway, looking forward to when I inevitably feed something to this app that breaks it.