Breaking silence and updating the blog stack
So this is how it feels to write again on one’s blog. Good, it’s a good feeling. In the past week I’ve spent a few hours brushing up - aka rewriting - the engine this blog runs on, streamlining, optimizing, porting.
I wrote similar updates in 2014 and 2012 respectively, things have evolved, check out my previous two rewrites - one and two - and cringe at will like I did. It’s something anyone writing needs to live with, reading one’s old stuff that is.
Highlights of this update/rewrite:
- Support for HTTPS/SSL.
- “Serverless” setup where assets are deployed to AWS: S3, CloudFront, ACM.
- Automatic deployments via
git
merges using Bitbucket Pipelines for test and production. - Bootstrap 4, Yarn, Webpack 4.
- Optimized using Lighthouse, PageSpeed Insights, traditional W3C Markup Validation just to be sure not to miss anything big.
Technology landscape
Here is the technology platform this blog is now running on as of the latest update:
- The static site generator is the fast and featureful Hugo.
- Bootstrap 4.1 for the grid, good sensible defaults and fully responsive classes.
- Yarn and Webpack 4.
- Posts written in standard Markdown.
Deployment
- Bitbucket Pipelines as CI/CD solution.
- Any merge to the
develop
branch deploys to https://test.durdn.com and any merge tomaster
deploys to https://www.durdn.com . - SSL certificates from Let’s Encrypt imported into Amazon Certificate Manager.
- The build uses a simple Node image and uses s3-deploy to deploy the assets to an S3 bucket and invalidate CloudFront distribution.
Here the Pipelines configuration:
image: node:10.12.0-alpine
pipelines:
branches:
master:
- step:
name: Deploy to production
deployment: production
caches:
- node
- hugo
script:
- yarn
- mkdir -p $HOME/.hugo
- if [[ -f $HOME/.hugo/hugo ]]; then echo "Hugo already downloaded"; else ./node_modules/.bin/wget https://github.com/gohugoio/hugo/releases/download/v0.49/hugo_0.49_Linux-64bit.tar.gz && tar zxf hugo_0.49_Linux-64bit.tar.gz && rm hugo_0.49_Linux-64bit.tar.gz && cp ./hugo $HOME/.hugo/hugo; fi
- yarn run build
- $HOME/.hugo/hugo
- ./node_modules/.bin/s3-deploy './public/**' --cwd './public' --region eu-central-1 --bucket www.durdn.com --distId XXXXXX --invalidate '/*'
develop:
- step:
name: Deploy to test
deployment: test
caches:
- node
- hugo
script:
- yarn
- mkdir -p $HOME/.hugo
- if [[ -f $HOME/.hugo/hugo ]]; then echo "Hugo already downloaded"; else ./node_modules/.bin/wget https://github.com/gohugoio/hugo/releases/download/v0.49/hugo_0.49_Linux-64bit.tar.gz && tar zxf hugo_0.49_Linux-64bit.tar.gz && rm hugo_0.49_Linux-64bit.tar.gz && cp ./hugo $HOME/.hugo/hugo; fi
- yarn run build
- $HOME/.hugo/hugo
- ./node_modules/.bin/s3-deploy './public/**' --cwd './public' --region eu-central-1 --bucket test.durdn.com --distId XXXXXX --invalidate '/*'
definitions:
caches:
hugo: $HOME/.hugo
Typography
I kept the fonts unchanged from the previous update:
- Source Sans Pro for titles.
- Georgia for the bulk of the text content.
15 October 2018