TDSTG.com - Posts

Hugo Docker Development Environment

Published: 2024-06-05
Updated: 2024-06-17

Here's how I run my Hugo site development projects using Docker containers

Apache Cheatsheet

Published: 2024-03-29
Updated: 2024-06-17

A very short list of essential Apache management commands for web hosting

Certbot TLS with Nginx

Published: 2024-06-20
Updated: 2024-06-13

Certbot from Let's Encrypt is the defacto method for installing and maintaining TLS certificates. Before you can use it on your new Ubuntu server you have to install it. Walk through the steps to install a TLS certificate with Nginx reverse-proxy

Domain Validation Challenges with Certbot

Published: 2024-06-19
Updated: 2024-06-13

Let's talk about how Certbot goes about validating your domain before issuing a TLS certificate

List In-Use Docker Ports

Published: 2024-06-12
Updated: 2024-06-10

How to get a list of all ports used by docker containers on your local dev machine

Hugo Static vs Assets Folders

Published: 2024-06-09
Updated: 2024-06-10

What's the difference between Hugo's static and assets folders. Does it matter where I store my images?

Golang Slugify Function

Published: 2024-05-17
Updated: 2024-05-24

A function which takes an input string and converts it to a "slug", a string of text suitable for use in an url address

Hugo Install on MacOS

Published: 2024-05-12
Updated: 2024-05-24

My quick notes on how to download and install the extended version of Hugo - and a fix for "macOS cannot verify that this app is free from malware"

Hugo Remove List Duplicates

Published: 2024-05-17
Updated: 2024-05-21

In processing JSON records for a Hugo site I needed to remove duplicate ID elements in a list. Here's how I did it.

Golang Friendly Date Converter

Published: 2024-05-12
Updated: 2024-05-17

A function which takes an input string of the format YYYY-MM-DD and converts it into a more readable "Mar 06, 2006" format

Digital Certificates with Certbot

Published: 2024-01-29
Updated: 2024-05-16

Certbot from Let's Encrypt is the best thing going for installing and maintaining your site certificates. Use this simple one-line command to set it and forget it.

Sample Apache vhost.conf

Published: 2024-01-19
Updated: 2024-05-16

If your server's reverse-proxy is Apache, you'll need to set up VirtualHost blocks for each domain you're hosting. Here's a sample vhost.conf file you can use to get started.

One-Liner to Update PiHole

Published: 2024-05-12
Updated: 2024-05-16

How to update your PiHole device to the latest releases, all in a single command

loop variable captured by func literal

Published: 2024-05-14
Updated: 2024-05-16

In my process of learning how to code a Golang web crawler I ran into an unexpected warning: loop variable url captured by func literal

Hugo Most Recently Updated Posts

Published: 2024-02-04
Updated: 2024-05-16

This site's home page features my most-recently updated 5 posts. This the template logic that makes it happen.

Hugo Most Recent Posts

Published: 2024-02-04
Updated: 2024-05-16

This site's home page used to feature my most recent 5 posts. This post shows how the logic that made it work

Hugo Custom 404 Page

Published: 2024-04-28
Updated: 2024-05-16

Here's how I set up a custom 404/NotFound page for this site.

Customize Hugo Page Type

Published: 2024-02-08
Updated: 2024-05-16

I struggled with this a bit longer than I might should have. In the end it wasn't too difficult but it also wasn't so straightforward to be obvious. Here's how to set up a custom page layout for any type of page you might imagine in Hugo.

Google Tags to Hugo Site

Published: 2024-05-07
Updated: 2024-05-16

Adding Google's Tag Manager connect code to your static Hugo site won't take long. Here's how to do it in 3 simple steps.

Add Certbot to Ubuntu Server

Published: 2024-01-29
Updated: 2024-05-16

Certbot from Let's Encrypt is the defacto method for installing and maintaining TLS certificates. Before you can use it on your new Ubuntu server you have to install it. Use this easy one-liner to make it happen.

Debounced Scroll-To-Top Button

Published: 2024-05-06
Updated: 2024-05-16

With a few lines of code you can add an unobtrusive button to your site that, when clicked, takes visitors back up to the top of the page.

Page Folder Name

Published: 2024-05-12
Updated: 2024-05-16

I needed the name of the folder in which a page was stored in order to make shortcode processing a little bit easier. Here's how I managed to do it.