]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Howto_add_tag_from_plugin_code.mdwn
fix for thumbnail size bug
[ikiwiki.git] / doc / forum / Howto_add_tag_from_plugin_code.mdwn
1 Hi, I want to add tags to some pages automatically (generating album images 
2 and want to tag all generated pages). I managed to do so in following way:
3
4     IkiWiki::Plugin::tag::preprocess_tag(
5         page => $viewer,
6         destpage => $params{destpage},
7         map { ($_ => 1) } @tags,
8     );
9
10 This works, however if some tag does not exist, it is not created. I tracked it so far that I found that the Render.pm's method gen_autofile() is not called , so it is most likely that I need to somehow trigger Render.pm's refresh()...but how can I do it?
11
12 BTW: The code is modified album plugin that is in [my git](https://github.com/llipavsky/ikiwiki)