I have links in files that point to headers within the same file (i.e. table of contents). I am creating a table of content having a link to each section using back to top. But it is not working properly. this issue mainly affects Heading to as Everything Heading 2 link is not working. though there is somewhat issue with heading 3
Here is the the https://github.com/M-Talha4/Sample/blob/main/README.md as you can see the using[[]] are not the best solution as they are not portable.
Things I have tried
Using [[#name]] works but that is only for obsidian and won’t work outside.
When i share file this link becomes [[#Name]] as a simple text.
they Both are working. The issue is that it only works in obsidian. i want to make it portable md. like if i open a random md editor these links should work on them too.
What is the problem you’re seeing? All of the Markdown links in your GitHub example work for me.
Fragment links to headings probably won’t work in all Markdown editors. Some probably don’t support them. The ones that do, convert headings to URLs in different ways. You could use HTML to manually add IDs to link to, but probably not all editors will support them (if I remember right, Obsidian doesn’t).
But some editors provide a heading navigation feature like Obsidian’s Outline.