Allan Almazan

The blog

This is a more detailed look into the bits and pieces that make up this blog. For a quick overview, take a look at the about page.

Failed beginnings

As mentioned in the about page, this is the end-result of dreams of grandeur, at least from an engineering perspective. This was always meant to be on some type of static site generator, but why Pelican?

Short answer: Because it uses Python.
Longer answer: Because it uses Python and I spent too much time looking up themes, theming documentation, and scaffolding to give up on Pelican now.

Does it take a lot of time to set up Pelican and get this all started? No, but I definitely made my best efforts to do so. The themes list provided at pelicanthemes.com are a great resource. Flex, crowsfoot and cid were my top choices, but they all had just too much extra fluff I didn't want to spend ripping out, so I started mostly from scratch with cid as the base.

Days and hours later...

Bootstrap 5 is looking good these days isn't it? It even has utility classes like Tailwind CSS. And! This Clean Blog Theme looks excellent with Bootstrap as its base.

OK no more. Time to focus. My constraints will be:

  1. Be minimal
  2. Use Tailwind CSS
  3. Maybe use daisyUI
  4. Dark theme
  5. Focus on maintainability (basically 1-3)

For Tailwind CSS, I discovered this nice gist to get started on the frontend build side of things. In short:

  • Use postcss as a preprocessor
  • Use tailwindcss and autoprefixer as postcss plugins
  • Add theme templates and content directories (my content markdown also has custom HTML included)
  • Use cssnano to minify the resulting CSS from above
  • For development, use something like below where styles.css contains your @tailwind directives (see docs):
// package.json
{
  "scripts": {
    "tw-watch": "tailwindcss -i ./themes/YOUR_THEME/css/styles.css -o ./themes/YOUR_THEME/static/css/styles.css --watch"
  }
}

What next?

Blog seems to be done now with frontend processing and static site generator templates. All that's left to do is the more interesting parts:

  • Figure out production deployment processes
  • Hosting and automatic deploys with GitHub Actions?
  • Analytics? (Please don't hate me if I use Google Analytics)

I suppose at this point something will be publicly online -- and that's the hardest part, even if there are a few (or more) warts and blemishes.