rcarmo/Yaki — pull request #3 by lhagan (2011-11-22 06:51:32+00:00)
Title: Improved wiki & theme modularity

Some relatively mundane changes to Yaki that I've made over the years to make my life easier.

## Site Modularity
Making it easier to change the wiki, media, and journal namespaces without having to edit Yaki itself.

- Added siteroot, theme, media, and journal variables to siteinfo in
`__init__.py`.
- Modified Engine.py to expose above variables to the rendered page.
- Replaced hard-coded references to 'blog' namespace in `Engine.py`,
`Feeds.py`, and `Journal.py` with variable from `__init__.py`. Removed
SANITIZE_TITLE_REGEX from Utils.py and moved to `Engine.py`, `Feeds.py`,
and `Journal.py` to enable use of journal variable instead of hard-coded
'blog' namespace.
- Replaced hard-coded references to wiki URLs in `index.y` with variables
(drawn from siteinfo).
- Deleted web/main/index.y as this approach to redirecting from ROOT to
the wiki start page does not support the use of variables. Replaced
with `Redirect.py`, which takes advantage of Snakelets's `index.sn`
feature.
- Deleted `home.py`. This was virtually identical to `index.y`, but without
the See Also section. Added a if statement to index.y to disable the
See Also section if the rendered page is the home page.

Note: still have to manually change the URL passed to the Journal plugin in `start/index.txt` if the journal variable is changed in in `__init__.py`.

## Theme Modularity
Making it easier to switch between themes without having to customize index.y for each theme.

- Added theme variable to siteinfo in `__init__.py`.
- Modified Engine.py to expose theme variable to the rendered page.
- Replaced hard-coded references to theme URLs in `index.y` with
variables (drawn from siteinfo).
- Renamed bootstrap.css to style.css.
- Renamed apple-touch-icons to remove bootstrap- prefix and conform to
Apple's naming convention.

## Misc
- Changed permalink in Journal.py as the original version was providing invalid URLs (without the :9090)
- Added yaki/var/Yaki* to .gitignore to ignore cache files