]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/allow_site-wide_meta_definitions.mdwn
try to fix my inline
[ikiwiki.git] / doc / todo / allow_site-wide_meta_definitions.mdwn
1 [[!tag plugins/meta patch]]
2 [[!template id=gitbranch branch=jon/defaultmeta author="[[Jon]]"]]
3
4 I'd like to define [[plugins/meta]] values to apply across all pages
5 site-wide unless the pages define their own: default values for meta
6 definitions essentially.
7
8     <snip old patch, see below for latest>
9
10 -- [[Jon]]
11
12 > This doesn't support multiple-argument meta directives like
13 > `link=x rel=y`, or meta directives with special side-effects like
14 > `updated`.
15 >
16 > The first could be solved (if you care) by a syntax like this:
17 >
18 >     meta_defaults => [
19 >         { copyright => "© me" },
20 >         { link => "about:blank", rel => "silly", },
21 >     ]
22 >
23 > The second could perhaps be solved by invoking `meta::preprocess` from within
24 > `scan` (which might be a simplification anyway), although this is complicated
25 > by the fact that some (but not all!) meta headers are idempotent.
26
27 > --[[smcv]]
28
29 >> Thanks for your comment. I've revised the patch to use the config syntax
30 >> you suggest. I need to perform some more testing to make sure I've
31 >> addressed the issues you highlight.
32 >> 
33 >> I had to patch part of IkiWiki core, the merge routine in Setup, because
34 >> the use of `possibly_foolish_untaint` was causing the hashrefs at the deep
35 >> end of the data structure to be converted into strings. The specific change
36 >> I've made may not be acceptable, though -- I'd appreciate someone providing
37 >> some feedback on that hunk!
38
39 <code>
40 [[!inline pages="allow site-wide meta definitions/current-patch" raw=yes quick=yes]]
41 </code>
42
43  -- [[Jon]]