X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e96f28a31ef38fd886d35150ba76adffeeaa3838..f62b4f45039a1acb5f9173b0835475d28c1058a5:/doc/plugins/rst/discussion.mdwn?ds=sidebyside diff --git a/doc/plugins/rst/discussion.mdwn b/doc/plugins/rst/discussion.mdwn index db1ba6fc9..c84a6218e 100644 --- a/doc/plugins/rst/discussion.mdwn +++ b/doc/plugins/rst/discussion.mdwn @@ -36,5 +36,46 @@ than markdown in my opinion, so I tried it out in ikiwiki. I found out in other places that some directives work just fine, like [[meta]] and [[tag]], others work fine if you wrap them in `.. raw::`, like [[inline]]. -But to make a wiki we need [[WikiLinks]]; they can't be escape-inserted or such since they are inline elements in the text.. But images work fine in rst's syntax.. what about using rst syntax for wikilinks as well? -Is it possible to inject something into the parser to turn unmached links ` `WikiLink`_ ` into ikiwiki links? --ulrik +But to make a wiki we need [[WikiLinks]]; they can't be escape-inserted or +such since they are inline elements in the text.. But images work fine in +rst's syntax.. what about using rst syntax for wikilinks as well? +Is it possible to inject something into the parser to turn unmached links +``WikiLink`_` into ikiwiki links? --ulrik + +------ + +Resolving WikiLinks in rst +========================== + +I wanted to look into if we can hook into rst and influence how links are resolved. +It turns out it is possible, and I have a working WIP for the rst plugin that does this. + +My work in progress for `/usr/lib/ikiwiki/plugins/rst` is here: +[[todo/Resolve native reStructuredText links to ikiwiki pages]] + +It basically matches normal rst links just like ikiwiki would match a wikilink +if it existed. +I can't read perl so I haven't found out so much. The plugin successfully registers backlinks using +`proxy.rpc('add_link', on_page, bestlink)` (since the destination page will be rebuilt to update), +but the backlinks don't show up. + +I converted one of my pages to rst: + +Before: +After: + +I need help on a couple of points + +* How to fix the backlinks with `add_link`? +* How to generate NonExistingLinks using the plugin API? +* Can we include this in ikiwiki's rst if it is not too hairy? + +--ulrik + + +---- + +> The main problem with more sophisticated RST support is that ikiwiki turns +preprocessor directives into raw HTML and reST hates inline HTML. + +Is it possible for ikiwiki to store preprocessor directives in memory, and replace them with place holders, then do the rst process. After the rst processing, process the preprocessor directives and replace place holders. --[[weakish]]