My blog!
https://pgmtx.com
- Nim 69%
- CSS 16%
- JavaScript 7.8%
- HTML 3.4%
- Dockerfile 2.6%
- Other 1.2%
Blogo
This is the source code of my blog. It includes markdown pages, assets, and scripts.
Features
- Draft articles: articles marked as draft can be accessed if you know their page name, but they won't be listed in the index page.
- Cache system: if an html article is more recent than the markdown one, it won't be regenerated.
Run Locally
Install the following tools:
- Nim compiler, to compile Nimscript and Nim files;
- Pandoc, to convert markdown files to html.
- Bun, which is a dependency for highlightme submodule.
- An http server. I'm using Python to do so.
Clone the project and go to the project directory. You have to clone the project recursively, otherwise the render script won't work.
git clone --recursive https://codeberg.org/pgmtx/blogo.git
cd blogo
Generate the html files. When executed for the first time, it will install dependencies for highlightme.
nim r scripts/render.nim
Start the server (inside the public directory).
python3 -m http.server
To create a new article, you can execute the script new_article.nims.
nim e scripts/new_article.nims v_and_nim "Comparing V and Nim"
When modifying a submodule, you can update them in this project using the following command:
git submodule update --recursive --remote