diff options
author | chrysn <chrysn@fsfe.org> | 2010-09-23 13:09:05 +0200 |
---|---|---|
committer | chrysn <chrysn@fsfe.org> | 2010-09-23 13:09:05 +0200 |
commit | abea37a67af78c9c9405d4f089b76199264d193f (patch) | |
tree | ca6e96dbbf2ec1bdfc2292028ac34748e28eec27 /doc/todo | |
parent | fc296d49a01377704443280d9ba2c04e6aff3de0 (diff) |
connection between alias direcive and autotag
Diffstat (limited to 'doc/todo')
-rw-r--r-- | doc/todo/alias_directive.mdwn | 29 | ||||
-rw-r--r-- | doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 13 |
2 files changed, 40 insertions, 2 deletions
diff --git a/doc/todo/alias_directive.mdwn b/doc/todo/alias_directive.mdwn index 4d7817694..71a2efc76 100644 --- a/doc/todo/alias_directive.mdwn +++ b/doc/todo/alias_directive.mdwn @@ -27,8 +27,8 @@ suggested for addition (possibly by means of a plugin): > > <!-- there are so many people who misspell this, let's create a redirect --> > > \[[!alias Grece list=false]] > -> This page by itself will redirect from the "Hellas" and "Hellenic Republic" -> pages as if they both contained just: +> This page by itself will redirect from the "Hellas", "Hellenic Republic" and +> "Grece" pages as if they both contained just: > > > \[[!meta redir="Greece"]] > @@ -44,4 +44,29 @@ The proposed plugin/directive could be extended, eg. by also including old-style redirects in the alias list, but that might introduce unwanted coupling with the meta directive. +----------------- + +On second thought, implementing this might have similarities with +[[todo/auto-create tag pages according to a template]] -- the auto-created +pages would, if the way of the alias directive is followed, not create physical +files, though, but be created just when someone edits them. + +If multiple plugins do such a trick, they would have to fight over who comes +first. If, for example, we have a setup where not yet created tag pages are +automatically generated as "\[[!inline pages="link(<TMPL_VAR TAG>)" +archive="yes"]]" and aliases are enabled, and a non-tag pages grabs a tag as an +alias (as to redirect all taglinks of the tag to itself), there are two +possibilities: + +* The autotag plugin comes first: + * autotag sees the missing tag and creates its "\[[!inline" stuff + * alias sees that there is already content and adds its prefix +* The alias plugin comes first (this is the prefered way): + * alias sees the empty page, sees it is not contested by other alias + directives and creates its "\[[!meta" redirect + * autotag sees there is already content and doesn't do anything + +That issue could be handled with "priority number" on the hook, with plugins +with a lower number being called first. + [[!tag wishlist]] diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 7eb404910..92c3b7695 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -248,4 +248,17 @@ I've tested it fairly thouroughly. --[[Joey]] [a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6) [981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691) +------------------- + +Even if this is already marked as done, I'd like to suggest an alternative +solution: + +Instead of creating a file that gets checked in into the RCS, the source files +could be left out and the output files be written as long as there is no +physical source file (think of a virtual underlay). Something similar would be +required to implement [[todo/alias directive]], which couldn't be easily done +by writing to the RCS as the page's contents can change depending on which +other pages claim it as an alias. --[[chrysn]] + + [[!tag done]] |