Commit graph

171 commits

Author SHA1 Message Date
Magnus Hoff
f923b5b6c0 Display author name in articles and _changes. This fixes #6 2017-10-18 16:53:27 +02:00
Magnus Hoff
d22ac6ef84 Only trust the X-Identity header when it is specified on the command line 2017-10-18 16:46:55 +02:00
Magnus Hoff
c85715c969 Start tracking authors for edits. #6 2017-10-18 16:33:21 +02:00
Magnus Hoff
94b3966e46 Rudimentary pagination for _changes 2017-10-15 23:15:12 +02:00
Magnus Hoff
8b2e601a46 Cleanup 2017-10-15 17:31:11 +02:00
Magnus Hoff
6d3d48c56e Parse query args for pagination in /_changes 2017-10-15 17:22:38 +02:00
Magnus Hoff
4f9cf4d15e Refactor assets routing 2017-10-15 16:49:55 +02:00
Magnus Hoff
c0521b5703 Refactor routing 2017-10-15 16:34:27 +02:00
Magnus Hoff
f40b6ce70d Refactor routing 2017-10-15 14:26:22 +02:00
Magnus Hoff
4756441064 Refactor path splitting in router 2017-10-14 15:13:03 +02:00
Magnus Hoff
73df2edc1a More humane timedate formatting in footer 2017-10-13 16:31:31 +02:00
Magnus Hoff
b5bcd66011 Introduce base href 2017-10-13 16:05:22 +02:00
Magnus Hoff
f2de8111c9 Structure template folder
Move errors to their own folder
2017-10-13 15:36:22 +02:00
Magnus Hoff
d1a3814286 Collect Resource types in a module 2017-10-13 15:21:23 +02:00
Magnus Hoff
2cb80e2bac Add sitemap. This fixes #3 2017-10-13 15:06:16 +02:00
Magnus Hoff
4ed28f99f3 Enable table extension for markdown, for issue #4 2017-10-12 14:56:43 +02:00
Magnus Hoff
1aeba7b2e3 Simplify _changes list 2017-10-03 22:31:27 +02:00
Magnus Hoff
f22ffc112a Add basic /_changes page 2017-10-03 10:37:18 +02:00
Magnus Hoff
370cbd0c24 Add default implementations for dispatch methods in Resource trait 2017-10-03 10:36:21 +02:00
Magnus Hoff
2a5f98d43e Slightly less mindless copying 2017-10-02 21:47:21 +02:00
Magnus Hoff
b21a7ccda4 Don't try to handle fragment in router.
It is strictly a client-side mechanism
2017-10-02 21:35:52 +02:00
Magnus Hoff
cdcdf8e72f Refactor server-side initiated edit mode.
Implement support for opening articles for editing without javascript
2017-10-02 21:30:31 +02:00
Magnus Hoff
02dd55df39 Cleanup 2017-10-02 17:11:18 +02:00
Magnus Hoff
1d485798eb Implement /_new, for creating new articles without making up a URL first 2017-10-02 17:08:59 +02:00
Magnus Hoff
ce1bbee22c Sort some lists of things lexicographically 2017-10-01 23:26:57 +02:00
Magnus Hoff
7562961093 Percent decode path segments of URL 2017-10-01 23:24:16 +02:00
Magnus Hoff
dc4a136336 Cleanup 2017-10-01 22:35:06 +02:00
Magnus Hoff
cd784e34c3 Bugletfixes 2017-09-21 12:11:08 +02:00
Magnus Hoff
9d0ca63aa9 When inventing a title from a slug, add some capitalization 2017-09-21 11:42:09 +02:00
Magnus Hoff
ad4addfc8c Implement support for inserting new articles 2017-09-21 11:38:52 +02:00
Magnus Hoff
0a3cb53a66 Add NewArticleResource
Serve placeholder page for non-existing articles.
Redirect user-generated slugs to canonical slugs.
2017-09-21 10:58:54 +02:00
Magnus Hoff
01dafa7d37 Special case front page so it never gets a non-empty slug 2017-09-21 10:23:30 +02:00
Magnus Hoff
3feed530ff Implement support for editing page title 2017-09-21 10:09:57 +02:00
Magnus Hoff
631e76324b Cleanup. Make use of .first() and .optional() from Diesel 2017-09-20 23:40:07 +02:00
Magnus Hoff
debf44623c Automatically generate slugs for articles based on title 2017-09-20 23:31:25 +02:00
Magnus Hoff
e1d823d22e Implement lookup and redirect of articles by slugs 2017-09-20 11:54:26 +02:00
Magnus Hoff
ada70b7671 Cleanup 2017-09-17 15:43:31 +02:00
Magnus Hoff
bb334df128 Cleanup based on new version of Diesel 2017-09-17 12:19:48 +02:00
Magnus Hoff
88eda46d95 Remove all usage of futures::BoxFuture, which is deprecated 2017-09-17 12:08:42 +02:00
Magnus Hoff
551cc22383 Remove all calls to Future::boxed(), which is deprecated 2017-09-17 11:45:35 +02:00
Magnus Hoff
16efa068d8 Introduce splitting on /-es in URLs 2017-09-17 11:27:50 +02:00
Magnus Hoff
573195d09c Code splitting 2017-09-15 17:28:23 +02:00
Magnus Hoff
7391b2db26 Cleanup 2017-09-15 15:09:51 +02:00
Magnus Hoff
5ab609886b Make a note of license for font 2017-09-15 15:07:22 +02:00
Magnus Hoff
51fe78abce Serve header font 2017-09-15 15:03:00 +02:00
Magnus Hoff
53c4ff1b5c Extract CSS and JS from templates and serve as static assets 2017-09-15 14:54:47 +02:00
Magnus Hoff
320ec98d65 Take CPU pool as dependency for State 2017-09-10 12:29:33 +02:00
Magnus Hoff
6fb1062376 Execute State functions in thread pool 2017-09-08 16:21:24 +02:00
Magnus Hoff
b3e7552c16 Make State-functons return Future-s 2017-09-08 15:58:15 +02:00
Magnus Hoff
50b9ebf59e Make State::update_article return a Future.
In preparation for threading
2017-09-08 15:37:58 +02:00
Magnus Hoff
db4f18807d Simplify by removing genericity.
Nothing to be generic over
2017-09-08 14:46:18 +02:00
Magnus Hoff
6f94b2f960 Silence some warnings 2017-09-08 14:43:47 +02:00
Magnus Hoff
1a5b39b3a1 Implement editing 2017-09-05 17:07:57 +02:00
Magnus Hoff
60a87d1898 Introduce db connection pool. Derive Clone for State 2017-09-05 15:19:37 +02:00
Magnus Hoff
5a859e5c33 Dispatch PUT to ArticleResource 2017-09-05 12:05:56 +02:00
Magnus Hoff
84b97efa9d Treat HTML in markdown source as text to be escaped for output 2017-09-03 21:33:04 +02:00
Magnus Hoff
2177cd7504 Start implementing editor 2017-09-02 15:32:59 +02:00
Magnus Hoff
405b203bc7 Some layout and styling 2017-09-02 15:26:28 +02:00
Magnus Hoff
94758adaf4 Make Resource::get consume self, for copyless futures 2017-09-01 12:32:30 +02:00
Magnus Hoff
76302353e1 HTTP handling refactoring.
Refactor to lookup/route and resource abstractions.

