]> sipb.mit.edu Git - ikiwiki.git/blob - doc/forum/Export_images_when_building_the_wiki/comment_3_7f5a1ef639453c83748405d2b3b0b880._comment
Merge branch 'ready/templatebody'
[ikiwiki.git] / doc / forum / Export_images_when_building_the_wiki / comment_3_7f5a1ef639453c83748405d2b3b0b880._comment
1 [[!comment format=mdwn
2  username="spalax"
3  ip="82.216.247.172"
4  subject="comment 3"
5  date="2014-05-17T13:49:14Z"
6  content="""
7 > I need a plugin of exactly the same kind, but which calls other tools, such as Dia and Inkspace.
8 > In addition, embedding into a page means the same image may end up being generated
9 > many times. So it's best to generate the image as an attachment of some page, and then
10 > all other pages in the wiki can use it. What do you think?
11
12 Then the [[plugins/contrib/pandoc]] may be a good start, since *you can configure it for Pandoc to take over processing of all .mkdn files, or only files with a different extension.* Have a look at it to make your plugin process files with a particular extension. Then, it will be possible to have several pages refer to the same file, generated only once (maybe by storing stuff in `%pagestate` or `%wikistate`.
13
14 Have a look at [[plugins/write]] to write your plugin.
15
16 > Also, if I write a plugin (and test it of course), where do I publish it so people can
17 > see and enjoy it? Is [[plugins]] moderated?
18
19 What is usually done is:
20
21 - you publish your code somewhere (your server, or on github or something like that);
22 - you advertise your plugin by creating a subpage of [[plugins/contrib]]. Use the [[templates/plugin]] [[template|templates]] (it generates the frame you can see on the right of [[one of my plugins|plugins/contrib/jscalendar]], for example):
23
24       \[[!template id=plugin name=YourFancyPlugin author=\"[[fr33domlover]]\"]]
25
26 -- [[Louis|spalax]]
27 """]]