The template is based on ikiwiki's doc/templates/gitbranch.mdwn.
This turned out to be more complicated than I expected, mostly due to
the need for the template to both work and be appropriate Markdown.
The way to do this seems to be to use the htmlscrubber plugin to strip
the <TMPL_...> tags from the rendered version. I'd disabled the
htmlscrubber plugin because it had been stripping out my MathML. Now
it's re-enabled, but only for template/* posts. It would be nice if
there was a way to force posts to evaluate themselves as templates
when rendered directly...
I also added a git tag for the gitrepo template to use.
# plugins to add to the default configuration
add_plugins => [qw{goodstuff linktoimgonly lockedit mdwn_itex org sidebar}],
# plugins to disable
- disable_plugins => [qw{editpage htmlscrubber passwordauth smiley}],
+ disable_plugins => [qw{editpage passwordauth smiley}],
# location of template files
templatedir => '/home/wking/.ikiwiki/templates',
# base wiki source location
# branch that the wiki is stored in
#gitmaster_branch => 'master',
+ # htmlscrubber plugin
+ # PageSpec specifying pages not to scrub
+ htmlscrubber_skip => "!templates/*",
+
# inline plugin
# enable rss feeds by default?
rss => 1,
I wrote a little app in Python to make managing our lab's list of
chemicals less painful. I think it is now ready for people other than me :p.
-[code](http://www.physics.drexel.edu/~wking/code/index.shtml#chemdb)
+[[!template id=gitrepo repo=chemdb]]
[[!tag tags/code]]
[[!tag tags/linux]]
--- /dev/null
+Software versioned in Git or Git-related posts.
+
+[[!inline pages="link(tags/git)" show=10 actions=yes]]
--- /dev/null
+The `templates/` directory contains customized templates for this
+wiki.
+
+[[!inline pages="./templates/*" archive=yes feeds=no sort=title
+ template=titlepage]]
--- /dev/null
+<span class="infobox">
+Available in a [[!taglink tags/git]] repository.<br />
+Repository: <a href="<TMPL_IF url><TMPL_VAR url><TMPL_ELSE>/~wking/code/git/git.php?p=<TMPL_VAR repo>.git</TMPL_IF>" rel="vcs-git"><TMPL_VAR repo></a><br />
+Author: <TMPL_UNLESS author>W. Trevor King</TMPL_UNLESS><TMPL_VAR author><br />
+</span>
+
+<TMPL_UNLESS repo>
+This template is used to create an infobox for a git repository. It
+uses these parameters:
+
+* repo - the name of the repository.
+* url - repository url. Defaults to `/~wking/code/git/git.php?p=<repo>.git`.
+* author - the author of the branch. Defaults to `W. Trevor King`.
+
+It also automatically tags the branch with `tags/git`.
+</TMPL_UNLESS>