]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/more_customisable_titlepage_function.mdwn
web commit by http://madduck.net/
[ikiwiki.git] / doc / todo / more_customisable_titlepage_function.mdwn
1 I understand the `IkiWiki::titlepage` function is used to generate filenames from titles. It would be nice if there were an easier way to override what it does. I suppose I could write an *external* plugin and call `inject`, but maybe this could instead be done via the configuration file?
2
3 I imagine two things: a lookup hash and a template.
4
5 Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'Ã\83¤' become 'ae' instead of something illegible.
6
7 Second, maybe a template could be honoured. The template could have a slot `%s` where the calculated title goes, and it could contain `strftime` symbols as well as variables, which get interpolated on use.
8
9 Another option would be a function I could define in the setup file, or an external script, though that would be pretty expensive.
10
11 -- [[madduck]]
12
13 [[wishlist]]