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
Zola creates a link that goes nowhere (linkchecker doesn't complain) #603
Comments
That looks like it's done by the markdown parser itself, very weird. This might be linked to #561 for some reason? To use relative links in Zola, use the |
Hmm, apparently what we're doing is working fine on our staging and production environment, only a local Even when I do |
Just to be clear, the link checker only checks external links (http) and internal when they start by |
The links are not even touched by Zola actually. If you look at the generated HTML, they are still |
Interesting, why is that? Is there a way to raise an error when a link isn't getting checked by zola? I'd like to prevent dead links in all cases. |
Mostly because I didn't think of relative links and that it makes more sense imo to refer to the markdown files for links between content and that makes it clear it isn't an actual markdown feature. |
Indeed that seems to work - it feels wrong though, since the path doesn't start at the current directory ( |
Just tried to replicate this bug. I observed that the link previous/next post links are incorrect when navigated to directly. When navigated to from the root the links in both posts are rendered correctly. When when navigating from one post to to another the link is incorrect. I suspect zola serve is failing to pass on the correct context somewhere. I'm not at all familiar with the zola code base but this is a good excuse to become more familiar. I'll have a go tracing and fixing this issue. |
The problem is essentially that I think it is reasonable to expect this redirection behavior in zola serve as it lines up with common production environments. I will therefore prepare a PR implementing this redirection. |
@pcwizz is it coming along? actix-web got a 1.0 release that changed the usage a lot as well :/ |
That seems fixed with the latest Zola that is using hyper, at least the repro repo works fine now. |
Bug Report
Environment
Zola version: 0.5.1
Expected Behavior
Both links should link to the respective blog post, or both of them should be detected as invalid by the linkchecker.
Current Behavior
One of the links works fine, the other one links to a page that doesn't exist.
Step to reproduce
zola serve
: https://github.com/jonas-schievink/zolareprohttp://127.0.0.1:1111
- You'll see 2 posts, "Post 1" and "Post 2"http://127.0.0.1:1111/post/002-second
, which works fine.http://127.0.0.1:1111/001-first
.The markdown in "Post 1" is
[The next part](../002-second)
.The markdown in "Post 2" is
[previous post](../001-first)
.Both should be correct, but zola seems to render only one of them wrongly?
The text was updated successfully, but these errors were encountered: