March 9, 2018

Maintainable website

In this episode you'll learn how to edit our simple website in a maintainable way. We'll start by copying the website we have into a nice website generator that handles layouts and news feeds for us. Then we'll add some extra features that start to enable social features, and let us learn new Dockerfile techniques.

I've yet to record an episode video, but here are the commits I performed one morning when I moved into Cryogen. I also added a keybase verification file, which sadly was the one thing I missed... otherwise the page looks the same as the original.

1. created a new cryogen blog and ported into a page and a template to match OG content

Create a new terminal, change to the tinydatacenter aka. $TDC directory.


cd $TDC
mkdir $DOMAIN


lein new cryogen app

ln -s app/resources/templates/config.edn

# see what's there
cat config.edn

ln -s app/resources/templates/md/pages md-pages
ln -s app/resources/templates/md/posts md-posts 

# see what's there
ls -la md-pages
ls -la md-posts
lein ring server
# a browser will open up. 
# changes will be detected when files are saved... just reload.

Lein missing? Try this: alias lein=$TDC/lein-docker/ this step requires Internet access.

2. added scripts for ops:

Study the green sections below. TDC is not present, but I'll use it going forward. These scripts help us operate the site.

3. added fork me link:

Pretend it's your own change.

4. bump version for ops:

If you're following the Hacking streams you'll have noticed the convention for deployment evolvng.

5. added keybase verification (virtual file):

Keybase is an interesting project for encrypted chat and identity verification. It and other SaaS providers use techniques like this to verify DNS ownership.

Between changes we had to purge our CloudFlare cache. I need to make a script for that... I have a WIP one that lists all static assets... I just need to chunk it into groups of 30 and add extra variations on the home page URL and look into whether http+https are distinct.

Tags: episode-wip