This project showcases a minimalist blog website created entirely in Golang.
Ensure you have the following installed on your system:
- Clone the repository.
- Install Go dependencies via
go mod tidy
- Install Node.js dependencies via
npm install
- Run
npm watch
to generate thetailwind.css
file and update it while working on the project. - Run
chroma --style=STYLE_NAME --html-styles > static/css/chroma.css
to generate the chroma css file. - Run
air
to start the live reloading service.
Markdown files added to the /posts
folder will be used to generate posts.
These files are expected to begin with a metadata section as follows:
---
author: Author name
date: YYYY-MM-DD
brief: A brief description of the article.
---
You may specify a custom title
, slug
and tags
.
title
and slug
are automatically generated based on the topmost header in the file.
Some important directories and files in the project are:
configs/config.json
: configuration file for the project.internal/templ/
: reusable components and views.posts/
: markdown files for blog posts.
- Templ for Golang based templating of HTML files.
- Tailwind CSS for styling.
- Chroma for syntax highlighting in Markdown codeblocks.
- Air for live reloading of the website.
- Heroicons for icons.
- Simple Icons for popular brand logos.
Feel free to contribute to this project by creating a pull request.