aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorhttp://kaizer.se/ <http://kaizer.se/@web>2009-09-16 23:34:27 -0400
committerJoey Hess <joey@kitenet.net>2009-09-16 23:34:27 -0400
commit36094d76742872e3a894a15775832e8ba8261bbf (patch)
tree5d836bf9e7e3f0b8a6ccb30dac2e75adc0b0d61c /doc/plugins
parentd9b665d83b7a8d71bc68a33a5c61d63f178de4a3 (diff)
downloadikiwiki-36094d76742872e3a894a15775832e8ba8261bbf.tar
ikiwiki-36094d76742872e3a894a15775832e8ba8261bbf.tar.gz
Resolving WikiLinks in rst -- WIP
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/rst/discussion.mdwn30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/plugins/rst/discussion.mdwn b/doc/plugins/rst/discussion.mdwn
index 9909784d5..af96edc6a 100644
--- a/doc/plugins/rst/discussion.mdwn
+++ b/doc/plugins/rst/discussion.mdwn
@@ -41,3 +41,33 @@ 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: http://kaizer.se/wiki/rst.py
+*Warning, written in the middle of the night just to test if it works!*
+
+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: http://kaizer.se/wiki/kupfer-mdwn
+After: http://kaizer.se/wiki/kupfer-rst
+
+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