Closed lhagan closed 12 years ago
Very, very nice. Thanks - I've always been putting off improving theme support because I change themes so seldom, but these tweaks are very welcome (as the removal of hardcoded namespaces).
I'll pull these in later in the week when I have the time - feel free to add yourself to the About page as a contributor in the meantime. :)
R.
On Nov 22, 2011, at 06:51 , Luke Hagan wrote:
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
, andJournal.py
with variable from__init__.py
. Removed SANITIZE_TITLE_REGEX from Utils.py and moved toEngine.py
,Feeds.py
, andJournal.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'sindex.sn
feature.- Deleted
home.py
. This was virtually identical toindex.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
You can merge this Pull Request by running:
git pull https://github.com/lhagan/Yaki master
Or you can view, comment on it, or merge it online at:
https://github.com/rcarmo/Yaki/pull/3
-- Commit Summary --
- improved wiki & theme modularity
- remove/rename files -- see previous commit for details
-- File Changes --
M .gitignore (1) D web/main/index.y (2) R web/main/themes/bootstrap/css/style.css (0) R web/main/themes/bootstrap/css/style.min.css (0) D web/main/themes/bootstrap/home.y (140) R web/main/themes/bootstrap/img/apple-touch-icon-114x114.png (0) R web/main/themes/bootstrap/img/apple-touch-icon-57x57.png (0) R web/main/themes/bootstrap/img/apple-touch-icon-72x72.png (0) M web/main/themes/bootstrap/index.y (35) M yaki/userlibs/yaki/Engine.py (8) M yaki/userlibs/yaki/Feeds.py (3) M yaki/userlibs/yaki/Plugins/Journal.py (7) A yaki/userlibs/yaki/Redirect.py (23) M yaki/userlibs/yaki/Utils.py (3) M yaki/webapps/ROOT/init.py (45)
-- Patch Links --
https://github.com/rcarmo/Yaki/pull/3.patch https://github.com/rcarmo/Yaki/pull/3.diff
Reply to this email directly or view it on GitHub: https://github.com/rcarmo/Yaki/pull/3
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.
__init__.py
.Engine.py
,Feeds.py
, andJournal.py
with variable from__init__.py
. Removed SANITIZE_TITLE_REGEX from Utils.py and moved toEngine.py
,Feeds.py
, andJournal.py
to enable use of journal variable instead of hard-coded 'blog' namespace.index.y
with variables (drawn from siteinfo).Redirect.py
, which takes advantage of Snakelets'sindex.sn
feature.home.py
. This was virtually identical toindex.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.
__init__.py
.index.y
with variables (drawn from siteinfo).Misc