1
0
Fork 0
Commit graph

179 commits

Author SHA1 Message Date
Andy Wingo
ba9a560f01 Fix html translation 2022-10-23 21:48:57 +02:00
Andy Wingo
304f8839ec Hopefully fix paragraph parsing 2022-10-23 21:45:43 +02:00
Andy Wingo
105873854c Fix list parsing 2022-10-23 17:30:36 +02:00
Andy Wingo
7652cb17cf Implement heading parsing 2022-10-23 09:45:52 +02:00
Andy Wingo
5f1620e0e7 Handle CR/LF in marxdown; fix trailing ! in paragraphs 2022-10-22 09:55:07 +02:00
Andy Wingo
4a9766c6c1 Fix emph lowering 2022-10-20 23:26:35 +02:00
Andy Wingo
2d102677d1 Fix xml attr parsing 2022-10-20 23:10:46 +02:00
Andy Wingo
eebd1b219a Parse formats to symbol 2022-10-20 23:03:16 +02:00
Andy Wingo
f920fb678b Fix some marxdown bugs 2022-10-20 22:57:13 +02:00
Andy Wingo
9720ba7bcf New posts are marxdown 2022-10-20 22:54:07 +02:00
Andy Wingo
ddb029d674 Fix format for posts (!) 2022-10-20 22:51:27 +02:00
Andy Wingo
9dd5eba908 Fix format for comments 2022-10-20 22:45:35 +02:00
Andy Wingo
f424227fff Fix format for comments 2022-10-20 22:42:57 +02:00
Andy Wingo
4374fbf1dc Switch to marxdown as default post and comment format 2022-10-20 22:37:55 +02:00
Andy Wingo
1236e8a996 Add marxdown
Marxdown a new dialect for writing blog posts.  We'll see!
2022-10-20 21:40:27 +02:00
Andy Wingo
e62d37ae7f Commit pending changes 2022-10-08 07:51:39 +00:00
Andy Wingo
ae3d83d5f2 Fix comments-open? logic. sadness 2021-03-08 15:49:41 +01:00
Andy Wingo
70a93318b4 Fix comments-closed-timestamp spec parser 2021-03-08 15:42:29 +01:00
Andy Wingo
768578c873 Fix comments-closed-timestamp spec parser 2021-03-08 15:37:34 +01:00
Andy Wingo
d6cee09123 Fix serializing no-comments-closed-date state 2021-03-08 15:16:26 +01:00
Andy Wingo
60bc3db10f Add comment closing window feature
* tekuti/config.scm (*comments-open-window*): New config, indicating
seconds for which to keep comments open.
* tekuti/page-helpers.scm (post-editing-form): Expose comments closed
date feature.
* tekuti/page.scm (page-new-comment): Oops -- we were missing a
server-side comments-open check!
* tekuti/post.scm (*post-spec*): Serialize comments-closed-timestamp.
(post-comments-open?): Return false if we are after the
comments-closed-timestamp.
(post-comments-closed-timestamp): New accessor.
(munge-post): Write comments-closed-timestamp.
(parse-post-data): Parse comments-closed-timestamp from form data.
2021-03-08 15:04:23 +01:00
Andy Wingo
bb11cb984e Fix a nodelist issue in admin edit page 2019-06-26 15:37:37 +02:00
Andy Wingo
83c47a9185 Make raw text closing tag check reflect the spec
* tekuti/page-helpers.scm (shtml->html): The previous code was too
  strict.
2019-05-31 16:11:32 +02:00
Andy Wingo
5cdda50445 Fix another accidental-nodelist area
* tekuti/page.scm (page-admin): Fix accidental nodelist.
2019-05-31 15:56:41 +02:00
Andy Wingo
9d9d39c7f5 Allow numbers in shtml->html
* tekuti/page-helpers.scm (shtml->html): Allow numbers.
2019-05-31 15:51:08 +02:00
Andy Wingo
83fd0a044e Unroll a few locations that were receiving nodelists
* tekuti/page-helpers.scm (post-editing-form):
* tekuti/page.scm (page-index, page-show-post): show-post returns a
  nodelist; deal with it.
2019-05-31 15:42:30 +02:00
Andy Wingo
b16c08a385 Serialize as HTML rather than XHTML
* tekuti/page-helpers.scm (html-doctype): Relax to HTML doctype.
  (define-tag-set, void-element?, template-element?, raw-text-element?)
  (escapable-raw-text-element?, foreign-element?, make-char-quotator)
  (attribute-value-empty?, attribute-value-needs-quotes-chars)
  (attribute-value-needs-quotes?, print-attribute-value/quoted)
  (print-text/quoted, shtml->html): Emit HTML by default.  This will
  allow documents to contain <script> tags which themselves have &, <,
  and so on.
2019-05-31 15:31:04 +02:00
Andy Wingo
ff529670e1 Fix env invocation 2017-03-06 14:18:37 +00:00
Andy Wingo
493fe697ba Update parsed entities 2017-03-06 11:17:39 +01:00
Andy Wingo
5e603daa9e Add bogus comment detector.
* tekuti/classifier.scm: New file.
* Makefile.am: Add new file.
* tekuti/comment.scm:
* tekuti/git.scm:
* tekuti/index.scm:
* tekuti/page.scm: Update to include bogus comment detector.
2017-03-06 09:41:52 +01:00
Andy Wingo
42b77efe6a Neutralize links in comments. 2017-03-03 17:13:36 +01:00
Andy Wingo
01ca951b76 Improve security question. Fix reindexing. 2017-03-02 15:28:55 +00:00
Andy Wingo
e700e4af7a Fix spurious 304 error
* tekuti/cache.scm (make-entry): Only return a cached not-modified
  response if the request was conditional.
2016-08-28 10:58:34 +02:00
Andy Wingo
7643585d12 Fix 304 edge case in atom feed
* tekuti/page.scm (atom-feed-from-posts): Don't bomb if the client sends
  a if-modified-since but we have no posts.
2016-08-28 10:40:36 +02:00
Andy Wingo
cf10aa7056 New posts start in private status
* tekuti/page-helpers.scm (post-editing-form): Fix status of new posts.
2014-12-17 11:19:49 +01:00
Andy Wingo
acc13819e1 Minor aesthetic fixups
* tekuti/page-helpers.scm (post-editing-form): Aesthetic fixups.
2014-12-17 11:17:56 +01:00
Andy Wingo
20e7658295 Add ability to share draft posts
As a side effect of this change, any pending posts in your repository
that are in "draft" status will effectively move into the new "draft"
state, which means they can be reached by their URL.  That's not a big
deal though because those URLs are not trivial to guess.

* tekuti/page-helpers.scm (post-editing-form): Add radio button to
  choose post status.

* tekuti/post.scm (post-public?, post-draft?, post-private?): New
  accessors for post status.
  (post-from-key): Add #:allow-draft? keyword argument.

* tekuti/page.scm (page-show-post): Allow direct access to draft posts.
2014-12-17 11:05:07 +01:00
Andy Wingo
7ecade64bd Fix expanduser on absolute paths.
* tekuti/util.scm (expanduser): Fix when given absolute paths.
2014-10-22 16:14:59 +02:00
Andy Wingo
e45cd521f9 Add example nginx config.
* nginx-config: New file.
2014-10-22 15:50:31 +02:00
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
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