1
0
Fork 0
Commit graph

192 commits

Author SHA1 Message Date
Andy Wingo
2f7780b552 better error messages for invalid xhtml
* tekuti/filters.scm (bad-user-submitted-xhtml?): Add a more informative
  error message.
2008-04-11 13:24:57 +02:00
Andy Wingo
e1e44eb8f0 add main tag cloud page
* tekuti/page-helpers.scm: Export top-tags.

* tekuti/page.scm (page-show-tags): Implement the main tag cloud page.
  Yay!
2008-04-11 13:15:19 +02:00
Andy Wingo
df96b1f07e add "related posts" foo
* tekuti/page-helpers.scm (post-sidebar): New function, pops up a sidebar
  for related posts.

* tekuti/page.scm (page-show-post): Show the post sidebar.

* tekuti/tags.scm (compute-related-posts): New function, computes the set
  of related posts based on the number of tags which they share in
  common.
2008-04-11 12:59:47 +02:00
Andy Wingo
062e0f109a tweak tag cloud code
* tekuti/page-helpers.scm (top-tags, tag-cloud, main-sidebar): Make the
  tag cloud code a bit more modular. Up the number of tags shown to 30.

* tekuti/util.scm: Allow # in the path part of a URL. Yick.
2008-04-11 12:05:24 +02:00
Andy Wingo
11eed1fbc8 spam spam spam
* tekuti/comment.scm (bad-number?, *new-comment-spec*):
* tekuti/page-helpers.scm (comment-form): Lame spam obfuscation.

* tekuti/util.scm (emailish?): Allow _ in the before-@ part of the url.
  (urlish?): Don't require a slash after the host.
2008-03-11 23:58:12 +01:00
Andy Wingo
4ebd686868 don't say I'm not lenient
* tekuti/post.scm (post-sxml-content): Don't throw an exception if a post
  fails to format.
2008-03-11 23:43:20 +01:00
Andy Wingo
f1ef3f80cf fix comment openage
* tekuti/page-helpers.scm (post-editing-form): 
* tekuti/post.scm (munge-post, parse-post-data): Add foo to allow
  comments to be opened or closed. Fix date setting.
2008-03-09 23:07:34 +01:00
Andy Wingo
c0f32d5484 comment deletion, post editing.
* tekuti/comment.scm (make-new-comment): Refactor to decouple comment.scm
  from post.scm.

* tekuti/git.scm (run): Generalize so it can run any executable.
  (git-ls-tree, git-ls-subdirs): Check for a #f treeish, return directly
  in that case, avoiding tracebacks in the forked kid.
  (git-mktree): Return #f if the tree is empty.
  (git-rev-list): New command, something like git log.
  (patch-blob): New function; unused, though. Perhaps I should just
  delete it.
  (git-commit-reverse-operations): New function, constructs munge-tree
  operations to revert a commit.
  (git-revert): New operator, reverts a commit. Can't use git's revert
  because it requires a working tree.
  (munge-tree): Rewrite to unify the various commands, and process the
  commands in order. Makes a bit more garbage, but is much more
  understandable.

* tekuti/page-helpers.scm (post-editing-form): Add a preview.
  (admin-post-url): New helper.
  (redirect): New helper.
  (admin-post-redirect): New helper.

* tekuti/page.scm (page-admin): Show recent changes in the sidebar.
  (page-admin-new-post): Redirect to the new post.
  (page-new-comment): Rework for make-new-comment changes, and redirect
  to the post. Would be nice to redirect to the comment though.
  (page-admin-changes): New page, lists recent changes.
  (page-admin-change): New page, shows a change, allowing it to be
  undone.
  (page-admin-revert-change): New page, actually reverts a change. Thus
  we have comment deletion.

* tekuti/post.scm (munge-post): New helper, factored out of
  make-new-post.
  (parse-post-data): Another new helper. Needs to do more validation,
  though.
  (modify-post): Post editing, yay!

* tekuti/request.scm (parse-www-form-urlencoded): Factored out of
  request-form-data.
  (*request-initializers*): Initialize 'query to have the parsed query
  string data.

* tekuti/url.scm (url:path-part, url:query-part): New somewhat hacky
  functions. url.scm needs some love.
  (url:path-split): Split on only the "path part" of the URL.

* tekuti/util.scm (foldn): New export. Probably a bad idea.
  (match-case): New macro, not used though.
  (string-split/trimming): New util.

* tekuti/web.scm (choose-handler): Update the set of pages.
2008-03-07 13:09:47 +01:00
Andy Wingo
579a5d7ae4 various fixes, new post support
* tekuti/comment.scm (make-new-comment): Better commit log for comments.

