update documentation describing new template blocks and bump license - saait - … | |
git clone git://git.codemadness.org/saait | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 2877abf24a88d4ac8fdf7e62a1fc44619736551c | |
parent 3efe93e903986896139eac808fc6329a80b7b496 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 1 Jun 2019 17:12:51 +0200 | |
update documentation describing new template blocks and bump license | |
Diffstat: | |
M LICENSE | 2 +- | |
M README | 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 <[email protected]> | |
+Copyright (c) 2016-2019 Hiltjo Posthuma <[email protected]> | |
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 pag… | |
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: | |