diff --git a/.gitignore b/.gitignore index 9c4d914..42d8f11 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ pom.xml.asc /classes/ /target/ /checkouts/ +/resources/public/content/.git .lein-deps-sum .lein-repl-history .lein-plugins/ diff --git a/project.clj b/project.clj index 46b7c28..6b95352 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject smeagol "0.1.0-SNAPSHOT" +(defproject smeagol "0.2.0-SNAPSHOT" :description "A simple Git-backed Wiki inspired by Gollum" :url "http://example.com/FIXME" :dependencies [[org.clojure/clojure "1.6.0"] @@ -7,8 +7,8 @@ [selmer "0.7.2"] [com.taoensso/timbre "3.3.1"] [com.taoensso/tower "3.0.2"] - [markdown-clj "0.9.55" - :exclusions [com.keminglabs/cljx]] + [markdown-clj "0.9.55" :exclusions [com.keminglabs/cljx]] + [clj-jgit "0.8.1"] [environ "1.0.0"] [im.chit/cronj "1.4.2"] [noir-exception "0.2.2"] diff --git a/resources/public/content/Introduction.md b/resources/public/content/Introduction.md index 23fa4bc..7f6cee0 100644 --- a/resources/public/content/Introduction.md +++ b/resources/public/content/Introduction.md @@ -2,7 +2,7 @@ Smeagol is a simple Wiki engine inspired by [Gollum](https://github.com/gollum/gollum/wiki). Gollum is a Wiki engine written in Ruby, which uses a number of simple text formats including [Markdown](http://daringfireball.net/projects/markdown/), which uses [Git](http://git-scm.com/) to provide versioning and backup. I needed a new Wiki for a project and thought Gollum would be ideal - but unfortunately it doesn't provide user authentication, which I needed, and it was simpler for me to reimplement the bits I did need in Clojure than to modify Gollum. -So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which will soon use Git as its versioning and backup system. +So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which uses Git as its versioning and backup system. ## Markup syntax @@ -10,15 +10,15 @@ Smeagol uses the Markdown format as provided by [markdown-clj](https://github.co ## Security and authentication -Currently security is very weak. There is currently a file called *passwd* in the *resources/public* directory, which contains a clojure map of username/plain-text password pairs thus: +Currently security is very weak. There is currently a file called *passwd* in the *resources/public* directory, which contains a clojure map of which maps username to maps with plain-text passwords and emails thus: - {:admin "admin"} + {:admin {:password "admin" :email "admin@localhost"} + :adam {:password "secret" :email "adam@localhost"}} that is to say, the username is a keyword and the corresponding password is a string. Obviously, this is a temporary solution while in development which I will fix later. ## Todo -* Git integration! Smeagol doesn't have any inbuilt versioning or backup mechanism; it's intended that Git will be used as that mechanism. But it isn't implemented yet; * Image (and other media) upload; * Improved editor. The editor is at present very primitive - right back from the beginnings of the Web. It would be nice to have a rich embedded editor like [Hallo](https://github.com/bergie/hallo) or [Aloha](http://aloha-editor.org/Content.Node/index.html) but I havenven't (yet) had time to integrate them! * Improved security. Having the passwords in plain text rather than encrypted is just basically poor; having the passwd file in *public* space is also poor (although I believe it cannot be accessed via HTTP). Essentially, authentication mechanisms should be pluggable, and at present they aren't; diff --git a/resources/public/passwd b/resources/public/passwd index 2123246..fd73249 100644 --- a/resources/public/passwd +++ b/resources/public/passwd @@ -1 +1,2 @@ -{:admin "admin"} +{:admin {:password "admin" :email "admin@localhost"}} + diff --git a/resources/templates/edit.html b/resources/templates/edit.html index e2570ad..bcf477e 100644 --- a/resources/templates/edit.html +++ b/resources/templates/edit.html @@ -11,6 +11,11 @@