Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative links not working in includes #54

Open
soundasleep opened this issue May 2, 2019 · 22 comments
Open

Relative links not working in includes #54

soundasleep opened this issue May 2, 2019 · 22 comments

Comments

@soundasleep
Copy link

soundasleep commented May 2, 2019

Description

Create a brand new Jekyll site with the following content:

  • index.md
Hello, world!
[Target](target.md)
or {% include include.md %}
  • target.md
(anything)
  • _includes/include.md
Also try go to the [Target](target.md)

Enable jekyll-relative-links, and build the site.

Expected behavior

Both links to target.md are rendered as <a href="target.html">.

Actual behaviour

Only the link to target.md in the root markdown is rendered as <a href="target.html">.

The link included through the include is rendered as <a href="target.md">, breaking navigation.

Workarounds

None known. Changing the include to relative e.g. [Target](../target.md) doesn't work either.

@stale
Copy link

stale bot commented Jul 1, 2019

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.

@stale stale bot added the wontfix label Jul 1, 2019
@soundasleep
Copy link
Author

Still an issue

@stale
Copy link

stale bot commented Aug 31, 2019

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.

@stale stale bot added the wontfix label Aug 31, 2019
@dmalan
Copy link

dmalan commented Sep 1, 2019

Just wanted to chime in as well to keep this one alive!

@stale stale bot removed the wontfix label Sep 1, 2019
@dmalan
Copy link

dmalan commented Sep 16, 2019

@benbalter, do you have a high-level sense of how this could be implemented, given Jekyll's architecture? We ran into a similar issue with a pre_render hook for :pages, since the pages' content property only contains pages' Markdown, not included files'. Is there perhaps a way to hook into included files as well?

@dmalan
Copy link

dmalan commented Sep 18, 2019

Just a quick follow-up thought! For a related feature, we've currently resorted to monkey-patching parse_link in Kramdown::Parser::GFM, which then lets us hook into all Markdown files (both pages and includes), but if there's cleaner, Jekyll-based approach, love to do something more robust. Many thanks!

@jricher
Copy link

jricher commented Oct 15, 2019

We're also seeing this as an issue.

@stale
Copy link

stale bot commented Dec 14, 2019

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.

@stale stale bot added the wontfix label Dec 14, 2019
@dmalan
Copy link

dmalan commented Dec 14, 2019

Just keeping alive!

@stale stale bot removed the wontfix label Dec 14, 2019
@stale
Copy link

stale bot commented Feb 12, 2020

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.

@stale stale bot added the wontfix label Feb 12, 2020
@nyakase
Copy link

nyakase commented Feb 18, 2020

no.

@stale stale bot removed the wontfix label Feb 18, 2020
@robmoffat
Copy link

robmoffat commented Mar 8, 2020

Just came to raise an issue and found that this one already exists, perfectly encapsulating my problem on https://riskfirst.org

Would love to know any fix or workaround, other than moving all the content into the root directory, which at the moment seems like the only thing that might work.

thanks,
Rob

@thaJeztah
Copy link

thaJeztah commented Apr 10, 2020

@dmalan I'm not very familiar with the Jekyll internals; is this something to be fixed in this plugin, or does it require changes in Jekyll and/or Kramdown ?

edit: not very familiar 😓

@stale
Copy link

stale bot commented Jun 9, 2020

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.

@stale stale bot added the wontfix label Jun 9, 2020
@thaJeztah
Copy link

not sure if a wontfix label should be added 😅

@stale stale bot removed the wontfix label Jun 9, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

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.

@stale stale bot added the wontfix label Aug 8, 2020
@thaJeztah
Copy link

still relevant I think

@stale stale bot removed the wontfix label Aug 8, 2020
@dmalan
Copy link

dmalan commented Aug 8, 2020

@dmalan I'm not very familiar with the Jekyll internals; is this something to be fixed in this plugin, or does it require changes in Jekyll and/or Kramdown ?

Sorry for missing this, @thaJeztah! Afraid I don't know Jekyll's internals well enough either to know if it can be fixed within the plugin itself!

@stale
Copy link

stale bot commented Oct 11, 2020

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.

@stale stale bot added the wontfix label Oct 11, 2020
@thaJeztah
Copy link

.

@stale stale bot removed the wontfix label Oct 12, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

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.

@stale stale bot added the wontfix label Dec 25, 2020
@thaJeztah
Copy link

still an issue

@stale stale bot removed the wontfix label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@jricher @benbalter @robmoffat @dmalan @thaJeztah @soundasleep @nyakase and others