2010-04-19 22:03:53 +02:00
|
|
|
If `page.tmpl` is changed, it would be nice if ikiwiki automatically
|
|
|
|
noticed, and rebuilt all pages. If `inlinepage.tmpl` is changed, a rebuild
|
|
|
|
of all pages using it in an inline would be stellar.
|
|
|
|
|
|
|
|
This would allow setting:
|
|
|
|
|
|
|
|
templatedir => "$srcdir/templates",
|
|
|
|
|
|
|
|
.. and then the [[wikitemplates]] are managed like other wiki files; and
|
|
|
|
like other wiki files, a change to them automatically updates dependent
|
|
|
|
pages.
|
|
|
|
|
|
|
|
Originally, it made good sense not to have the templatedir inside the wiki.
|
|
|
|
Those templates can be used to bypass the htmlscrubber, and you don't want
|
|
|
|
just anyone to edit them. But the same can be said of `style.css` and
|
|
|
|
`ikiwiki.js`, which *are* in the wiki. We rely on `allowed_attachments`
|
|
|
|
being set to secure those to prevent users uploading replacements. And we
|
|
|
|
assume that users who can directly (non-anon) commit *can* edit them, and
|
|
|
|
that's ok.
|
|
|
|
|
|
|
|
So, perhaps the easiest way to solve this [[wishlist]] would be to
|
|
|
|
make templatedir *default* to "$srcdir/templates/, and make ikiwiki
|
|
|
|
register dependencies on `page.tmpl`, `inlinepage.tmpl`, etc, as they're
|
|
|
|
used. Although, having every page declare an explicit dep on `page.tmpl`
|
|
|
|
is perhaps a bit much; might be better to implement a special case for that
|
|
|
|
one. Also, having the templates be copied to `destdir` is not desirable.
|
2010-04-20 07:32:19 +02:00
|
|
|
In a sense, these template would be like internal pages, except not wiki
|
|
|
|
pages, but raw files.
|
2010-04-19 22:03:53 +02:00
|
|
|
|
2010-04-20 04:37:55 +02:00
|
|
|
The risk is that a site might have `allowed_attachments` set to
|
|
|
|
`templates/*` or `*.tmpl` something like that. I think such a configuration
|
|
|
|
is the *only* risk, and it's unlikely enough that a NEWS warning should
|
|
|
|
suffice.
|
2010-04-19 22:03:53 +02:00
|
|
|
|
|
|
|
(This would also help to clear up the tricky disctinction between
|
|
|
|
wikitemplates and in-wiki templates.)
|
2010-04-20 04:31:00 +02:00
|
|
|
|
|
|
|
> But would this require that templates be parseable as wiki pages? Because that would be a nuisance. --[[KathrynAndersen]]
|
2010-04-20 04:37:55 +02:00
|
|
|
|
|
|
|
>> It would be better for them not to be rendered separately at all.
|
|
|
|
>> --[[Joey]]
|
2010-04-20 04:45:14 +02:00
|
|
|
|
|
|
|
>>> I don't follow you. --[[KathrynAndersen]]
|
2010-04-20 05:52:16 +02:00
|
|
|
|
|
|
|
>>>> If they don't render to output files, they clearly don't
|
|
|
|
>>>> need to be treated as wiki pages. (They need to be treated
|
|
|
|
>>>> as raw files anyway, because you don't want random users editing them
|
|
|
|
>>>> in the online editor.) --[[Joey]]
|
2010-04-20 16:40:10 +02:00
|
|
|
|
|
|
|
>>>>> Just to be clear, the raw files would not be copied across to the output
|
|
|
|
>>>>> directory? -- [[Jon]]
|
2010-04-20 17:01:39 +02:00
|
|
|
|
|
|
|
>>>>>> Without modifying ikiwiki, they'd be copied to the output directory as
|
|
|
|
>>>>>> (e.g.) http://ikiwiki.info/templates/inlinepage.tmpl; to not copy them,
|
|
|
|
>>>>>> it'd either be necessary to make them be internal pages
|
|
|
|
>>>>>> (templates/inlinepage._tmpl) or special-case them in some other way.
|
|
|
|
>>>>>> --[[smcv]]
|