website

Sources for my personal website
Log | Files | Refs | README

commit 8e14efe0c04900a99eb66617bd649a20966eb287
parent aa036ddf3b17537bd7fd282099adbb6d776591d6
Author: Sven Möller <sven-moeller@outlook.de>
Date:   Mon, 13 Dec 2021 11:05:14 +0100

Clean README

Diffstat:
MREADME.md | 52++++++++++++++++------------------------------------
1 file changed, 16 insertions(+), 36 deletions(-)

diff --git a/README.md b/README.md @@ -1,63 +1,44 @@ --- -title: Building a static website +title: Sources for my personal website --- - -Here I describe how I (automatically) build my website. +See <https://svenmoeller.xyz> ## Prerequisites -On server: - - `pandoc` - `git` - `make` -On local machine: +## Build instructions -- `git` -- A text editor + make + +Will build it to the target directory. +Standard is `./dst/`, can be changed with `DST_DIR`. + + make clean + +Removes the target directory. ## 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. -The `markdown` files get converted to `html` using the file `template.html` as a template. +The `markdown` files get converted by `pandoc` to `html` using the file `template.html` as a template. The appearance of the website is defined in `style.css`. The `Makefile` contains the recipe for building the website from source. -## Build process - -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 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 repository on my server. - -There I have a `post-receive` hook that checks out the work tree to a folder on the server. - -The hook then runs `make clean` and `make` inside this folder. -This builds the website to the destination folder. - -I have `nginx` set up to serve content from this destination folder. - -## Workflow +I have a `post-receive` hook that checks out the work tree to a directory on the server. -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. +The hook then runs `make` inside this directory. +The target directory points to the place from where I serve the page with `nginx`. ## See also -- https://toroid.org/git-website-howto -\ No newline at end of file +- <https://toroid.org/git-website-howto>