dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.65k stars 252 forks source link

Option to export Markdown notes with backlinks #2093

Open sagarbehere opened 2 years ago

sagarbehere commented 2 years ago

Please select if your request is either something new or an enhancement

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Is your feature request related to a problem? Please describe

Dendron already supports exporting notes as a set of Markdown files. These exported Markdown files can then be published with a variety of other software solutions, should that be desired (e.g. MkDocks, Hugo, other static site generators, ...). However, the exported Markdown files do not contain any explicit backlink information. Therefore, the publishing solution would need to do a non-trivial amount of work to compute backlinks from scratch and include them while publishing e.g. at the end of the published note or as a sidebar widget next to the published page. But why recompute those backlinks when Dendron already has all the backlinks information and could easily export it? Therefore, this is a feature request to have an option to include backlinks in the exported Markdown files.

Describe the solution you'd like

Solution 1: Each exported Markdown note has a 'Backlinks' section appended at its end, containing a list of backlinks to that note in standard markdown links format [Link Text](link-to-markdown-note).

Alternative solution 2: Each exported note is accompanied by a separate file e.g. notename-backlinks.md that contains the backlinks for that note.

Describe alternatives you've considered

  1. Hack the publishing software of choice to compute backlinks. This is not trivial. There isn't any popular publishing software that I know of that includes support for computing backlinks out-of-the-box. Cooked up solutions like this one have many edge cases where they do not work.
  2. Use other external Python scripts to compute backlinks and append them to the end of each exported markdown note, before sending the notes to the publishing software. An example of such a script is Andy Matuschak's note-link-janitor
kevinslin commented 2 years ago

Thanks for the request. We're adding it to our backlog

ScriptAutomate commented 2 years ago

Related, and potentially duplicate, as this other issue is wanting to achieve the same goals: https://github.com/dendronhq/dendron/issues/695

danielbraun89 commented 2 years ago

Would also like a proper mkdocs export, any progress with this?