All the sources of the Grunndev website/wiki (grunndev.nl).
The Makefile contains the following commands:
- all (default): builds the website.
- clean: removes the build output.
- serve: serve the build output using Python 3's
http.server
module.
Options:
- url: set the base URL (e.g.
url='http:\/\/grunndev.nl'
). Slashes must be escaped as this value is put into a sed expression. The default value ishttp:\/\/0.0.0.0:8000
.
Examples:
make
make serve
make clean serve
make url='http:\/\/grunndev.nl' clean all
- GNU Make
- cmark
- Python 3 (optional, only used for
make serve
)
A markdown document:
- Create a new markdown file in
source/
. - The first line of this file is put into the
<title>
tags of the generated HTML document and is ignored by cmark. - After the first line you can put the contents of the document.
- Add the filename in the
md
array in the Makefile. - Optional: Add a link in the menu (
source/_header.html
) or another document.
{{url}}
is replaced with the value set in the url
option of the
Makefile.
A file:
- Add the new file in
source/
. - Add the filename in the
files
array in the Makefile.
The contents of these two files are wrapped around the HTML that's generated from the markdown files.
The following strings are replaced with different string:
{{url}}
is replaced with the value set in theurl
option of the Makefile.{{random}}
is replaced with a random number.{{title}}
is replaced with the title of the current document.
- Changing
_header.html
or_footer.html
doesn't trigger a rebuild. Usemake clean all
.