Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix(main): set PATH_INFO=/ for index HEAD master | sternenseemann | 2020-12-28 | 1 | -1/+1 |
| | | | | | We assume that SCRIPT_NAME does not end in a slash or is empty and thus PATH_INFO _must_ start with a slash. | ||||
* | fix(templates/simple): fix link back if script_name is empty | sternenseemann | 2020-12-28 | 1 | -2/+9 |
| | |||||
* | fix(main): correct routing sanity check | sternenseemann | 2020-09-19 | 1 | -2/+6 |
| | |||||
* | refactor(headers): allow multiple inclusions | sternenseemann | 2020-09-19 | 8 | -6/+48 |
| | |||||
* | refactor(treewide): prefix public/internal API with sternenblog/ | sternenseemann | 2020-08-26 | 18 | -19/+24 |
| | |||||
* | doc(stringutil): init docs | sternenseemann | 2020-08-25 | 2 | -1/+25 |
| | |||||
* | doc(timeutil): init docs for timeutil | sternenseemann | 2020-08-25 | 2 | -5/+36 |
| | |||||
* | fix(timeutil): let flocaltime return actual len | sternenseemann | 2020-08-25 | 1 | -1/+11 |
| | | | | Behavior now more consistent what you'd expect from strftime | ||||
* | doc(template): fix field doc of struct template_data | sternenseemann | 2020-08-25 | 1 | -5/+5 |
| | |||||
* | doc(cgiutil): document server_url | sternenseemann | 2020-08-25 | 2 | -1/+17 |
| | |||||
* | chore(TODO): remove tasks finished by edd4a7e4d5f4d5be6a5fc9db3f7173fc8dc81616 | sternenseemann | 2020-08-25 | 1 | -1/+0 |
| | |||||
* | feat(template): pass context to template, simplify api | sternenseemann | 2020-08-25 | 4 | -135/+142 |
| | | | | | | | | | | | | | | | | | New struct template_data is passed to all template functions, allowing to e. g. reflect the current entry in template_header and to unify template_single_entry, template_index_entry, template_error into template_main which switches behavior depending on data.page_type. BREAKING CHANGES: * remove template_single_entry, template_index_entry, template_error; replaced by template_main * template_header, template_footer: type change refactor(templates/simple): use xml_escape where applicable feat(templates/simple): navigate using header / entry titles feat(templates/simple): change <title> depending on subpage | ||||
* | feat(main): add asserts to catch bugs in routing | sternenseemann | 2020-08-25 | 1 | -0/+9 |
| | | | | These assert runtime assumptions | ||||
* | fix(main): call correct entry template | sternenseemann | 2020-08-25 | 1 | -1/+5 |
| | |||||
* | feat(rss,atom): gen abs paths from webroot if no external_url | sternenseemann | 2020-08-25 | 1 | -22/+23 |
| | |||||
* | refactor(main): rework routing to minimize code duplication | sternenseemann | 2020-08-25 | 2 | -109/+103 |
| | |||||
* | refactor(timeutil): remove debug output | sternenseemann | 2020-08-25 | 1 | -2/+0 |
| | |||||
* | feat(rss,atom): use SERVER_{NAME,PORT} for external URL | sternenseemann | 2020-08-25 | 6 | -42/+85 |
| | |||||
* | chore(TODO): update tasks | sternenseemann | 2020-08-25 | 1 | -2/+2 |
| | |||||
* | fix(send_standard_headers): don't read from uninitialized memory | sternenseemann | 2020-08-25 | 1 | -1/+6 |
| | |||||
* | fix(entry): unget, not get tex in free_entry | sternenseemann | 2020-08-25 | 1 | -1/+2 |
| | | | | fix(entry): initialize full struct in make_entry | ||||
* | doc(sternenblog.cgi): reflect changes to configuration | sternenseemann | 2020-08-24 | 1 | -15/+69 |
| | |||||
* | doc(sternenblog.cgi): fix SEE ALSO section | sternenseemann | 2020-08-24 | 1 | -4/+4 |
| | |||||
* | refactor(timeutil): remove unnecessary localtime call | sternenseemann | 2020-08-24 | 1 | -2/+0 |
| | |||||
* | feat(rss,atom): mmap on demand like in blog_index | sternenseemann | 2020-08-24 | 5 | -87/+105 |
| | | | | | | | | | | | | * entry * add entry_unget_text: implements unmmaping * free_entry: now expects pointer * index: adjust for entry changes * main * adjust for entry changes * use on demand mmaping in blog_atom and blog_rss * shell.nix * add strace for mmap debugging | ||||
* | fix(index): use int for free_index | sternenseemann | 2020-08-24 | 2 | -3/+3 |
| | | | | | Prevents integer overflow and consequently segfaults the return value of make_index is used directly. | ||||
* | fix(stringutil): skip strings that are NULL | sternenseemann | 2020-08-24 | 1 | -10/+12 |
| | | | | Prevents segfaults with careless uses | ||||
* | chore(TODO): keep tzset() based flocaltime | sternenseemann | 2020-08-24 | 1 | -1/+2 |
| | | | | | Seems reliable after fix and further testing, probably cleaner than strftime string manipulation. | ||||
* | chore(shell.nix): add dev environment | sternenseemann | 2020-08-24 | 1 | -0/+7 |
| | |||||
* | feat(main): add simple caching support via max-age | sternenseemann | 2020-08-24 | 3 | -43/+51 |
| | | | | | | * remove support for RSS <ttl> element, remove BLOG_RSS_TTL * add BLOG_CACHE_MAX_AGE, send Cache-Control headers * TODO: more sophisticated caching support? ETag support? | ||||
* | doc(config.example.h): fix documentation output for BLOG_TITLE and BLOG_RSS_TTL | sternenseemann | 2020-08-24 | 1 | -0/+7 |
| | |||||
* | feat(main): add atom feed | sternenseemann | 2020-08-24 | 6 | -40/+172 |
| | | | | | feat(templates/simple.c): link to atom feed as well refactor(templates/simple.c): replace make_link with catn_alloc | ||||
* | fix(Makefile): entry.o depends on config.h | sternenseemann | 2020-08-24 | 1 | -0/+2 |
| | |||||
* | fix(timeutil): only UTC if no daylight saving | sternenseemann | 2020-08-24 | 1 | -1/+1 |
| | | | | Fixes output for BST mostly | ||||
* | feat(entry): allow disabling the strict access check | sternenseemann | 2020-08-24 | 2 | -5/+24 |
| | |||||
* | refactor(config.example.h): restructure | sternenseemann | 2020-08-24 | 1 | -16/+20 |
| | |||||
* | refactor(stringutil): add function catn_alloc to ease url building in main.c | sternenseemann | 2020-08-21 | 8 | -31/+73 |
| | | | | | | | | | * bitutil.{c,h} → stringutil.{c,h} (more appropriate) * new function catn_alloc(size_t n, ...) which concats `n` given strings into an dynamically allocated buffer, mostly useful for building URLs which is done in blog_rss. may be a possibility to use in entry.c, but code there might be too specific. | ||||
* | refactor(templates/simple): use timeutil for time formatting | sternenseemann | 2020-08-21 | 1 | -9/+3 |
| | |||||
* | feat(timeutil): output proper RFC3339 format for atom | sternenseemann | 2020-08-21 | 7 | -33/+95 |
| | | | | | | | | Previously, since we used strftime %z it'd output an offset as +HHMM while RFC3339 requires +HH:MM. Currently we implement outputting this manually which proved to be non-trivial because of the tzset() API. This probably should be improved in the future since I suspect it produces incorrect results in some edge cases. | ||||
* | feat(rss): minor improvements and refactor time formatting | sternenseemann | 2020-08-20 | 4 | -29/+71 |
| | | | | | | | * add timeutil.{c,h}: utility for formatting timestamps * wrap feed description in CDATA * use xml_escaped where applicable * use time of latest entry for lastBuildDate | ||||
* | doc(README): reflect current (unstable) state | sternenseemann | 2020-08-18 | 3 | -16/+49 |
| | |||||
* | doc(sternenblog.cgi): add preliminary user documentation | sternenseemann | 2020-08-14 | 2 | -1/+308 |
| | |||||
* | feat(entry): url encode entry.link | sternenseemann | 2020-08-12 | 3 | -2/+141 |
| | | | | | This makes it possibly to use spaces and some reserved characters of URLs in post filenames. | ||||
* | fix(index): resolve memory leak on make_index error | sternenseemann | 2020-08-12 | 1 | -6/+4 |
| | |||||
* | refactor(entry): move internal http_errno to cgiutil | sternenseemann | 2020-08-11 | 3 | -16/+29 |
| | |||||
* | fix(treewide): use same type when comparing | sternenseemann | 2020-08-11 | 3 | -4/+4 |
| | |||||
* | feat(xml): add support for CDATA sections | sternenseemann | 2020-08-11 | 3 | -27/+131 |
| | | | | | | | | | | * xml_open_cdata and xml_close_cdata add convenient support for this * tracked on stack using the newly introduced field type which is of enum xml_tag_type which may either be XML_NORMAL_TAG or XML_CDATA. * xml_close_all and xml_close_including also support closing CDATA sections now * xml_close_including now behaves like xml_close_all if NULL is given as tag, xml_close_all newly aliased to xml_close_including(..., NULL) | ||||
* | refactor(xml): simplify warnings using macro | sternenseemann | 2020-08-11 | 1 | -28/+18 |
| | | | | | also point stack head to old stack if malloc fails so del_xml_context can still free it. | ||||
* | feat(xml): support for escaping | sternenseemann | 2020-08-11 | 3 | -13/+80 |
| | | | | | | BREAKING CHANGE: xml_open_tag_attrs() now outpus its attribute values xml escaped | ||||
* | docs(cgiutil): you can keep pointers to literals | sternenseemann | 2020-08-11 | 1 | -2/+1 |
| |