summaryrefslogtreecommitdiff
path: root/doc/todo/Resolve_native_reStructuredText_links_to_ikiwiki_pages.mdwn
blob: c98723f2d9f1b4915f44bc1659abc0401e08c61d (plain)

I have a working minimal implementation letting the rst renderer resolve undefined native rST links to ikiwiki pages. I have posted it as one patch at:

Preview commit: http://github.com/engla/ikiwiki/commit/486fd79e520da1d462f00f40e7a90ab07e9c6fdf
Repository: git://github.com/engla/ikiwiki.git

Design issues of the patch:

Right now it changes rendering so that undefined pages (previous errors) are resolved to either ikiwiki pages or link to "#". It could be changed (trivially) so that undefined pages give the same error as before. Since it only resolves links that would previously error out, impact on current installations should be minimal.

The page is rST-parsed once in 'scan' and once in 'htmlize' (the first to generate backlinks). Can the parse output be safely reused?

The page content fed to htmlize may be different than that fed to scan, as directives can change the content. If you cached the input and output at scan time, you could reuse the cached data at htmlize time for inputs that are the same -- but that could be a very big cache! --[[Joey]]

Desing issues in general:

We resolve rST links without definition, we don't help resolving defined relative links, so we don't support specifying link name and target separately.

Many other issues with rST are of course unresolved, but some might be solved by implementing custom rST directives (which is a supported extension mechanism).

Patch follows: