diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-10 18:28:27 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-10 18:28:27 +0000 |
commit | 0752abaf7ef9faf818c8af7b04f5fc1484b2243c (patch) | |
tree | 8f6fdf5783107c70afcf26e6c2fcc306908610d1 /doc/todo | |
parent | ace6a60b1b4f3f4faaa5f50140e95adf796b5ec5 (diff) |
web commit by tuomov
Diffstat (limited to 'doc/todo')
-rw-r--r-- | doc/todo/shortcut_with_different_link_text.mdwn | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/todo/shortcut_with_different_link_text.mdwn b/doc/todo/shortcut_with_different_link_text.mdwn index e6323c8ba..07e999642 100644 --- a/doc/todo/shortcut_with_different_link_text.mdwn +++ b/doc/todo/shortcut_with_different_link_text.mdwn @@ -41,3 +41,21 @@ Window System protocol". --[[JoshTriplett]] > I should modify how ikiwiki preprocessors work to make it doable. > Although, I seem to have come up with a clear alternative syntax over > there. --[[Joey]] + +--- + +One possible alternative, would be a general `\[[url ]]` scheme for all kinds of links. As mentioned in [[Short_wikilinks]], I have wanted a way to enter links to the wiki with markdown-style references, +specifying the actual target elsewhere from the text, with just a short reference in the text. To facilitate automatic conversion from earlier (already markdownised) "blog", I finally ended up writing a custom plugin that simply gets the location of wikipage, and use markdown mechanisms: + + Here [is][1] a link. + + [1]: [[l a_page_in_the_wiki]] + + Obviously [this]([[l another_page]]) also works, although the syntax is quite cumbersome. + +So that the 'l' plugin inserts the location the page there, and markdown does the rest. My plugin currently fails if it can't find the page, as that is sufficient for my needs. Differing colouring for non-existing pages is not doable in a straightforward manner with this approach. + +For external links, that is no concern, however. So you could define for each shortcut an alternative directive, that inserts the URL. Perhaps `\[[url shortcutname params]]` or `\[[@shortcutname params]]` (if the preprocessor supported the @), and this could be extended to local links in an obvious manner: `\[[url page]]` or `\[[@page]]`. Now, if you could just get rid off the parantheses for markdown, for the short inline links --[[tuomov]] (who'd really rather not have two separate linking mechanisms: ikiwiki's heavy syntax and markdown's lighter one). + + + |