Building A Blog
I am looking to build a blog to keep track of my software development notes. There seems to be a number of solutions that can be used. Such as building my own, Hugo, Jekyll and others.
To start I’ve built a list of things that I feel are important while building:
- use markdown
- include RSS feed
Because I am comfortable with Go and already have the tooling installed to get up and running , I’ve decided to start by trying out Hugo.
This ended up by working out well. I found this theme that is simple and does what I want it to.
I am using Gitlab for my repository and their CI tooling with a self hosted runner. With that I am able to leverage Docker to rebuild a new image when I push to master (I have included my Dockerfile bellow).
# Dockerfile
FROM alpine:latest AS build
WORKDIR /app
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo ;\
apk add --no-cache git
COPY . .
RUN git submodule update --init --recursive ;\
hugo --minify
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=build /app/public .
EXPOSE 80/tcp