Closed jberger closed 6 years ago
The anchor is not always on the same page. If it's behind a fold (---
), it would be on the next page, so we would have to rewrite the link in that case.
Also, the anchor isn't required to be unique on the page. If its taken to the internal blog post page, that's easy to deal with: It's in one file and the author can be asked to deal with that (we could even detect the problem and notify them). If it's in the list of blog posts, though, that's harder to deal with: all the blog posts in the list need to be checked for anchor uniqueness, and it's a lot harder to detect since it might only happen in a certain tag list page.
These are both solvable problems:
id
or name
exists in the content that we're about to add to the list view and rewrite if it isn'tBut, right now, it's more cautious to just rewrite the link assuming it won't be displayed on the list view, even if the individual blog pages aren't intended to be shown.
Okay, sorry, this isn't about blog index, but about the site index. This should work then, thanks!
When anchor-only hrefs are modified to point to some other page this obviously breaks their intent to link to the current page.
Fixes #554