rewrite-relative-urls and internal anchors #253
Replies: 3 comments 6 replies
-
|
Could you paste a minimal reproducible example? Moving to an issue... |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This is fixed in v7.1.4 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hello @mondeja , I'm seeing a similar problem as well when setting a Given this structure: This site_name: My Docs
site_url: "https://example.com/org-name/repo-name/"
nav:
- A section:
An article: other.md
plugins:
- include-markdown:
rewrite_relative_urls: trueThis markdown include: {%
include-markdown "../../test.md"
%}And this markdown file: # Header
# First level heading
Example data
## Second level heading
Link to [second level heading](#second-level-heading).The URL generated is incorrect as shown below, causing 404s for local anchors I'm also seeing the following warnings in the build: I'm using version |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I've been using this plugin to place the same file in multiple places in the TOC.
I made duplicate files that are empty except for the relative include line to the original file. So like this:
{%
include-markdown "../../filename.md"
%}
However, internal anchors (#chapter) in the included document don't work.
More specifically:
If I set rewrite-relative-urls=true then external relative links work but internal anchors don't.
If I set rewrite-relative-urls=false then internal anchors work, but external relative links don't.
How do I make it that both anchors and external links work?
Beta Was this translation helpful? Give feedback.
All reactions