X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/238964c2e1c8bad94528154637c6826ac6df4799..832d4d31d177d5d5f848250496048a00e9d70e2f:/doc/todo/conditional_underlay_files.mdwn?ds=inline diff --git a/doc/todo/conditional_underlay_files.mdwn b/doc/todo/conditional_underlay_files.mdwn index d6abfd159..c578bceaf 100644 --- a/doc/todo/conditional_underlay_files.mdwn +++ b/doc/todo/conditional_underlay_files.mdwn @@ -1,11 +1,29 @@ I'd like to see some way to include certain files from the underlay only when the wiki has certain plugins enabled. For example: * Only include smileys.mdwn and the smileys subdirectory if you enable the [[plugins/smiley]] plugin. -* Only include openid.mdwn if you enable the [[plugins/openid]] plugin. +* Exclude openid.mdwn if you disable the [[plugins/openid]] plugin. * Include shortcuts.mdwn only if you enable the [[plugins/shortcut]] plugin. * Include blog.mdwn only if you don't disable the [[plugins/inline]] plugin. * Include favicon.ico only if you enable the [[plugins/favicon]] plugin. * Include wikiicons/diff.png (and the wikiicons directory) only if you enable the CGI. * Include a hypothetical restructuredtexthelp.rst or similar for other formats only with those formats enabled. -I can see two good ways to implement this. Ideally, with [[conditional text based on ikiwiki features]] available, ikiwiki could parse a page like conditionalpages.mdwn, which could contain a set of conditional-wrapped page names; that seems like the most elegant and ikiwiki-like approach. Alternatively, ikiwiki.setup could contain a Perl-generated exclude option by default; that would work, but it seems hackish. \ No newline at end of file +I can see two good ways to implement this. Ideally, with +[[conditional_text_based_on_ikiwiki_features]] available, ikiwiki could +parse a page like conditionalpages.mdwn, which could contain a set of +conditional-wrapped page names; that seems like the most elegant and +ikiwiki-like approach. Alternatively, ikiwiki.setup could contain a +Perl-generated exclude option by default; that would work, but it seems +hackish. + +> Another way might be to have a third directory of source files where +> plugins could drop in pages, and only build the files from there if their +> plugins were enabled. +> +> Using the conditionals in a page to control what other pages get built +> feels complex to me. +> +> Instead, this has been implmented as the `add_underlay()` function. +> [[done]] +> --[[Joey]] +