]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn
(no commit message)
[ikiwiki.git] / doc / plugins / contrib / default_content_for___42__copyright__42___and___42__license__42__.mdwn
1 [[!template id=plugin name=copyright author="[[tschwinge]]"]]
2 [[!template id=plugin name=license author="[[tschwinge]]"]]
3
4 [[!meta title="default content for *copyright* and *license*"]]
5
6 Someone was just asking for it and I had written these two plugins already some months ago,
7 so I'm now publishing them here.
8
9 [`copyright.pm`](http://www.schwinge.homeip.net/~thomas/tmp/copyright.pm)
10 and
11 [`license.pm`](http://www.schwinge.homeip.net/~thomas/tmp/license.pm)
12
13 Usage instructions are found inside the two plugin files.
14
15 --[[tschwinge]]
16
17 I was asking about this in IRC the other day, but someone pointed me at the
18 [[Varioki|todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup]]
19 plugin. It seems to me that it would be a better idea to have a way of defining
20 template variables in general, rather than having to add a new plugin for every
21 template variable somebody wants to use.
22
23 --[[bma]]
24
25 Copyright and license values are not "template values", they are values
26 tracked by the [[meta]] plugin, and that various code compares and uses to fill
27 out the templates. Something like varioki cannot do that. --[[Joey]]
28
29 Somewhat more detailed usage documentation would be appreciated. I tried to setup
30 those plugins with a current ikiwiki release, i.e. 2.61, but they appeared to do
31 nothing, really. Also, those example pages don't seem to use those plugins, even;
32 they set "copyright" and "license" properties using ordinary [[meta]] tags. Maybe
33 I'm missing something terribly obvious? --Peter
34
35 > Only obvious if you read the source :-). You need to put a file named "copyright.html"
36 >(respectively "license.html") in your wiki. Everything underneath that (in the wikilink sense) will use that
37 >content for the license or copyright. Saves putting \[[meta license="foo"]] in every page [[DavidBremner]]
38
39 By the way: these need not be *HTML* files; `copyright.mdwn`,
40 respectively `license.mdwn`, or every other format supported
41 by ikiwiki are likewise fine.  --[[tschwinge]]
42
43 > Jon has done something similar in [[todo/allow_site-wide_meta_definitions]];
44 > his version has the advantages that it doesn't invent magical page names,
45 > and can extend beyond just copyright and license, but has the disadvantage
46 > that it doesn't support setting defaults for a given "subdirectory"
47 > only. --[[smcv]]