about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* refactor(main): remove unreachable PATH_INFO cleanup depotsternenseemann2021-06-071-5/+1
| | | | | | We set PATH_INFO to "/" now if it is `null` or empty, so the conditional would never be reached. Also it would do precisely what we don't want these days.
* refactor: return enum-ed error codes instead of HTTP statussternenseemann2021-06-076-40/+101
|
* refactor: split definitions from core.h into template.h and entry.hsternenseemann2021-05-2011-72/+55
| | | | | | core.h was originally introduced to prevent double header inclusions, but thanks to the C preprocessor this isn't necessary at all and we can just get rid of this header.
* refactor(main): split entry loading out of routing logicsternenseemann2021-05-201-14/+15
|
* feat(main): remove RSS feed functionalitysternenseemann2021-04-153-183/+44
| | | | | This purpose is served with the atom feed already and allows us to simplify the routing logic a bit (this should be reduced further).
* doc(TODO): I want dot time in some capacitysternenseemann2021-02-231-0/+1
|
* doc(README): briefly describe what sternenblog is aboutsternenseemann2021-02-231-0/+6
|
* Revert "refactor(treewide): prefix public/internal API with sternenblog/"sternenseemann2021-02-2318-24/+19
| | | | | | | | This reverts commit f4b7cf4448effa168f2e1c247353c00e2741e831. Actually, this made a lot of stuff more cumbersome I feel like and didn't really solve the issue that was bothering me. I'll find another way.
* fix(main): set PATH_INFO=/ for index HEAD mastersternenseemann2020-12-281-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 emptysternenseemann2020-12-281-2/+9
|
* fix(main): correct routing sanity checksternenseemann2020-09-191-2/+6
|
* refactor(headers): allow multiple inclusionssternenseemann2020-09-198-6/+48
|
* refactor(treewide): prefix public/internal API with sternenblog/sternenseemann2020-08-2618-19/+24
|
* doc(stringutil): init docssternenseemann2020-08-252-1/+25
|
* doc(timeutil): init docs for timeutilsternenseemann2020-08-252-5/+36
|
* fix(timeutil): let flocaltime return actual lensternenseemann2020-08-251-1/+11
| | | | Behavior now more consistent what you'd expect from strftime
* doc(template): fix field doc of struct template_datasternenseemann2020-08-251-5/+5
|
* doc(cgiutil): document server_urlsternenseemann2020-08-252-1/+17
|
* chore(TODO): remove tasks finished by edd4a7e4d5f4d5be6a5fc9db3f7173fc8dc81616sternenseemann2020-08-251-1/+0
|
* feat(template): pass context to template, simplify apisternenseemann2020-08-254-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 routingsternenseemann2020-08-251-0/+9
| | | | These assert runtime assumptions
* fix(main): call correct entry templatesternenseemann2020-08-251-1/+5
|
* feat(rss,atom): gen abs paths from webroot if no external_urlsternenseemann2020-08-251-22/+23
|
* refactor(main): rework routing to minimize code duplicationsternenseemann2020-08-252-109/+103
|
* refactor(timeutil): remove debug outputsternenseemann2020-08-251-2/+0
|
* feat(rss,atom): use SERVER_{NAME,PORT} for external URLsternenseemann2020-08-256-42/+85
|
* chore(TODO): update taskssternenseemann2020-08-251-2/+2
|
* fix(send_standard_headers): don't read from uninitialized memorysternenseemann2020-08-251-1/+6
|
* fix(entry): unget, not get tex in free_entrysternenseemann2020-08-251-1/+2
| | | | fix(entry): initialize full struct in make_entry
* doc(sternenblog.cgi): reflect changes to configurationsternenseemann2020-08-241-15/+69
|
* doc(sternenblog.cgi): fix SEE ALSO sectionsternenseemann2020-08-241-4/+4
|
* refactor(timeutil): remove unnecessary localtime callsternenseemann2020-08-241-2/+0
|
* feat(rss,atom): mmap on demand like in blog_indexsternenseemann2020-08-245-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_indexsternenseemann2020-08-242-3/+3
| | | | | Prevents integer overflow and consequently segfaults the return value of make_index is used directly.
* fix(stringutil): skip strings that are NULLsternenseemann2020-08-241-10/+12
| | | | Prevents segfaults with careless uses
* chore(TODO): keep tzset() based flocaltimesternenseemann2020-08-241-1/+2
| | | | | Seems reliable after fix and further testing, probably cleaner than strftime string manipulation.
* chore(shell.nix): add dev environmentsternenseemann2020-08-241-0/+7
|
* feat(main): add simple caching support via max-agesternenseemann2020-08-243-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_TTLsternenseemann2020-08-241-0/+7
|
* feat(main): add atom feedsternenseemann2020-08-246-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.hsternenseemann2020-08-241-0/+2
|
* fix(timeutil): only UTC if no daylight savingsternenseemann2020-08-241-1/+1
| | | | Fixes output for BST mostly
* feat(entry): allow disabling the strict access checksternenseemann2020-08-242-5/+24
|
* refactor(config.example.h): restructuresternenseemann2020-08-241-16/+20
|
* refactor(stringutil): add function catn_alloc to ease url building in main.csternenseemann2020-08-218-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 formattingsternenseemann2020-08-211-9/+3
|
* feat(timeutil): output proper RFC3339 format for atomsternenseemann2020-08-217-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 formattingsternenseemann2020-08-204-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) statesternenseemann2020-08-183-16/+49
|
* doc(sternenblog.cgi): add preliminary user documentationsternenseemann2020-08-142-1/+308
|