Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | refactor(main): remove unreachable PATH_INFO cleanup depot | sternenseemann | 2021-06-07 | 1 | -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 status | sternenseemann | 2021-06-07 | 6 | -40/+101 |
| | |||||
* | refactor: split definitions from core.h into template.h and entry.h | sternenseemann | 2021-05-20 | 11 | -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 logic | sternenseemann | 2021-05-20 | 1 | -14/+15 |
| | |||||
* | feat(main): remove RSS feed functionality | sternenseemann | 2021-04-15 | 3 | -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 capacity | sternenseemann | 2021-02-23 | 1 | -0/+1 |
| | |||||
* | doc(README): briefly describe what sternenblog is about | sternenseemann | 2021-02-23 | 1 | -0/+6 |
| | |||||
* | Revert "refactor(treewide): prefix public/internal API with sternenblog/" | sternenseemann | 2021-02-23 | 18 | -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 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 |
| |