1
0
Fork 0
Commit graph

192 commits

Author SHA1 Message Date
Andy Wingo
68e7b82b21 Add example config
* example-config: New file
2014-10-22 15:46:35 +02:00
Andy Wingo
6d491994f7 ensure-uri-reference works with older Guiles
* tekuti/page-helpers.scm (ensure-uri-reference): Fix to work with Guile
  without build-uri-reference.
2014-10-22 15:29:28 +02:00
Andy Wingo
ab54aca59f Support for relative URIs for https + http access.
* tekuti/page-helpers.scm (ensure-uri): Rename from ensure-public-uri.
  A URI is absolute by definition.
  (ensure-uri-reference): New helper.  Requires git guile.
  (respond): Use ensure-URI-reference to get the reference.
  (atom-header, atom-entry): Use ensure-uri.

* tekuti/page.scm (atom-feed-from-posts): Pass the URI scheme from the
  request-uri when reconstructing

* tekuti/config.scm (*public-scheme*): New config variable, defaulting
  to http.
2014-10-15 12:08:51 +02:00
Andy Wingo
c631aaf35c Allow scheme-relative URIs in urlish?
* tekuti/util.scm (urlish?): Allow scheme-relative URIs.
2014-10-15 09:46:53 +02:00
Andy Wingo
c087e7b6fa Scheme-relative URL
* tekuti/template.scm (templatize): Use scheme-relative URL for tekuti.
2014-10-15 09:35:36 +02:00
Andy Wingo
89da28b752 Better mobile experience
* tekuti/template.scm (templatize): Render using device width as
  viewport, for better mobile experience.
2014-10-09 20:38:18 +02:00
Andy Wingo
9d43521793 Downcase when creating posts.
* tekuti/post.scm (parse-post-data): Downcase when creating posts also.
2014-01-19 20:53:28 +01:00
Andy Wingo
e8eb7aa176 Work around uri-encode changing capitalization
* tekuti/page.scm (make-post-key): Downcase, to cope with uri-encode
  from Guile changing from lower-case hexidecimals to upper-case.
  Otherwise older post keys wouldn't work...
2014-01-19 18:56:52 +01:00
a2c76e586e Reverse tag page posts order
So the newest post comes out on top.
2013-04-03 03:36:19 +02:00
ea8c3a5642 Make tag page look more like index
Blurr the distinction between the index page and a tag page so that
tag pages may be used as stand-alone pages.
2013-04-03 03:16:02 +02:00
Andy Wingo
a08ae0c9a7 make urlish? less -ish
* tekuti/util.scm (urlish?): Use string->uri.
2012-06-03 23:49:14 +02:00
Andy Wingo
085b4c76ef faster git-rev-parse
* 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).
2012-02-15 22:31:54 +01:00
Andy Wingo
8034123827 no sxml, no body
* tekuti/page-helpers.scm (respond): Give no body if there is no SXML.
  Fixes perhaps spurious errors raised by Guile's web server.
2012-02-14 17:29:08 +01:00
Andy Wingo
82c7790016 remove trailing whitespace 2012-02-12 20:48:50 +01:00
Andy Wingo
29a6144123 handle HEAD requests (requires Guile from today)
* tekuti/request.scm (request-path-case): Dispatch HEAD requests as GET
  requests, relying on new Guile web servers to elide the HEAD body.
2012-02-12 13:46:22 +01:00
Andy Wingo
afec0daa99 stop hitting git when fetching post metadata
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.
2012-02-11 18:54:51 +01:00
Andy Wingo
f89e4b128b better errors when reindexing
* tekuti/index.scm (maybe-reindex): Reindex within a
  call-with-error-handling.
2012-02-11 18:38:21 +01:00
Andy Wingo
7a1944b240 per-tag feed links
* tekuti/page.scm (page-show-tag): Add a feed link here.
2011-04-26 15:39:06 +02:00
Andy Wingo
62a351d8d5 optimization for with=foo
* tekuti/page.scm (page-feed-atom): Reduce "with=unknown" to nothing.
2011-04-26 15:12:05 +02:00
Andy Wingo
cee672f117 multiple with query args add tags to the set
* tekuti/page.scm (page-feed-atom): Reimplement more clearly, and give
  "with" inclusionary meaning.
2011-04-25 20:30:57 +02:00
Andy Wingo
08e1e58f1f add ?with=guile&without=gnu
* 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.
2011-04-25 20:06:11 +02:00
Andy Wingo
26216a593a with-i/o procedures close their ports
* 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.
2011-04-25 19:10:07 +02:00
Brian Gough
a4bad7a561 add atom feeds for tags 2011-04-25 19:05:49 +02:00
Andy Wingo
efc25df8f4 don't bother allocating iconv info on pipe
* tekuti/git.scm (run): Don't set encoding on pipe, as we just use
  bytevector io anyway.
