commit b6fa452c46f09357a69fefd2d9681c29df9fa944
parent 969571ffc973d8ed13b11127830a703f6dd9441f
Author: Sven Möller <sven-moeller@outlook.de>
Date: Fri, 10 Dec 2021 21:53:07 +0100
Update README
Diffstat:
M | README.md | | | 32 | +++++++++++++++++++++----------- |
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
@@ -5,16 +5,27 @@ title: Building a static website
Here I describe how I (automatically) build my website.
+## Prerequisites
+
+On server:
+
+- `pandoc`
+- `git`
+- `make`
+
+On local machine:
+
+- `git`
+- A text editor
+
## Source files
The pages are written in `markdown` format.
+The title of the page is defined in a `yaml` block at the beginning of the file.
-I have two `html` documents, `_header.html` and `_footer.html`.
-They get added at the beginning and the end of the page (respectively).
-So I can change something in the header or the footer and it will change on all pages.
-
-The style is defined in a stylesheet called `style.css`.
+The `markdown` files get converted to `html` using the file `template.html` as a template.
+The style is defined in a style sheet called `style.css`.
## Build process
@@ -22,16 +33,16 @@ I use a `Makefile` for building the website.
The destination folder for building defaults to `./dst` but can be changed with the environment variable `DST_DIR`.
The default target (`make all`) creates the destination folder
-and copies the stylesheet and all the `markdown` files (converted to `html`,
-with header and footer added) to the folder.
-I convert them to `html` using `pandoc`, but every other converter would do.
+and copies the style sheet and all the `markdown` files (converted to `html`,
+using the template) to the folder.
+I convert them to `html` using `pandoc`.
`make clean` will remove the destination folder and all its contents.
## Deployment
I use `git` for version control.
-The changes get pushed to a bare repo on my server.
+The changes get pushed to a bare repository on my server.
There I have a `post-receive` hook that checks out the work tree to a folder on the server.
@@ -44,4 +55,4 @@ I have `nginx` set up to serve content from this destination folder.
I make changes to the site by editing the local `markdown` files.
Then I commit the changes to my hit repo.
-When I push the changes to the server the `git` hook will take care of the rest.
-\ No newline at end of file
+When I push the changes to the server the `git` hook will take care of the rest.