slweb is a static website generator which aims at being simplistic. It transforms custom Markdown-like syntax into HTML.




Q: Is this suckless?

A: No. SGML, and by extension, HTML, isn't suckless.

Q: Why do you call it “simple” then?

A: Because one is not the synonym for the other.

Q: Why not make a website generator as a shell script?

A: slweb was a shell script in its conception (check its history of commits in git). However, I wanted to implement Markdown links with link ids [like][this]. This requires multiple passes by the parser and is better implemented as a full-blown program in C anyway. The other reason was that sed and awk have limits, which some of my pages hit.

Q: My static website generator is “truly simple”, this is not simple!

A: Good for you. By the way, that is a statement and not a question.


Optional dependencies


$ git clone
$ cd slweb
$ su

Then, if you have djb redo:

# redo install

if you don't:

# ./do install

Persistent build configuration file

The file config.redo will be sourced when building targets which also accept configuration through environment variables. For example, CC and PREFIX are specified in config.redo.


Replace gcc in CC with cc and add -D_BSD_SOURCE, eg:

# CC='cc -g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=200809L
	./do install

and change MANPREFIX to


Install (Arch)

$ <aur_helper> -S slweb


See the examples/ directory in this repository.

Given the file index.slw in the current directory:

site-name: Test website
site-desc: My first website in slweb

# Hello world

This is an _example_ of a statically generated HTML.


after using the command:

$ slweb index.slw > index.html

file index.html contains:

<!DOCTYPE html>
<html lang="en">
    <title>Test website</title>
    <meta charset="utf8">
    <meta name="description" content="My first website in slweb">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="generator" content="slweb">

<h1>Hello world</h1>

<p>This is an <em>example</em> of a statically generated HTML.</p>


TODO (checklist)

See the file TODO for more information.

Bugs and limitations

Bugs can be reported using the ticket tracker. See the manpage (man slweb) after installing slweb for more information.


slweb - Simple static website generator.
Copyright (C) 2020-2023 Страхиња Радић

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Previous commit: index.slw e5c01be 2023-10-02 21:12:11 +0200 (Страхиња Радић) (HEAD -> master, origin/master, origin/HEAD)

Generated by slweb © 2020-2023 Strahinya Radich.