Commit graph

35 commits

Author SHA1 Message Date
Magnus Hoff
990f570a31 Tests for article merging 2017-11-17 16:17:05 +01:00
Magnus Hoff
d241da35fb More tests 2017-11-16 10:44:55 +01:00
Magnus Hoff
2665fb3b8a Add a test for State 2017-11-15 16:27:28 +01:00
Magnus Hoff
7b485f87b9 Refactor State, centralizing db connection and cpu pool handling 2017-11-15 15:58:33 +01:00
Magnus Hoff
3dd4927281 Forbid empty titles in application layer 2017-10-30 13:20:40 +01:00
Magnus Hoff
4ca748f180 Optionally show authors in _changes based on --trust-identity command line argument.
This fixes #19
2017-10-30 11:44:36 +01:00
Magnus Hoff
9336fbf3cd Expand search api 2017-10-24 22:16:10 +02:00
Magnus Hoff
59c11897b2 Tweak FTS query
Attempt to smartly use NEAR searches and prefix searches depending on input. This is hopefully a good idea
2017-10-24 21:54:27 +02:00
Magnus Hoff
8104430701 Refactor 2017-10-24 21:23:18 +02:00
Magnus Hoff
a07f47c0f7 Implement quoting for the FTS search syntax of SQLite
This makes search queries safe for user input
2017-10-24 21:21:02 +02:00
Magnus Hoff
1bb1df8cf0 Add a first approximation of full text search. Issue #8 2017-10-24 16:48:16 +02:00
Magnus Hoff
ffccc5722c Add view of historical article revisions 2017-10-24 11:03:09 +02:00
Magnus Hoff
d918d614b4 Refactor pagination 2017-10-20 20:48:43 +02:00
Magnus Hoff
c85715c969 Start tracking authors for edits. #6 2017-10-18 16:33:21 +02:00
Magnus Hoff
2cb80e2bac Add sitemap. This fixes #3 2017-10-13 15:06:16 +02:00
Magnus Hoff
f22ffc112a Add basic /_changes page 2017-10-03 10:37: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
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
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
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
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
Johannes Hoff
e997c0f952 Read articles from the actual DB 2017-08-20 23:44:52 +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