ported in order to work.Note: This code was written for kanso 0.0.7 and needs to be
- No comments (not sure whether I'll implement them and how).
- WYSIWYG editor (jwysiwyg).
- Although this is not needed in this case (since all documents are written by the blog's admin), html stored in a post's text field is not trusted (maybe the editor was bypassed - e.g. via curl). This is why the text goes through Sanitize.js.
- Session UI (login/logout/etc.), flash messages, etc. shamelessly copy/pasted from Kanso's admin code.
- Install Kanso on your computer.
- Clone this repository,
cdto its folder, do
git submoule initand
git submodule update.
lib/config.jsand edit it (e.g. site name).
- Setup a CouchDB server (version >= 1.1.0), or use a public one.
- Create a user (for publishing blog posts), (say - blogger), and give it the staff role from
lib/config.js(default is bloggers).
- Create a database (say - myblog), click
security, and add the staff role to the admin roles (say - [ "bloggers" ]).
- Push to the server. For example:
kanso push blogger@http://localhost:5984/myblog, and browse to the url it gives you.
Important: If the server is not localhost, user ssl whenever you push or login, even if it means using an ugly url like
https://myserver.iriscouch.com/myblog/_design/icanblogz/_rewrite/ instead of
Sad note: I can push this app to localhost, but I keep getting Error: EPIPE, Broken pipe when I try it on iriscouch. I simply push to localhost, keep the db clean of docs (only design docs) and replicate to iriscouch each time I change the code. Sad [as promised], but I'll live.
Using kansoblog as a carousel iframe
If you want an iframe in some other site (e.g. as a text widget in wordpress) that shows something like "random tips",
you can create a kansoblog instance for this purpose, fill it with some short items, and use the blog's
as that iframe. Here's a demo.
Note that you can say in
lib/config.js how many items you want to fetch for the carousel's query (e.g. latest 23 items). They will be randomize on the browser's side, but we fetch all of them - so a large number may take longer to load.
You should also define carousel's skin there: Kansoblog comes with a skin called mango
(a variation on tango that came with jcarousel). Jcarousel skins dictate size, colors, etc.,
so if you want to change any of these - duplicate
customize the files there, and define the new folder's name as your jcarousel style at