Pr0dt0s / obsidian-html-server

Obsidian plugin to serve a vault as an html site.
GNU General Public License v3.0
75 stars 4 forks source link

Add support for header links #28

Open pollonium opened 2 months ago

pollonium commented 2 months ago

Hello, First of all thank you for this plugin, just found it and it covers most of my needs.

I ran into similar issues as in #10 with links not rendering full path. In my case though it's header links in the same page.

Example

  1. I have index.md as a starting page with header block ## Some Header which is referenced at index.md at some poit via Wiki link syntax as [[#Some Header]].
  2. I also have some-other-page.md with header block ## Some Header which is referenced at this some-other-page.md at some poit via Wiki link syntax as [[#Some Header]] and [[some-other-page#Some Header]].

There are 3 cases here:

  1. I click [[#Some Header]] link at some-other-page.md Expected I get scrolled to the header block at some-other-page.md Actual result I get redirected to top of index.md
  2. I click [[some-other-page#Some Header]] link at some-other-page.md Expected I get scrolled to the header block at index.md Actual result I get redirected to top of index.md
  3. I click [[#Some Header]] link at index.md Expected I get scrolled to the header block at index.md Actual result I get redirected to top of index.md

OS: Windows 11 Obsidian version: v1.6.5 Plugin version: 1.0.8