replace links that have .md suffixes with clean links
to aid viewing the raw markdown source in e.g. a gitlab source browser, or to aid navigation in vim with "gf" style commands to jump between files, allow the markdown source to specify foo.md or whatever/index.md explicitly, yet generate the clean URLs for linking in the HTML output this assumes that nginx is serving "foo" with foo.html, and "bar/" with bar/index.html Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
6
tests/instance/pages/file-with-index.md-link.md
Normal file
6
tests/instance/pages/file-with-index.md-link.md
Normal file
@@ -0,0 +1,6 @@
|
||||
[Cool](cool/index.md)
|
||||
[Anchored Cool](cool/index.md#anchor)
|
||||
[This Index](index.md)
|
||||
[Anchored This Index](index.md#anchor)
|
||||
[Parent](../index.md)
|
||||
[Anchored Parent](../index.md#anchor)
|
||||
4
tests/instance/pages/file-with-md-link.md
Normal file
4
tests/instance/pages/file-with-md-link.md
Normal file
@@ -0,0 +1,4 @@
|
||||
[Foo](foo.md)
|
||||
[Anchored Foo](foo.md#anchor)
|
||||
[Sub Foo](sub/foo.md)
|
||||
[Anchored Sub Foo](sub/foo.md#anchor)
|
||||
Reference in New Issue
Block a user