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