- [ ] Clone this repo. Run
maketo build it andmake serveto serve it: the blog is running! - [ ] Search the project for “todo” (case insensitive) to locate generic placeholders and fill them in (or do it later).
- [ ] Design (css and fonts) is exactly the same as from my personal blog (https://martinsos.com), from which this template is derived, so if you wish to change it a bit for yourself, I would be grateful :). If not, hey, at least I will be proud knowing you used this template when I see your blog in the wild!
- [ ] That is it! This is now your blog in Emacs Lisp. Delete this heading, then read the rest of the README to learn about the project and how to run it. If you will be making the blog source public, consider adding a link to this template repo to the mentions/credits.
- Minimal: small set of core features, simple structure, simple design. Focus on content, not features.
- Evergreen: using a small set of mature, stable tech (Emacs, bash, Makefile, html/css). Minimal/no external dependencies. Minimal updating/maintenance needed.
- Any page can be written in Org mode and is converted to html via
ox-publishbuilt-in Emacs package. - Build pipeline is fully written in Emacs Lisp, uses no external packages, is decoupled from any Emacs config used to edit the blog, and produces a simple static web site.
- Main page, about page, posts, jots (microblogging).
- Auto-generated list of posts on the main page.
- Auto-generated RSS feed.
- Auto-generated anchor link for each heading.
- Minimal CSS for modern, minimal look.
- Nice fonts (Iosevka) + instructions how to set up any other.
- Rich code highlighting (highlight.js) with additional custom support for Emacs Lisp.
- Short utility scripts (tools) for manually optimizing images and fonts.
- Optimized for SEO / performance (to a practical degree).
src/- all the source material that makes up the blog: pages, posts, html layouts, css, js, images, …- There is a common
layout.el, and then there is a post-specificlayout-post.el.
- There is a common
build/- build pipeline: logic (mostly) in elisp that takes all fromsrc/and produces a web page from it indist/.dist/- an actual blog that can be published (distributed) as a web page.tools/- helper tooling, like image optimization and font subsetting.
make serveto run a simple dev server that hosts the built blog (indist/) onlocalhost.make build-inc(or justmake) to generate/build the blog fromsrc/indist/. This is incremental build, so deleted files will remain around and state indist/can become wrong with time due to that, but is fast and practical for development.make build-cleanto generate/build the blog fromsrc/from scratch indist/. This is clean build, therefore slow because it first deletes all fromdist/, but it guarantees that contents ofdist/will correctly correspond to contents fromsrc/. Slow, but guarantees correctness.
- Create new or edit existing post in
src/posts/. Its images/assets goes into the dir next to it with the same name as the post file. - When adding an image, run
tools/optimize-image.sh path/to/image.pngto produce a.webpnext to it, and reference the.webpfrom the org file. The build only copies.webpimages todist/; the original.png=/.jpg= is kept in the repo as a master but is not published. make serveonce in the terminal at the start of the writing sessionproject-compile(orproject-recompileon later calls) to re-build the project from emacs as needed while editing the filemake build-cleanwhen preparing to publish the blog.
First, I should make sure that content in dist/ is what I want to publish.
Normally I do make build-clean and then make serve to verify it is all looking good.
Then, make publish to publish the contents of dist/!
Currently this blog deploys to Cloudflare, but can as easily be deployed to any static content hosting (provider).
- For the sake of simplicity, I on purpose don’t have
sitemap.xml, since this blog is simple enough and well internally linked that having one wouldn’t bring any value.
This project is not vibe coded or AI driven. AI is a useful tool and I/we do use it, but every line of code, every detail and every decision in this project is owned by a human and code quality is maintained to reasonably high standards.
Initial idea and push for implementing this blog primarily in Emacs Lisp and Org mode came from this great video from System Crafters: Build Your Website with Org Mode.
