Open brycelelbach opened 4 years ago
This seems to suggest the issue is that include_relative
is processed after jekyll-relative-links
. I believe that jekyll-relative-links
uses a generator; Liquid stuff like include_relative
is processed in the stage after generation (the render stage).
I was able to work around this with a post_render
hook:
Jekyll::Hooks.register :pages, :post_render do |doc|
doc.output = doc.output.gsub(/(href="\.\/[^.]*)\.md"/, '\1.html"')
end
Maybe something similar and less hacky could be added to jekyll-relative-links
? I'm afraid I don't know enough about Jekyll or Ruby to figure out how to make this less hacky.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any update?
Describe the bug
If I have one page,
a.md
that has some relative links in it:And I use
include_relative
to include the content ofb.md
in another page:In the generated
a.html
, the links will correctly point tox.html
. But onb.html
, the links will point tob.md
.