Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

BradleyChatha/PersonalWebsite

Repository files navigation

Overview

This repo contains the code for my personal website (live at https://bradley.chatha.dev).

This website serves as both an online portfolio, an example of my web development capabilities, and as my personal blog.

Features

My website features the following:

  • Home page - This contains an overview of my language experience and skill set.

  • Awards page - Details any awards I have recieved.

  • Projects page - Soon ^tm.

  • Blog page - Contains all of my blogs, which currently consists of a small introduction series for Dlang's metaprogramming.

Application stack

Yea this README is also being used as self-advertisement, it's a personal website after all

This website is built on top of ASP Core 3.x. While the website itself is fairly static, therefore not needing 90% of the features ASP Core provides me, I do still require a bit of dynamicness on the server-side which ASP easily allows me to achieve.

I am using the Markdig library to provide the ability for my blogs to be written in Markdown. One of the main reasons I chose Markdig was due to its support for extensions which allows me to write my own extentions to alter the syntax of my blog's markdown (e.g. provide metadata), as well as provide quality of life changes such as being able to transform the text std.json#JSONValue into a link for the official documentation of JSONValue.

The website makes use of a custom, rudimentary parser which is used to parse a custom manifest file format which details all of my blog series and what posts they contain.

You may notice the decision to make parts of the parser generic, which seems odd considering there's only one parser, right? This is a legacy detail as originally I was going to create two parsers: one for the manifest file, and one for the blog files. After creating the first prototype format for the blog file, I noticed that it was pretty much just Markdown with a worse syntax, which spearheaded my hunt for a Markdown library that I could extend (Markdig!).

My CSS consists entirely of custom SASS, to showcase my ability to create responsive, mobile-friendly websites without the use of existing frameworks such as Boostrap or Semantic UI.

I use Matomo now instead of Prometheus, Grafana, and InfluxDb, but I'm leaving them here because pretty images

I am making use of Prometheus to store non-persistant time series data (such as process memory usage; total HTTP requests since last restart, etc.), whereas I'm using InfluxDb to store persistant time series data, such as blog post views and where they were referred from.

I am using Grafana to visualise my data image

On the DevOps side of things I'd like to mention that the website is hosted on a DigitalOcean droplet, which via the use of my custom deployment tool is able to:

  • Download the latest deployment of my website. Deployments are automated using Github Actions.

  • Configure NGINX automatically so that the website will handle any requests for https://bradley.chatha.dev without any further configuration on my side of things.

  • Invoke certbot automatically so that the website always has a valid Let's Encrypt certifcate, allowing for HTTPS to be used.

  • Github Actions will package the website as a Docker image, which the deployment tool is then able to pull the image; replace any previous image of the website; optionally set a memory limit; optionally provide environmental variables to the image.

  • Updates the deployment status on Github, if Github deployments are used as a trigger.

And of course I know how to setup the DNS records for the website as well.