SSSG is a layout-based static site generator built for parallelism and minimalism while being flexible and feature-full. Think of it as a layer of glue, which glues layers of papers into 3D models. It's perfect for simple personal sites that adheres to the KISS Principle while being able to follow the Suckless Philosophy and get rid of Dependency Hell.
It gives you the choice to be in control of your own site. But in return, you need to give it love and time like a wise man once spoken: “先苦后甜”.
Usage: make -j4 (or any number you like)
+--------------------+ +--------------------+ +--------------------+
| _lay/main.sh | | _lay/post.sh | | post/_www/config |
+--------------------+ +--------------------+ +--------------------+
|exit | |LAYOUT=_lay/main.dh+| |LAYOUT=_lay/post.dh+|
+---------+----------+ |F=$FILE | |DATE=$(date $FILE) |
| +---------+----------+ |T=$(head -n $FILE) |
+---------+----------+ | +---------+----------+
| _lay/main.dhtml | +---------+----------+ |
+--------------------+ | _lay/post.dhtml | +---------+----------+
|<!DOCTYPE html> | +--------------------+ | post/test.md |
|<html> | |${F} | +--------------------+
| <head> | |==== | |Why? |
| <title>${T}</ti+| | | |---- |
| <head> | |${CONTENT} <------ |- Parallel and fast |
| <body> | | | |- Markdown-powered |
| ${CONTENT} <------ |--- | |- Minimal outputs |
| ... | |Created by ${DATE} | |- Flexiblility++ |
+--------------------+ +--------------------+ +------------------- +
^
--- rm -rf $(TARG)/* |
+----------/ |
| clean | _bin/html.sh post/test.md > $(TARG)/post/test.html
+==========+-----+ /
| Makefile | all + ---- _bin/html.sh index.html > $(TARG)/index.html
+==========+-----+ \
| +------ _bin/atom.sh post/ > $(TARG)/%/atom.xml
| \
| -------- gzip -9 (needed) + cp (needed)
+------+--+
| check | validate html/css/xml online -> ./check.sh $(TARG)
+---------+
The installation is simple, just make this your site:
git clone git://github.com/pickfire/www --depth 1
rm -rf www/.git
Configurations can be done by editing config.sh
and config.mk
.
_dyn/tor
needs to be manually linked to /srv/tor which uses fastcgi.
-
The
_www/config
found at the previous/current directory of the input file will be sourced, shell script and variables are optional. -
Add shell functions/variables to file.sh (just change extension), these can aid in generating dynamic contents. E.g. menu
-
In between those lines of code, add
LAYOUT=_lay/layout.dhtml
to paste the current content intolayout.dhtml
's${CONTENT}
. (Required) -
Use
${VAR}
(must be UPPERCASE) in files to substitute it to the variable, unused variables (line) will be deleted when generation is completed. -
Makefile does not look for directories with names starting with
_
.
- cmark: https://github.com/jgm/cmark (A commonmark implementation in C)
- mksh: https://www.mirbsd.org/mksh.htm (More features compare to dash)
- Compatible with GNU coreutils/sed/grep (required modification to
date
, checkea401dcb
)
atom.sh
- Find Markdown files and generate an Atom feed from itcheck.sh
- Find HTML/CSS/XML files and verify it onlinecss.sh
- Minify CSS files with sed and trhtml.sh
- Output HTML content with a file as inputmap.sh
- Generate the sitemap and urllist
- Personal help -> Email [email protected]
- Issue Tracker
- Pull Requests
- Source code (Mirror)
- Paper Color Theme as a nice color scheme
- Statikiss framework project which is another static site generator based on suckless
- Suckless philosophy which always focus to keep the code minimal
- YAML frontmatter that enhance the features of a site generator
- Device Ready such a small beautiful site
- Statikiss framework project which is a bash static site generator inspired by suckless philosophy
- Pickfire's site (Mirror)
- Add your site here