Static site generator
  • Common Lisp 95.1%
  • Makefile 4.9%
Find a file
2026-02-08 13:36:37 +01:00
.gitignore Update gitignore 2025-09-12 10:25:59 +02:00
dev.metalisp.ssg.asd Update system files 2025-12-21 12:06:19 +01:00
LICENSE Initial commit 2024-12-19 10:41:15 +01:00
Makefile Update Makefile 2026-01-06 11:39:33 +01:00
ml-ssg.lisp Update main navigation 2026-02-08 13:36:37 +01:00
README.org Update README 2026-01-14 10:59:22 +01:00

dev.metalisp.ssg

Introduction

This repository includes source code written in Common Lisp which is a static site generator which fulfills my personal needs. My motivation to develop this static site generator was to manage content for my website https://www.metalisp.dev

What I need is maximum flexibility for defining the structure of pages. Most of the static site generators out there are focus to a specific domain for example documentations or weblogs.

How does it work?

  @startuml
  actor "User" as User
  participant "main" as Main
  participant "read-site-configurations" as ReadConfig
  participant "with-read-file" as ReadFile
  participant "make-site*" as MakeSite
  participant "site-build" as SiteBuild
  participant "File System" as FS

  User -> Main
  activate Main

          Main -> ReadConfig : (read-site-configurations "sites.lisp")
          activate ReadConfig

                  ReadConfig -> ReadFile : (with-read-file (in pathname) ...)
                  activate ReadFile

                          ReadFile -> FS : (uiop:with-input-file (in pathname))
                          activate FS
                                  FS --> ReadFile : file stream
                          deactivate FS

                          ReadFile -> ReadConfig : (read in)
                  deactivate ReadFile
                  ReadConfig --> Main : list of site configurations
          deactivate ReadConfig

          loop for each site configuration
                  Main -> MakeSite : (make-site* config)
                  activate MakeSite
                          MakeSite --> Main : site object
                  deactivate MakeSite

                  Main -> SiteBuild : (site-build site)
                  activate SiteBuild
                          SiteBuild --> Main : HTML output
                  deactivate SiteBuild
          end

          Main --> User : Exit
  deactivate Main
  @enduml
Sequence Diagram explaining the inner workings of ml-ssg

When you run the ml-ssg binary it is looking for a sites.lisp file (See: 1) in the same directory it is called.

  ((:name "main"
    ;; name the site

    :url "https://www.metalisp.dev/"
    ;; the url of the site

    :content-directory "content/"
    ;; this directory includes markdown files. It is relative to the directory ml-ssq is called in.

    :build-directory "public/"
    ;; The directory where HTML is generated to. It is relative to the directory ml-ssg is called in.

    :pages-data-file "main-de-pages.lisp"
    ;; A lisp file which includes pages definitions.
  ))
Example sites.lisp file