Skip to content

Local_to_Remote_Link_Resolution

Matthew Stratton edited this page Mar 9, 2019 · 1 revision

Automatic local to remote link resolution

Since: 0.1.5, core (flexmark) feature

[link](./foo.md) => <a href="https://www.jive.com/DOC-1234">link</a>

Any remote that uses alexandria-flexmark for conversion will automatically resolve any github style local repository links to the documents remote URI. Only documents that are indexed by Alexandria will be considered. If the document has been indexed but has no remote URI, the link will be left alone. Alexandria accounts for this automatically by doing a two pass sync which allows new documents to be created on the first pass, and relative links to resolve properly on the second.

Limitations

Currently, the pattern matching for the link resolver is pretty simple, it will only match basic Github style links, e.g. [some doc](./foo.md). Links with anchors are not supported, nor reference-style links

Technically Valid Github Markdown Alexandria Supported
[I'm a reference-style link][Arbitrary case-insensitive reference text]
...
[arbitrary case-insensitive reference text]: ./foo.md
No
[You can use numbers for reference-style link definitions][1]
...
[1]: ./foo.md
No
Or leave it empty and use the [link text itself].
...
[link text itself]: ./foo.md
No
What about [anchor links](./foo.md#Some-Section).
No

Supported links may be added in the future, see issue #54.

Clone this wiki locally