* tekuti/git.scm (munge-tree): Fix when creating multiple files in a new
  directory.

* tekuti/page-helpers.scm (with-authentication): Resurrect, this got lost
  somehow, in that past time place.
  (post-editing-form): Frobate a bit.
  (admin-post-link): Fix.

* tekuti/page.scm (page-admin): Frobate.
  (page-admin-post): Fix for recent change in post-from-key.
  (page-admin-new-post): Sortof works, needs some fixage.

* tekuti/post.scm (make-new-post): Implement, yay

* tekuti/util.scm (timestamp->date): New function

* tekuti/web.scm (*status-names*): add 303
2008-03-04 23:15:38 +01:00
Andy Wingo
ea420f3680 only index tags of published posts
* tekuti/tags.scm (reindex-tags): Only index published posts.
2008-03-02 17:14:20 +01:00
Andy Wingo
1ec5fb27eb implement tags/foo
* tekuti/page.scm (page-show-tag): Implement, in a basic way.
2008-03-02 16:49:11 +01:00
Andy Wingo
c08973ca92 intern some character entities
* tekuti/config.scm: Define some character entities to intern here. Not
  ideal by any means, but it works for me.
2008-03-02 15:21:50 +01:00
Andy Wingo
e9849a19cc fix up the atom feed
* tekuti/page-helpers.scm (atom-header): Set the xml:base to the root
  url.
  (atom-entry): Actually include a link to the post.
2008-03-02 00:09:22 +01:00
Andy Wingo
c2446d0f7f more cleanups 2008-02-29 13:38:07 +01:00
Andy Wingo
a9141efbe6 add missing files 2008-02-29 00:37:38 +01:00
Andy Wingo
dbed5b113d cleanups, refactorings, what-not 2008-02-29 00:32:49 +01:00
Andy Wingo
0280eb9bd0 more cleanups, xhtml sanitization thanks to MikeS, --repl 2008-02-28 22:14:42 +01:00
Andy Wingo
436ef22134 continuing simplification work 2008-02-28 14:28:38 +01:00
Andy Wingo
eae227142c add link to subscribe thingie 2008-02-28 00:46:20 +01:00
Andy Wingo
384132878a minor tweaks 2008-02-28 00:29:23 +01:00
Andy Wingo
93605cf634 more atom fixen 2008-02-27 22:34:01 +01:00
Andy Wingo
bf21a8a3c0 some atom fixen 2008-02-27 22:30:48 +01:00
Andy Wingo
227bc9cea1 incremental reindexing, import charset fixes, other thingies 2008-02-27 21:42:10 +01:00
Andy Wingo
bc57e2a655 subtitle 2008-02-25 22:59:47 +01:00
Andy Wingo
caf9618312 atom feed maybe working 2008-02-24 21:21:41 +01:00
Andy Wingo
85b09abad7 using new one-file-per-comment 2008-02-23 23:58:55 +01:00
Andy Wingo
8dbbc023a9 another checkpoint, tag cloud working... 2008-02-23 14:32:48 +01:00
Andy Wingo
cb1e7fd756 another checkpoint, off to party redux 2008-02-22 19:30:20 +01:00
Andy Wingo
bdc98f612b another checkpoint, off to party 2008-02-22 19:28:46 +01:00
Andy Wingo
77509e4d3f basic archives done 2008-02-22 18:20:41 +01:00
Andy Wingo
ca585c382f new clever indexing scheme 2008-02-22 12:57:18 +01:00
Andy Wingo
0b476a921d another checkpoint, la la la 2008-02-21 23:48:44 +01:00
Andy Wingo
99162ab839 another checkpoint, la la la 2008-02-20 09:24:18 +01:00
Andy Wingo
c2580a017d snapshot 2008-02-19 08:58:16 +01:00
Andy Wingo
7fe3def61e another checkpoint, works again! 2008-02-17 01:17:01 +01:00
Andy Wingo
fa7cc3f267 hold metadata in memory instead of in git 2008-02-12 23:28:44 +01:00
Andy Wingo
8c52717d5d redo reindexing to be more erlangy 2008-02-12 23:09:55 +01:00
Andy Wingo
da58b95476 modularization 2008-02-11 22:58:10 +01:00
Andy Wingo
4c9b3b52ae more hacks, git index done (yay) 2008-02-10 23:38:40 +01:00
Andy Wingo
04ee329b4b further hacking 2008-02-09 21:37:57 +01:00
Andy Wingo
2cae173de9 first working server 2008-02-08 16:59:45 +01:00
Andy Wingo
44a54a3454 initial beginning start thing 2008-02-08 16:00:10 +01:00