diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-07-17 11:49:29 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-07-17 14:08:53 +0300 |
commit | 9095e13c0828a9469ce1727e89a53bff95e6062c (patch) | |
tree | 77d4873ddb4e57d4cc3c2cf81a4630b6a73f52b8 /riki.md | |
parent | 13ef8ece3f7a85c488be1604ee63fec486a07b8a (diff) | |
download | riki-9095e13c0828a9469ce1727e89a53bff95e6062c.tar.gz |
feat: resolve links to other pages
This is meant to implement the rules described on
https://ikiwiki.info/ikiwiki/subpage/linkingrules/.
Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r-- | riki.md | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -363,3 +363,31 @@ when I run riki build site output then AST of site/foo/page.mdwn matches that of output/foo/page.html then files site/bar//image.jpg and output/bar/image.jpg match ~~~ + +## Wiki links to other pages on the site + +_Requirement: Pages can link to other pages on the site, the same +way ikiwiki does, including subpages._ + +~~~scenario +given an installed riki +given file site/dir/foo.mdwn from foo +given file site/absolute.mdwn from empty +given file site/dir/sibling.mdwn from empty +given file site/dir/foo/child.mdwn from empty +given file site/dir/foo/child/grandchild.mdwn from empty +when I run riki build site output +then file output/dir/foo.html contains "href="/absolute"" +then file output/dir/foo.html contains "href="dir/sibling"" +then file output/dir/foo.html contains "href="dir/foo/child"" +then file output/dir/foo.html contains "href="dir/foo/child/grandchild"" +then file output/dir/foo.html contains "href="/missing" +~~~ + +~~~{#foo .file .markdown} +[[/absolute]] +[[sibling]] +[[child]] +[[child/grandchild]] +[[missing]] +~~~ |