|
|
Introduction
Okay, so you want to know how to go about running Yaki, right?
Here's what you'll need:
- A Subversion client (I use the MacPorts command-line and, of course, the built-in TextMate support, but there are plenty of options)
- Python 2.3 or above
- Some patience
Checking Out The Code
For now, there are no nice tar or zip files of Yaki. You'll need to get it from Google Code, which means following these instructions.
The File Tree
You'll find that Yaki lives inside a complete Snakelets installation, which has the following layout (some files and folders are omitted for clarity):
yaki --+-- serv.py (the start script)
|
+-- monitor.py (the process monitor, which you can run from cron to restart Snakelets automatically)
|
+-- docs (Snakelets original docs)
|
+-- logs (HTTP and app server log files)
|
+-- snakeserver (Snakelets itself, containing a few other directories)
|
+-- userlibs (where some Yaki dependencies are kept, shared across all Snakelets applications)
|
+-- webapps.disabled (some - disabled - sample Snakelets applications I included as reference)
|
+== webapps ==+== ROOT ==+== __init__.py (the main Yaki configuration file)
|
+-- plugins (Wiki plugins, basically Python classes that manage markup)
|
+-- space (the default path for page content, which you can - and should - change)
|
+-- web --+-- (static files and some dynamic helpers)
| |
| +-- themes (page templates and related stuff)
|
+== yaki (Yaki itself, which is where all the action is)Getting It Going
Just type python serv.py and Snakelets will start running. You'll see some diagnostic output (which is also available in the logs folder), and you can go straight to http://127.0.0.1:9080 to have a look at it.
Since it includes a few sample blog entries and all known documentation about itself, you can get a feel for what it can do right away.
Adding Your Own Content
Have a look into __init__.py and locate the configItems hash. The store attribute tells Yaki where to look for content, and you can change it to point to your own file tree.
Note: you'll need to copy the space/meta folder to your own file tree, since it contains some "meta pages" that Yaki requires to work, such as the default EmptyPage
Changing Themes
For now, changing themes means doing three things:
- Creating a theme template of your own, preferably under web/themes
- Editing the web/wiki.y dynamic page, which invokes the former
- (optionally) editing the item templates in __init__.py
This will change at a latter date (especially if I end up extending Yaki to do virtual hosting)
Keeping It Going
If you want to keep Yaki running for an extended period of time, I recommend using monitor.py, which can be added to your crontab to check if Snakelets is running and restart it automatically.
Recommended Setup
I personally recommend editing serv.py to bind Yaki to run solely on localhost (i.e., changing the bindname to read '127.0.0.1') and setting up lighttpd as a reverse proxy for it. lighttpd will do HTTP/1.1 and keepalives to remote browsers, improving response times significantly.
Multiple Instances
Right now, there is nothing to prevent people from running multiple instances of Yaki on different ports (by editing HTTPD_PORT in serv.py) - since the Yaki+Snakelets combination has a very small memory footprint, it's entirely feasible, and you can use lighttpd to glue it all together on different path names or virtual hosts.
However, there is some demand for using Yaki as a hosting platform (with completely different content and theme paths, but sharing the same Python process), so I'll be looking into making Yaki virtual host-aware.
Sign in to add a comment

Just a quick trick I add the svn:external my space folder meta like so:
$ svn propedit svn:externals space meta http://yaki.googlecode.com/svn/trunk/yaki/webapps/ROOT/space/meta