-novaburst-_-hacks..ssg7Please don’t upload to GitHub

sr.ht/~novaburst-dev/ssg/tree

https://hg.reactionary.software/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Nova 0bac362295 Added ssg files -- this is a fork of https://www.romanzolotarev.com/ssg.html 1 year ago
COPYING Added ssg files -- this is a fork of https://www.romanzolotarev.com/ssg.html 1 year ago
Makefile Added ssg files -- this is a fork of https://www.romanzolotarev.com/ssg.html 1 year ago
README.md Added ssg files -- this is a fork of https://www.romanzolotarev.com/ssg.html 1 year ago
ssg Added ssg files -- this is a fork of https://www.romanzolotarev.com/ssg.html 1 year ago

README.md

ssg

ssg is a static site generator written in shell.

ssg converts markdown files to html with either lowdown(1) , Markdown.pl or smu(1), copies .html files with <HTML> tag as they are. for the rest of .html files ssg extracts their titles from <H1> tag, prepends _header.html, appends _footer.html, copies from src to dst directory, and generates sitemap.xml, ignores files with names starting in .* or listed in src/.ssgignore.

install

Either lowdown(1) , Markdown.pl, or smu(1) are required if there are *.md files. Just run make install as root from the source repository. The default prefix is /usr/local

usage

make sure ssg and either lowdown(1) , Markdown.pl or smu(1) are in your $PATH :

$ PATH="$HOME/bin:$PATH" $ mkdir src dst $ echo '# hello, world!' > src/index.md $ echo '<html><title></title>' > src/_header.html $ bin/ssg6 src dst 'test' 'http://www' ./index.md [ssg] 1 files, 1 url $ find dst dst dst/.files dst/index.html dst/sitemap.xml $ open dst/index.html

markdown and html files

html files from src have priority over markdown ones. ssg converts markdown files from src to html in dst and then copies html files from src to dst. in the following example src/a.html wins:

src/a.md -> dst/a.html src/a.html -> dst/a.html

incremental updates

on every run ssg saves a list of files in dst/.files and updates only newer files. if no files were modified after that, ssg does nothing.

$ bin/ssg6 src dst 'Test' 'https://www' [ssg] no files, 1 url $

to force the update delete dst/.files and re-run ssg.

$ rm dst/.files $ bin/ssg6 src dst 'Test' 'https://www' index.md [ssg] 1 file, 1 url $

changes

this ssg is a derivative of this one which was modified to add support for smu(1)

license

0BSD