2011-02-22 23:52:11 +01:00
Andy Wingo
a05d9a5df8 use ice-9 binary-ports
* tekuti/git.scm:
* tekuti/request.scm: Use ice-9 binary-ports instead of (rnrs io
  ports).
2011-02-22 22:21:30 +01:00
Andy Wingo
1636c96f9f remove obsolete (tekuti url)
* tekuti/url.scm: Remove.
* Makefile.am: Remove url.scm

* tekuti/post.scm: Remove reference to (tekuti url).
  (parse-post-data): Use uri-encode.
2011-02-22 22:19:30 +01:00
Aleix Conchillo Flaque
800e7d9a05 do not remove numbers and s/./-/ in post keys 2011-02-18 23:36:10 +01:00
Andy Wingo
fce14fbddf s/unparse-uri/uri->string/ 2011-02-18 23:34:57 +01:00
Aleix Conchillo Flaque
2a87435f81 fixes due to (web http) updates 2011-02-18 23:34:27 +01:00
Andy Wingo
a357b2a0dc support for deleting post comments 2011-02-18 23:34:17 +01:00
Andy Wingo
9ec70ebff5 add support for deleting posts 2011-02-18 23:31:42 +01:00
Aleix Conchillo Flaque
66e04753f6 wordpress-xmlrpc: added usage help 2011-02-18 23:28:46 +01:00
Aleix Conchillo Flaque
cffa7dea90 wordpress-xmlrpc: more youtube/googlevideo updates 2011-02-18 23:27:50 +01:00
Aleix Conchillo Flaque
612577eca9 inform the user of malformed xhtml internal error when publishing 2011-02-18 23:27:45 +01:00
Aleix Conchillo Flaque
0dee43b2a0 wordpress-xmlrpc: use video.google.com instead of .es 2011-02-18 23:26:18 +01:00
Aleix Conchillo Flaque
199ad57615 wordpress-xmlrpc: fix googlevideo and youtube urls 2011-02-18 23:26:13 +01:00
Aleix Conchillo Flaque
606ecad873 wordpress-xmlrpc: fix media html tags (again) 2011-02-18 23:26:09 +01:00
Aleix Conchillo Flaque
2da5248073 wordpress-xmlrpc: fix media html tags 2011-02-18 23:26:05 +01:00
Aleix Conchillo Flaque
280696ea06 wordpress-xmlrpc: added support for wp media tags youtube/googlevideo 2011-02-18 23:25:59 +01:00
Aleix Conchillo Flaque
736a074097 wordpress-xmlrpc: download unlimited comments 2011-02-18 23:25:43 +01:00
Aleix Conchillo Flaque
fc07af26f6 wordpress-xmlrpc: use str type for pycurl urls 2011-02-18 23:23:06 +01:00
Aleix Conchillo Flaque
93789f0d07 add head link tag for atom feed 2011-02-18 23:22:46 +01:00
Aleix Conchillo Flaque
bf90b687e0 added wordpress (xmlprc) to tekuti script 2011-02-18 23:22:11 +01:00
Andy Wingo
f350e252fc mod-lisp updates
* tekuti/mod-lisp.scm: update tekuti/mod-lisp to parse headers to
  symbols, and to deal in bytevectors only.
2011-02-18 23:20:26 +01:00
Andy Wingo
bed9fff79d request-form-data smarter about character encodings
* tekuti/request.scm (request-form-data): Allow the body to be a
  bytevector. Update to new uri interface, and allow alternate
  encodings.
2010-12-11 19:18:13 +01:00
Andy Wingo
98cac18528 mod-lisp calls setvbuf only once
* tekuti/mod-lisp.scm (mod-lisp-read): Like the http impl, just setvbuf
  once, and don't throw away data (!).
2010-12-06 20:01:43 +01:00
Andy Wingo
68966d9e17 fix time comparisons
* tekuti/cache.scm (make-entry): Fix time comparisons.
2010-12-06 13:06:50 +01:00
Andy Wingo
8f2e3b741c more etag
* tekuti/page.scm (page-feed-atom): Also set etag on 304 responses
  here.
2010-12-06 13:04:24 +01:00
Andy Wingo
839d2e27eb cache returns 304 as appropriate; more pages set etags
* 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.
2010-12-06 13:00:53 +01:00
Andy Wingo
15f024a12d robustness in mod-lisp-read
* tekuti/mod-lisp.scm (mod-lisp-read): Close the port if there is an
  error reading the request.
2010-12-06 11:37:47 +01:00