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

Some relative links are not converted #93

Closed
JJ opened this issue Feb 14, 2024 · 6 comments
Closed

Some relative links are not converted #93

JJ opened this issue Feb 14, 2024 · 6 comments

Comments

@JJ
Copy link

JJ commented Feb 14, 2024

Describe the bug

In this code

Posiblemente necesites [configurar tu
infraestructura](infraestructura/1.ConcienciaSituacional.md) antes de pasar al
nivel siguiente; cuando lo hagas, comienza con [él](2.Modelo.md).

that's translated to this web page (last paragraph, scroll down). The second URL is converted to its suffix-less equivalent... The first one is not.

Steps to reproduce the behavior

I guess that paragraph by itself should fail. This paragraph:

 Se puede consultar [el
  documento de infraestructura](infraestructura/0.PRs.md), que muestra el punto

Fails to convert too. Maybe it's the fact that the reference to the URL is split in two lines?

Expected behavior

It's a relative URL alright. It should be converted.

Additional context

Here's the repo https://github.com/JJ/MPDA-IS It's using the GitHub pages, so that might translate to specific versions or processors.

JJ added a commit to JJ/docs that referenced this issue Feb 14, 2024
Well, I've spent the best part of the morning trying to find out why [this](https://github.com/orgs/community/discussions/108272) happened; I [got to raise this issue](benbalter/jekyll-relative-links#93) but at any rate it's easier to fix the documentation than fixing the issue. The issue should be right around this line https://github.com/benbalter/jekyll-relative-links/blob/9f05f8524cd974fc151d0d960ae3ad2e4935d3c6/lib/jekyll-relative-links/generator.rb#L52, and I might try to fix it some time in the future, but meanwhile I (or someone else) gets around to do it, gets fixed, and deployed downstream to GitHub pages (which is where I use), this little fix can help lost souls like myself save a bit of time, right? Lots of love to you and all the world in this Valentine day!
@flanakin
Copy link

I noticed this when I started using collections. Are you using collections by any chance?

@monarchwadia
Copy link

monarchwadia commented Feb 18, 2024

Thanks @flanakin , your comment set me going in the right direction.

I was personally using collections. I had put all of my posts in _posts (i'm new to Jekyll, so I'm not sure whether this is "normal" or if i overengineered things. oh well :-))

The plugin started working in my posts after I set collections: true in my _config.yml

relative_links:
  enabled:     true
  collections: true

@flanakin
Copy link

I just discovered that setting... I'm trying it now...

@JJ
Copy link
Author

JJ commented Feb 19, 2024

I'll try that, but what relationship is there between collections and these kind of links?

@janbrasna
Copy link

Duplicate of #61

(known issue)

@JJ
Copy link
Author

JJ commented Feb 25, 2024

Closing in favor of #61

@JJ JJ closed this as completed Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants