Page reference with Markdown paths
under review
Joshua Chen
While we have Markdown linkification that resolves
[](path)
links, these are just turned into plain <a> tags. Gitbook allows the {% page-ref page="./path.md" %} syntax, which produces a nice standalone link, displaying the permalink and the target page title.We can probably expose a linkify API that takes a Markdown path and returns a page's metadata, containing permalink, title, etc., maybe even an OOTB standalone link component. Don't know how non-trivial it would be to implement such a feature, and it would probably require reaching deep into the current infrastructure.
H
Hannes Delbeke
regarding
[[file path]]
these are called wikilinks, and were invented by wiki sites
some markdown parsers support them, or have extensions to support them.
e.g.
- npm wikilinks markdown parser https://github.com/landakram/remark-wiki-link
- https://github.com/jsepia/markdown-it-wikilinks
- https://python-markdown.github.io/extensions/wikilinks/
there seem to be 2 approaches.
- on statically generating a site, replace wikilinks with markdown links first, before reading markdown files.
- on reading the markdown file, interpret the wikilinks with markdownparser
one important part of supporting wikilinks, they only contain the name of the markdown file they link too. (unless there's a duplicate name in another folder)
this github thread talks about adding wikilinks to github, and raises some problems such as how wikilinks are not standardised (obsidian vs github wiki) https://github.com/jgm/pandoc/issues/2923#issuecomment-907341380
Joshua Chen
Lukas Olson
This is a really important feature.
AG
This is vital
Joshua Chen
I've merged in the
[[other page]]
request. They both require us to be able to access Markdown pages' full metadata through a file path, including URL, title, etc. We will probably improve our Markdown infrastructure firstJoshua Chen
Merged in a post:
Quicker syntax for linking pages
Dave Lu
Double bracket syntax like
[[Other page]]
has been getting popular for various documentation/knowledge management tools lately:Decreasing the friction for linking to another page from 5 seconds => 1 seconds is useful, because it helps authors link pages more densely, which improves documentation discoverability
Joshua Chen
under review
Sébastien Lorber
I understand the concept of digital garden / zettelkasten / second brain / smart notes etc, but I'm not familiar with such tooling.
If you can open an RFC on the repo with a propre design proposal and explaining in depth how it's supposed to work, it would be helpful
Geoff Z2K
I would really like to upvote this as a feature. As an obsidian user, it is painful to give up wikilink style [[links]]. Furthermore, increasingly markdown apps are supporting wikilinks, so it seems like a no brainer to support in Docusaurus' core engine.
William Chen
In fact thankful to see this. Thanks for sharing here. Links are originate in nearly all web pages. Links allow users to click their way from page to page. To fully understand link goal, you need to understand URLs and file paths. This part gives you the information you need to achieve this. https://dissertationcapital.com/
Load More
→