* tekuti/git.scm (git-rev-parse): Try to read the ref ourselves, first.
Fall back to using git if that doesn't work (for example, if it's a
packed ref).
Inspired by a patch from Aleix Conchillo Flaqué. Thanks, Aleix!
* tekuti/index.scm (index-specs):
* tekuti/post.scm (reindex-posts, reindex-posts-by-date): Change to have
the "posts" index be a hash table mapping key -> post.
"posts-by-date" is a list of keys, from newest to oldest.
(post-from-git): This is what post-from-key was.
(post-from-key): New function, pulls out a post from the posts hash
table.
(munge-post): Use post-from-git.
(delete-post): Take the post directly.
(latest-posts): New awesome helper for fetching the lastest N posts
that match some predicates.
* tekuti/page-helpers.scm (find-posts-matching): Adapt to post-from-key
change.
(published-posts): Remove, replaced with latest-posts.
* tekuti/page.scm (page-admin, page-admin-posts, page-admin-post)
(page-archives, page-feed-atom): Use the new latest-posts helper.
(page-admin-delete-post, page-admin-delete-comment, page-show-post)
(page-new-comment, page-show-tag): Adapt to post-from-key change.
* tekuti/tags.scm (compute-related-posts, compute-related-tags): Adapt
to post-from-key change.
(reindex-tags): Use latest-posts.
* tekuti/page.scm (page-feed-atom): Reimplement Brian's thing with
"with" and "without" query args, to allow for multiple tags to be
included or excluded.
* tekuti/request.scm (request-query-ref-all): New helper.
* tekuti/util.scm (with-output-to-string*, with-input-from-string*): New
hacky helpers, which close the port before returning the string or
result. Hopefully reduce pressure on the GC.
(shell:quote):
* tekuti/git.scm (git-commit-reverse-operations, with-output-to-blob*)
(with-input-from-blob*):
* tekuti/filters.scm (wordpress->sxml): Use the string* procedures.
* tekuti/cache.scm (update-cache): Expand cache size back to 20.
(cached-response-and-body, make-entry): Entries are now procedures
that return the cached pair. They also have some more smarts regarding
etags, last-modified, and conditional requests.
* tekuti/page-helpers.scm (respond): Add etag arg. Set a date.
* tekuti/page.scm: Set etags on a number of pages.
* tekuti/cache.scm: Update with more structure. Use take-max, not
list-head. Only cache cacheable request-response pairs.
* tekuti/index.scm: Add cache as index entry. Also return the index ref
within the index itself, instead of at the head.
* tekuti/web.scm: Don't pass cache around, it's part of the index
now. Adapt to new API.