1
0
Fork
You've already forked smolmd
0
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.
  • PHP 97.9%
  • CSS 1.9%
  • Shell 0.2%
2026年06月28日 22:57:54 +02:00
htdocs better coding style 2026年06月28日 22:57:54 +02:00
markdown-sample better installation script 2026年06月28日 22:53:55 +02:00
.gitignore better installation script 2026年06月28日 22:53:55 +02:00
install.sh better installation script 2026年06月28日 22:53:55 +02:00
prefs-sample.ini Init repository 2026年06月28日 22:14:20 +02:00
README.md add some web server instructions 2026年06月28日 22:45:14 +02:00

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.md is the home page; any other name.md is reachable at /name.
  • blog/ is a folder of posts, /blog/ lists them newest-first and publishes an /blog/rss.xml feed.
  • _header.md and _footer.md are the site header and footer; style.css is 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).