Behind the Source going strong

Behind the Source interviews are going well and are well received. Already on the third interview today and I have had nothing but positive comments. Fortunately it is all set up beforehand, so there is minimal work each week to get it live. Unfortunately, Mailchimp have taken away the scheduling for free accounts, otherwise I could do it all automated. I'm using Figma to create the social media images (if I had more than 8 interviews I would have automated this with the command line and ImageMagick).

Apache Macros

I discovered Apache Macros recently and they changed my life. They essentially allow you to "include" a template from another Apache file. To give context, I have a sever where all my sites are set up the same. The only difference between them is the location of the "site root" and where the SSL certificate lives (and a few other bits). Excuse the brevity in the examples, this is mainly for me to remember!

Using Apache Macros, I am able to add the following to a file in /etc/apache2/conf-available:

<Macro VHost80 $sub $parent>
    ### Virtual host configuration ###
    ServerName $sub.$parent
    VirtualDocumentRoot /var/www/$parent/$sub.$parent/html

The first line declares the variable, assigns a name and sets out the variables used, while the rest is what you want to be included.

I can then "enable" that file and call it in my Apache site file, filling in the variables and making updates & new site launches a lot easier (it also forces me to keep my server structured).

<VirtualHost *:80>
    Use VHost80 www mikestreety.co.uk # www = $sub, mikestreety.co.uk = $parent

email.subscribeto facelift

With Behind the Source re-energising my passion for side projects, I thought I would turn my attention back to email.subscribeto.at. The current tech stack was built with "prototype and push it live" in mind. I am currently in the process of re-building the backend with CraftCMS, so I am able to manage the content better and easier. So fare I've learnt a lot about extending Craft, including Twig Extensions, Behaviours and custom functions. I'll try and write a blog post about it when I understand it more!

You might also enjoy

  • #3

    Posted on 1st May 2020.

    Lockdown continuesI don't think I've mentioned this in blogs or notes before, but the UK is currently on lockdown. Since 18th March, Liquid Light have been a fully remote company - we had to quickly adapt to working in an office to all being in our own homes. It's a…

  • #2

    Posted on 19th April 2020.

    New Site If you have come here before you would have noticed there is now a new face to my blog. More space, better fonts & (in my opinion) just generally nicer. I wrote a "timeline/history" about the blog/my site and dug up some Internet Archive links for each step. You can…

  • #1

    Posted on 10th April 2020.

    So yes, I'm getting on the Weeknote train. They won't always be weekly, but a series of small notes, achievements and somewhere for me to dump my mind. Git Hooks Battled with git hooks after finding out that there is no such thing as a "pre-merge" hook unfortunately - I wanted to…

Mike Street

Written by Mike Street

Mike is a front-end developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Twitter.