saait

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

commit ee26bbcc1843409f40404ce7523ed2e0e3e6bf3d
parent 0debc54499a6b64f5498f5f3746cd5cebb83d54b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  4 Dec 2016 14:35:55 +0100

remove STRP macro, clarify page template in config.h

Diffstat:
Mconfig.h | 15++++++++-------
Msaait.c | 2--
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/config.h b/config.h @@ -18,6 +18,14 @@ struct template { }; static struct template templates[] = { + /* special: will be applied per page */ + { + .name = "page", .blocks = { + { .name = "page/header.html" }, + { .name = "page/item.html" }, + { .name = "page/footer.html" } + } + }, { .name = "atom.xml", .blocks = { { .name = "atom.xml/header.xml" }, @@ -33,13 +41,6 @@ static struct template templates[] = { } }, { - .name = "page", .blocks = { - { .name = "page/header.html" }, - { .name = "page/item.html" }, - { .name = "page/footer.html" } - } - }, - { .name = "sitemap.xml", .blocks = { { .name = "sitemap.xml/header.xml" }, { .name = "sitemap.xml/item.xml" }, diff --git a/saait.c b/saait.c @@ -6,8 +6,6 @@ #include <string.h> #include <unistd.h> -/* string and byte-length */ -#define STRP(s) s,sizeof(s)-1 #define LEN(s) (sizeof(s)/sizeof(*s)) struct config {