how to use a custom theme in rx4rdf
I've started experimenting with rx4rdf
, and although there are more useful things I could do first, I started trying to replace the default visual theme with a custom one just for n01se.net
. After much stumbling around, I found what I needed to add to the site-config.py
file in order for my own XSLT (really RxSLT
) and CSS
stylesheets to work.
First I used __addItem__ to make rx4rdf aware of the two new stylesheet files, and how to treat each of them:
The server will now expect to find those files in my site's "content" directory.
Next I created a new "theme" made up of those two stylesheets:
__addRxML__(replace = '@themes', contents = '''
rdfs:comment: `custom theme for n01se.net
Note by using "replace =" above, I disabled the three themes that ship with rx4rdf. That's ok with me, since I won't be needing them for this site.
Finally, I configured my sitevars to point to the new theme:
__addRxML__(replace = '@sitevars', contents = '''
#wiki:header-text: `n01se.net rocks!
wiki:footer-text: `© 2007 n01se.net
I also commented out the uses-skin predicate because I don't need another CSS file included.
This may not be the best way to do this, but since I couldn't find any existing documentation on how it should
be done, I thought it would be worth writing up what worked for me.
I started off with n01senet-theme.css and .xsl files copied from rx4rdf-0.6.0/rhizome/themes/default/theme.css and .xsl files, and started modifying them to look like I want. I'm not done yet, but it looks like I'll have all the flexibility I need (a.k.a. enough rope to hang myself)
Labels: cms, rdf, rx4rdf