Bake in futures/async support.

Implement more of the HTTP standard.
2017-08-25 23:57:06 +02:00
Magnus Hoff
62812c2ddf Print helpful message on startup 2017-08-22 16:40:18 +02:00
Magnus Hoff
df63c25646 Run migrations on start, not on every connection 2017-08-22 09:37:40 +02:00
Johannes Hoff
e997c0f952 Read articles from the actual DB 2017-08-20 23:44:52 +02:00
Magnus Hoff
d9c3bf1191 Templates for error messages 2017-08-20 22:39:52 +02:00
Magnus Hoff
4a37a91ece Split layout out from rendering responses 2017-08-20 22:34:26 +02:00
Magnus Hoff
35e7bad7d2 Simple rendering of stubbed article 2017-08-20 22:17:16 +02:00
Johannes Hoff
139a5b51b6 Propage database connections; dispatch requests 2017-08-20 21:59:16 +02:00
Magnus Hoff
9eb48f7ddc Trivial HTTP response 2017-08-20 20:46:08 +02:00
Magnus Hoff
aae43917e2 Introduce core_main 2017-08-20 20:40:08 +02:00
Johannes Hoff
bc76506ebc Add a web server 2017-08-20 20:24:10 +02:00
Magnus Hoff
3abc3cd68a Skeleton with clap and sqlite database 2017-08-19 22:48:51 +02:00