From d05f3d3dff0c50ad93689629517f8ce299ed60ed Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Thu, 10 Sep 2020 16:21:23 +0200 Subject: [PATCH] added man page --- rivet.1 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 rivet.1 diff --git a/rivet.1 b/rivet.1 new file mode 100644 index 0000000..9592999 --- /dev/null +++ b/rivet.1 @@ -0,0 +1,130 @@ +.TH RIVET\-VERSION 1 "JULY 2020" "Alessandro Mauri" + +.SH NAME +rivet \- simple static site "compiler" + +.SH SYNOPSIS +.SY rivet +.OP \-vhelfsu +.OP \-o destdir +.OP \-p string +.I srcdir/ +.I domain +.YS + +.SH DESCRIPTION +.PP +Rivet is a POSIX shell script that relies on +.BR lowdown(1) +to convert markdown ( refer to +.BR lowdown(5) +for more info on the dialect of markdown used and metadata) files to html and +build an output directory which can be uploaded to an http server. +.PP +Rivet scans the +.I srcdir/ +for markdown files, converts them to html and puts them along with any other +non-markdown files inside the destination directory named +.I dst/ +by default. Rivet also generates a section called "Pages" inside the index file +containing links to all other html files along with their names extracted either +from the markdown metadata or the filename and a sitemap used by crawlers and +indexers, that's what the +.I domain +field is used for. + +.SH OPTIONS +.IP "\-o destdir/" +Override the default destination folder with +.I destdir +.IP "\-p string" +Renames the "Pages" section in index.html to +.I string +be aware that altough the section name will be changed the id will remain +"Pages" +.IP \-v +verbose option, sets -x and prints every command as it runs +.IP \-h +prints help information +.IP \-e +Disables the application of the user-supplied header in +.I _header.html +.IP \-f +Disables the application of the user-supplied footer in +.I _footer.html +.IP \-l +Disables the generation of the "Pages" section in index.html +.IP \-s +Disables the sitemap generation +.IP \-u +Changes the default protocol used in links from https to http + +.SH USAGE +To generate a static website with rivet a source directory must be created first +containing all the website's source files (such as images, scripts,css files, +etc), pages written in markdown (see +.BR lowdown(5) +for the specific dialect and possible metadata) and two special files: +.I _header.html +and +.I _footer.html + +These files contain all the content that rivet will put inside the header +and footer sections. The only article that's required for a site to be generated +is +.I index.md +that has to be placed at the source directory's root. + +.SH EXAMPLES +The minimal source directory tree is: +.PP +.EX +src/ + - index.md + - _header.html + - _footer.html +.EE + +.PP +Where +.I _footer.html +contains +.EX +

Footer

+.EE +And +.I _header.html +contains +.EX +

Header

+.EE + +.PP +Note that since the contents of +.I _header.html +and +.I _footer.html +will be placed inside the correct tags, the files themselves do not need to +contain
and