| htdocs | better coding style | |
| markdown-sample | better installation script | |
| .gitignore | better installation script | |
| install.sh | better installation script | |
| prefs-sample.ini | Init repository | |
| README.md | add some web server instructions | |
smolmd
Serve a folder of Markdown files as a tiny, fast, smolweb-friendly website: clean HTML, one small stylesheet, no JavaScript, no build step, no database.
Run
Try it locally
From inside htdocs/:
php -S localhost:8080 index.php
Open http://localhost:8080/. That's it, nothing to install or configure.
With Apache2, nginx or lighttpd
Assuming you install smolmd into /var/www/ directory.
Configure a classical Web server with PHP environment and point the
document root to the /var/www/smolmd/htdocs directory. Just set the
open_basedir
parameter in php.ini to allow your web server to access to the whole
smolmd directory where your install it.
open_basedir = "/var/www/smolmd"
Write
Put your pages in markdown/:
index.mdis the home page; any othername.mdis reachable at/name.blog/is a folder of posts,/blog/lists them newest-first and publishes an/blog/rss.xmlfeed._header.mdand_footer.mdare the site header and footer;style.cssis the stylesheet.
In a post, the first # heading becomes the title, the first date line the
date, and the first paragraph the summary shown on listings.
You can override these per page with an optional front-matter block at the very
top of the file, written like prefs.ini:
+++
title = My post
date = 2026年06月28日 16:45
description = One line for search engines and social cards.
summary = Short text shown on the blog index and in the RSS feed.
keywords = smolweb, php
image = /cover.png
draft = true
+++
Every key is optional. draft = true keeps a post out of the index and the
feed while leaving it reachable at its URL and marked DRAFT, handy for posts
in progress.
Default site settings (title, author, language, ...) live in prefs.ini.
Configure
Optional: everything is explained in the comments of htdocs/config.php
(cache lifetime, public URL, where your content lives).