mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Well, that was ridiculously easy, and it Just Works[tm].
This commit is contained in:
parent
0d9b8f606e
commit
8c6a3358bc
5 changed files with 28 additions and 22 deletions
17
README.md
17
README.md
|
|
@ -1,20 +1,16 @@
|
||||||
# Welcome to Smeagol!
|
# Welcome to Smeagol!
|
||||||
|
|
||||||
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/), and 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.
|
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/), and 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 uses 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.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
Smeagol is now a fully working small Wiki engine, and meets my own immediate needs. There are some obvious
|
Smeagol is now a fully working small Wiki engine, and meets my own immediate needs. There are some obvious
|
||||||
things which could be improved - see **TODO** list below - but it works now and doesn't seem to have any major problems.
|
things which could be improved - see **TODO** list below - but it works now and doesn't seem to have any major problems.
|
||||||
|
|
||||||
## Markup syntax
|
## Markup syntax
|
||||||
|
|
||||||
Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki itself.
|
Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki itself.
|
||||||
|
|
||||||
## Security and authentication
|
## Security and authentication
|
||||||
|
|
||||||
Security is now greatly improved. There is a file called *passwd* in the *resources* directory, which contains a clojure map which maps usernames to maps with plain-text passwords and emails thus:
|
Security is now greatly improved. There is a file called *passwd* in the *resources* directory, which contains a clojure map which maps usernames to maps with plain-text passwords and emails thus:
|
||||||
|
|
||||||
{:admin {:password "admin" :email "admin@localhost"}
|
{:admin {:password "admin" :email "admin@localhost"}
|
||||||
|
|
@ -24,27 +20,27 @@ that is to say, the username is a keyword and the corresponding password is a st
|
||||||
|
|
||||||
There's still no mechanism to add a new user to the system through the user interface; you do sill have to do that by editing the password file in an editor.
|
There's still no mechanism to add a new user to the system through the user interface; you do sill have to do that by editing the password file in an editor.
|
||||||
|
|
||||||
## Todo
|
## Images
|
||||||
|
Smeagol does not currently have any mechanism to upload images. You can, however, link to images already available on the web, like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Todo
|
||||||
* Image (and other media) upload;
|
* 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 haven't (yet) had time to integrate them!
|
|
||||||
* Mechanism to add users through the user interface;
|
* Mechanism to add users through the user interface;
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License,
|
Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License,
|
||||||
version 2.0 or (at your option) any later version. If you wish to incorporate
|
version 2.0 or (at your option) any later version. If you wish to incorporate
|
||||||
parts of Smeagol into another open source project which uses a less restrictive
|
parts of Smeagol into another open source project which uses a less restrictive
|
||||||
license, please contact me; I'm open to dual licensing it.
|
license, please contact me; I'm open to dual licensing it.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
You will need [Leiningen][1] 2.0 or above installed.
|
You will need [Leiningen][1] 2.0 or above installed.
|
||||||
|
|
||||||
[1]: https://github.com/technomancy/leiningen
|
[1]: https://github.com/technomancy/leiningen
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
To start a web server for the application, run:
|
To start a web server for the application, run:
|
||||||
|
|
||||||
lein ring server
|
lein ring server
|
||||||
|
|
@ -59,3 +55,6 @@ Alternatively, if you want to deploy to a servlet container (which I would stron
|
||||||
|
|
||||||
(a command which I'm sure Smeagol would entirely appreciate) and deploy the resulting war file.
|
(a command which I'm sure Smeagol would entirely appreciate) and deploy the resulting war file.
|
||||||
|
|
||||||
|
|
||||||
|
## Editing the framing content
|
||||||
|
You can edit the [[\_left-bar]], the [[\_edit-left-bar]], and the [[\_header]].
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@
|
||||||
:plugins [[lein-ring "0.8.13" :exclusions [org.clojure/clojure]]
|
:plugins [[lein-ring "0.8.13" :exclusions [org.clojure/clojure]]
|
||||||
[lein-environ "1.0.0"]
|
[lein-environ "1.0.0"]
|
||||||
[lein-ancient "0.5.5" :exclusions [org.clojure/clojure org.clojure/data.xml]]
|
[lein-ancient "0.5.5" :exclusions [org.clojure/clojure org.clojure/data.xml]]
|
||||||
[lein-marginalia "0.7.1" :exclusions [org.clojure/clojure]]]
|
[lein-marginalia "0.7.1" :exclusions [org.clojure/clojure]]
|
||||||
|
[lein-npm "0.6.2"]]
|
||||||
|
:npm {:dependencies [[simplemde "1.11.2"]]}
|
||||||
:ring {:handler smeagol.handler/app
|
:ring {:handler smeagol.handler/app
|
||||||
:init smeagol.handler/init
|
:init smeagol.handler/init
|
||||||
:destroy smeagol.handler/destroy}
|
:destroy smeagol.handler/destroy}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,16 @@
|
||||||
# Welcome to Smeagol!
|
# Welcome to Smeagol!
|
||||||
|
|
||||||
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/), and 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.
|
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/), and 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 uses 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.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
Smeagol is now a fully working small Wiki engine, and meets my own immediate needs. There are some obvious
|
Smeagol is now a fully working small Wiki engine, and meets my own immediate needs. There are some obvious
|
||||||
things which could be improved - see **TODO** list below - but it works now and doesn't seem to have any major problems.
|
things which could be improved - see **TODO** list below - but it works now and doesn't seem to have any major problems.
|
||||||
|
|
||||||
## Markup syntax
|
## Markup syntax
|
||||||
|
|
||||||
Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki itself.
|
Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki itself.
|
||||||
|
|
||||||
## Security and authentication
|
## Security and authentication
|
||||||
|
|
||||||
Security is now greatly improved. There is a file called *passwd* in the *resources* directory, which contains a clojure map which maps usernames to maps with plain-text passwords and emails thus:
|
Security is now greatly improved. There is a file called *passwd* in the *resources* directory, which contains a clojure map which maps usernames to maps with plain-text passwords and emails thus:
|
||||||
|
|
||||||
{:admin {:password "admin" :email "admin@localhost"}
|
{:admin {:password "admin" :email "admin@localhost"}
|
||||||
|
|
@ -24,27 +20,27 @@ that is to say, the username is a keyword and the corresponding password is a st
|
||||||
|
|
||||||
There's still no mechanism to add a new user to the system through the user interface; you do sill have to do that by editing the password file in an editor.
|
There's still no mechanism to add a new user to the system through the user interface; you do sill have to do that by editing the password file in an editor.
|
||||||
|
|
||||||
## Todo
|
## Images
|
||||||
|
Smeagol does not currently have any mechanism to upload images. You can, however, link to images already available on the web, like this:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Todo
|
||||||
* Image (and other media) upload;
|
* 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 haven't (yet) had time to integrate them!
|
|
||||||
* Mechanism to add users through the user interface;
|
* Mechanism to add users through the user interface;
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License,
|
Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License,
|
||||||
version 2.0 or (at your option) any later version. If you wish to incorporate
|
version 2.0 or (at your option) any later version. If you wish to incorporate
|
||||||
parts of Smeagol into another open source project which uses a less restrictive
|
parts of Smeagol into another open source project which uses a less restrictive
|
||||||
license, please contact me; I'm open to dual licensing it.
|
license, please contact me; I'm open to dual licensing it.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
You will need [Leiningen][1] 2.0 or above installed.
|
You will need [Leiningen][1] 2.0 or above installed.
|
||||||
|
|
||||||
[1]: https://github.com/technomancy/leiningen
|
[1]: https://github.com/technomancy/leiningen
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
To start a web server for the application, run:
|
To start a web server for the application, run:
|
||||||
|
|
||||||
lein ring server
|
lein ring server
|
||||||
|
|
@ -61,5 +57,4 @@ Alternatively, if you want to deploy to a servlet container (which I would stron
|
||||||
|
|
||||||
|
|
||||||
## Editing the framing content
|
## Editing the framing content
|
||||||
|
|
||||||
You can edit the [[\_left-bar]], the [[\_edit-left-bar]], and the [[\_header]].
|
You can edit the [[\_left-bar]], the [[\_edit-left-bar]], and the [[\_header]].
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@
|
||||||
<link href="{{servlet-context}}/css/standard.css" media="screen and (min-device-width: 1025px)" rel="stylesheet" type="text/css" />
|
<link href="{{servlet-context}}/css/standard.css" media="screen and (min-device-width: 1025px)" rel="stylesheet" type="text/css" />
|
||||||
<link href="{{servlet-context}}/css/print.css" media="print" rel="stylesheet" type="text/css" />
|
<link href="{{servlet-context}}/css/print.css" media="print" rel="stylesheet" type="text/css" />
|
||||||
<link href="{{servlet-context}}/css/states.css" rel="stylesheet" type="text/css" />
|
<link href="{{servlet-context}}/css/states.css" rel="stylesheet" type="text/css" />
|
||||||
|
{% block extra-headers %}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
@ -49,8 +51,8 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div id="cookies">
|
<div id="cookies">
|
||||||
<div id="more-about-cookies">
|
<div id="more-about-cookies">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{% extends "templates/base.html" %}
|
{% extends "templates/base.html" %}
|
||||||
|
{% block extra-headers %}
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||||
|
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content" class="edit">
|
<div id="content" class="edit">
|
||||||
<form action="{{servlet-context}}/edit" method="POST">
|
<form action="{{servlet-context}}/edit" method="POST">
|
||||||
|
|
@ -15,4 +20,7 @@
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
var simplemde = new SimpleMDE();
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue