summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-11-09 13:32:08 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-11-09 13:39:05 -0500
commit9f0931ce21e5f58e2e9de0ef302beca08b8f9177 (patch)
tree0c57de59b093121bb017f78bfd8ec723fa42c0e2 /doc/plugins
parent1fec2fdd20f04bae4f48980e04681bfa608db99e (diff)
localstyle: New plugin, allows overrding the toplevel local.css with one that is closer to a page.
I chose not to have it override style.css, because style.css is not really intended to be edited; the one from the underlay is intended to be used as a base that local.css overrides. I chose to use a plugin rather than changing the default behavior, both because I didn't want to have to worry about possibly breaking backwards compatability (though this seems unlikely), and because it seemed cleaner to not include style template parameters in the main page template code. I suppose someone might want a way to not override the toplevel local.css, but instead include it as well as foo/local.css. Probably the best way to do that would be to have foo/local.css @import ../local.css (modulo browser compatability issues). Alternatively, edit page.tmpl to always include the toplevel local.css, or swap out this plugin for another one.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/localstyle.mdwn12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/plugins/localstyle.mdwn b/doc/plugins/localstyle.mdwn
new file mode 100644
index 000000000..70a909d68
--- /dev/null
+++ b/doc/plugins/localstyle.mdwn
@@ -0,0 +1,12 @@
+[[!template id=plugin name=localstyle author="[[Joey]]"]]
+[[!tag type/chrome]]
+
+This plugin allows styling different sections of a wiki using different
+versions of the local.css [[CSS]] file. Normally this file is read from the
+top level of the wiki, but with this plugin enabled, standard
+[[ikiwiki/subpage/LinkingRules]] are used to find the closest local.css
+file to each page.
+
+So, for example, to use different styling for page `foo`, as well as all
+of its [[SubPages|ikiwiki/subpage]], such as `foo/bar`, create a
+`foo/local.css`.