ikiwiki/doc/plugins/contrib/default_content_for___42__c...

55 lines
2.6 KiB
Plaintext
Raw Normal View History

[[!template id=plugin name=copyright author="[[tschwinge]]"]]
[[!template id=plugin name=license author="[[tschwinge]]"]]
2008-02-11 04:57:34 +01:00
[[!meta title="default content for *copyright* and *license*"]]
Someone was just asking for it and I had written these two plugins already some months ago,
so I'm now publishing them here.
[`copyright.pm`](http://schwinge.homeip.net/~thomas/tmp/copyright.pm)
2009-05-08 22:20:59 +02:00
and
[`license.pm`](http://schwinge.homeip.net/~thomas/tmp/license.pm)
2009-05-08 22:20:59 +02:00
Usage instructions are found inside the two plugin files.
--[[tschwinge]]
I was asking about this in IRC the other day, but someone pointed me at the
[[Varioki|todo/varioki_--_add_template_variables___40__with_closures_for_values__41___in_ikiwiki.setup]]
plugin. It seems to me that it would be a better idea to have a way of defining
template variables in general, rather than having to add a new plugin for every
template variable somebody wants to use.
--[[bma]]
2008-03-05 23:16:20 +01:00
Copyright and license values are not "template values", they are values
2009-02-11 09:08:33 +01:00
tracked by the [[meta]] plugin, and that various code compares and uses to fill
2008-03-05 23:16:20 +01:00
out the templates. Something like varioki cannot do that. --[[Joey]]
2008-08-21 22:30:03 +02:00
Somewhat more detailed usage documentation would be appreciated. I tried to setup
those plugins with a current ikiwiki release, i.e. 2.61, but they appeared to do
nothing, really. Also, those example pages don't seem to use those plugins, even;
they set "copyright" and "license" properties using ordinary [[meta]] tags. Maybe
2008-10-29 20:09:56 +01:00
I'm missing something terribly obvious? --Peter
2009-05-08 22:20:59 +02:00
2008-09-15 14:42:47 +02:00
> Only obvious if you read the source :-). You need to put a file named "copyright.html"
>(respectively "license.html") in your wiki. Everything underneath that (in the wikilink sense) will use that
>content for the license or copyright. Saves putting \[[meta license="foo"]] in every page [[DavidBremner]]
2009-05-08 22:20:59 +02:00
By the way: these need not be *HTML* files; `copyright.mdwn`,
respectively `license.mdwn`, or every other format supported
by ikiwiki are likewise fine. --[[tschwinge]]
> Jon has done something similar in [[todo/allow_site-wide_meta_definitions]];
> his version has the advantages that it doesn't invent magical page names,
> and can extend beyond just copyright and license, but has the disadvantage
> that it doesn't support setting defaults for a given "subdirectory"
> only. --[[smcv]]
2010-11-01 19:23:43 +01:00
[[!template id=gitbranch name=smcv/contrib/defcopyright author="[[tschwinge]]"]]
> For `./gitremotes` convenience (taking the Linus approach to backups :-) )
> I've added this to my git repository as a branch. No review, approval or
> ownership is implied, feel free to replace this with a branch in any other
> repository --[[smcv]]