forked from alema/rivet
rivet: a simple static site generator
fixes: - fixed the mess of options and general inconsistencies between program man page and help message - fixed some cases where rivet should fail but didn't and specified return values for all exit conditions - fixed the header system, before the header would have been added inside of <head></head> which is incorrect, browsers would fix it on the fly but still it is not correct. Now _header.html contents are put inside <header></header> at the beginning of <body> - fixed <footer> outside of <body> - some fixes in the man page additions: - added the requirement for _metadata.html, this file contains tags and html metadata that is put inside <head> - the main article is now enclosed inside <article></article> tags for better styling |
||
---|---|---|
.gitignore | ||
LICENSE | ||
makefile | ||
README.md | ||
rivet.1 | ||
rivet.sh | ||
TODO |
Rivet: static site genetator
Rivet is a static site generator that takes a directory containing markdown markdown files (and a couple special ones) and generates an output directory that can be uploaded to a server.
Rivet uses lowdown(1)
to convert the markdown files to html, as such refer to
the lowdown(5)
manpage for the details of the dialect of markdown and the
possible metadata that it can parse.
Dependencies
- lowdown
- POSIX utilities
- POSIX sh
Examples
Generate site from directory to cool_site
$ rivet -o cool-site/ secret-sauce/ cool-url
The makefile I use to generate my site
SRCDIR = src
DESTDIR = dst
DOMAIN = alemauri.eu
all:
rivet -o ${DESTDIR} ${SRCDIR} ${DOMAIN}
test: all
xdg-open ${DESTDIR}/index.html
install: all
rsync -vmruLz --delete ${DESTDIR}/ www@${DOMAIN}:/www/
clean:
rm -rf ${DESTDIR}
The source directory
The source directory tree should at least contain:
index.md
: will be converted toindex.html
_header.html
: contains the stuff to be placed inside all headers_footer.html
: contains the stuff to be placed inside all footers
Obviously anything can go in the source direcory, keep in mind that everything that is not markdown files will be just copied over.