rivet/README.md

53 lines
1.4 KiB
Markdown
Raw Normal View History

2020-09-09 00:37:08 +02:00
# Rivet: static site genetator
2020-09-11 12:14:29 +02:00
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.
2020-09-09 00:37:08 +02:00
## Dependencies
- [lowdown](https://kristaps.bsd.lv/lowdown/)
2020-09-10 00:49:01 +02:00
- POSIX utilities
2020-09-09 00:37:08 +02:00
- POSIX sh
2020-09-10 00:49:01 +02:00
## Examples
Generate site from directory to `cool_site`
```sh
2020-09-10 01:01:12 +02:00
$ rivet -o cool-site/ secret-sauce/ cool-url
2020-09-10 00:49:01 +02:00
```
The makefile I use to generate my site
```make
SRCDIR = src
DESTDIR = dst
2020-09-10 01:01:12 +02:00
DOMAIN = alemauri.eu
2020-09-10 00:49:01 +02:00
all:
2020-09-10 01:01:12 +02:00
rivet -o ${DESTDIR} ${SRCDIR} ${DOMAIN}
2020-09-10 00:49:01 +02:00
test: all
xdg-open ${DESTDIR}/index.html
install: all
2020-09-10 01:01:12 +02:00
rsync -vmruLz --delete ${DESTDIR}/ www@${DOMAIN}:/www/
2020-09-10 00:49:01 +02:00
clean:
rm -rf ${DESTDIR}
```
2020-09-11 12:14:29 +02:00
## The source directory
The source directory tree should at least contain:
- `index.md`: will be converted to `index.html`
- `_header.html`: contains the stuff to be placed inside all headers
- `_footer.html`: contains the stuff to be placed inside all footers
2020-09-09 00:37:08 +02:00
2020-09-11 12:14:29 +02:00
Obviously anything can go in the source direcory, keep in mind that everything
that is not markdown files will be just copied over.
## Similar tools
2020-09-09 00:37:08 +02:00
- [saait](https://git.codemadness.org/saait/file/README.html)
- [ssg](https://www.romanzolotarev.com/ssg.html)