saait

Simple static page generator
git clone https://git.sinitax.com/codemadness/saait
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 2877abf24a88d4ac8fdf7e62a1fc44619736551c
parent 3efe93e903986896139eac808fc6329a80b7b496
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat,  1 Jun 2019 17:12:51 +0200

update documentation describing new template blocks and bump license

Diffstat:
MLICENSE | 2+-
MREADME | 29++++++++++++++++++-----------
2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -1,6 +1,6 @@ ISC License -Copyright (c) 2016-2018 Hiltjo Posthuma <hiltjo@codemadness.org> +Copyright (c) 2016-2019 Hiltjo Posthuma <hiltjo@codemadness.org> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/README b/README @@ -6,14 +6,14 @@ Pronounciation: site Some parts are intentionally hardcoded, C knowledge is required. -Dependencies: -------------- +Dependencies +------------ - C compiler (C99), tested on gcc, clang. - libc -Tested and works on: --------------------- +Tested and works on +------------------- - OpenBSD - Linux (glibc) - Windows (mingw and cygwin) @@ -38,11 +38,18 @@ the templatename "page" is special and will be used per page. otherwise the directory name is used as the output file, for example templates/atom.xml/templatefiles* will be: output/atom.xml -See config.h to modify the templates. +the following filename prefixes for template blocks are detected: +"header." - header block. +"item." - item block +"footer." - footer block. -Cfg file and template syntax: ------------------------------ +If a filename does not exist then the template block is not processed and will +have the same result as an empty file. + + +Cfg file and template syntax +---------------------------- Special variables set: htmlfile (if not already set) path to input HTML content filename. @@ -59,8 +66,8 @@ ${} escaped HTML/XML string. %{} insert contents of file of variable value. -Usage: ------- +Usage +----- 1. Adjust the global config.cfg file which provides defaults for all pages. 2. Call saait from a directory that is providing a config.cfg and a @@ -78,8 +85,8 @@ Usage: templates/index.html/header.html -Usage examples: ---------------- +Usage examples +-------------- this is a basic example: