diff options
author | sternenseemann <sternenseemann@systemli.org> | 2020-08-07 23:58:50 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2020-08-08 02:16:15 +0200 |
commit | e5cd70a596f797ddff973861a5b72d2af1dec1b9 (patch) | |
tree | 95f8d2f93e79e8b1a67475897cff5a10f8f4225a /config.mk | |
parent | 351d951158992488df4a679a4a882468b0b21793 (diff) |
feat(treewide): major rework
Unfortunately, I got a bit carried away after realizing that the initial change would be a breaking change anyways, so I am now left with a huge diff which can't be really split up. Please excuse this. The changes are as follows: * Rename blogpost → entry (breaking): make_blogpost → make_entry, blog_post → blog_entry etc. * Rename blogdefs.h → core.h (breaking) * Split functions from main.c into cgiutil and entry * entry / make_entry: * Use modification time instead of time in filename (breaking) * Rename timestamp → time (breaking) * Add field title (currently basename, breaking) * Add field text and text_size which can be use to store the contents of the associated file using mmap (fields default to NULL and -1 respectively, breaking) * Do PATH_INFO resolving and on disk path building in make_entry instead of in blog_index / blog_rss / blog_entry * entry_get_text: add function to mmap an entry's file into the structure * free_entry: also unmap file if present * make_index: Add function to build an array of entries reverse sorted by time * blog_index / blog_rss: * use make_index instead of scandir and make_blogpost_from_dirent * (blog_rss) use entry_get_text to pass the template the text of the entry. * template: * template_post_index_entry → template_index_entry (breaking) * template_post_single_entry → template_single_entry (breaking) * replace template_error_404() with generic template_error(status) * templates/simple.c: * Use xml library instead of printf * Use entry.text instead of opening the file in the template * include CSS if BLOG_CSS is set in config.h * document internal and public interfaces using doxygen * build process: * build object files individually * build process configuration in config.mk (breaking) * support templates in arbitrary locations * build default config.h if it's missing * add install phase * Rename target to sternenblog.cgi (breaking)
Diffstat (limited to 'config.mk')
-rw-r--r-- | config.mk | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..e53fc72 --- /dev/null +++ b/config.mk @@ -0,0 +1,20 @@ +# your template, must be a single .c file with the extension omitted +TEMPLATE = templates/simple + +PREFIX = /usr/local +WEB_PATH = /share/sternenblog +MAN_PATH = /share/man +DOC_PATH = /share/doc/sternenblog + +INSTALL = install +RM = rm +CP = cp + +# convert from imagemagick +CONVERT = convert + +CC = gcc +CFLAGS = -Wall -pedantic --std=c99 -Os + +# debugging +# CFLAGS = -Wall -pedantic --std=c99 -ggdb -Og |