Source code for sglavoie.com
This repository contains the source code for my personal website, which is a blog describing my learning path in all things related to computer science.
Please feel free to reuse all the code that you might need!
It is all generated with the help of Pelican, a static website generator that uses Python. The content of the website is written in Markdown format and is rendered automatically as HTML and CSS with some bits of JavaScript here and there.
Here are the main reasons why this approach felt right:
- It is very easy to maintain. Once the design is done, you simply write in Markdown and you are good to go. It is also easy to modify a theme or have a collection of themes stored in a directory with a bunch of HTML, CSS, JavaScript and image files.
- It is super quick to deploy anywhere without having any kind of specific server requirements such as PHP, Python, SSL, MySQL, Apache, etc. Everything is static and can be uploaded almost everywhere!
- It's also quite secure in the end as there is no need to perform updates, no need to authenticate users or deal with a database.
The site is deployed to Cloudflare Pages, which automatically builds and publishes on every push to main.
uv sync
# Or with pip:
# python -m venv .venv && source ./.venv/bin/activate
# pip install -r requirements.txt# Build the website
invoke build
# Watch for changes
invoke livereload
# Build for production (Cloudflare Pages deploys automatically on push)
invoke publish