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

using nested paths tag.path result in wrong content.root value #563

Closed
maxandersen opened this issue Nov 9, 2018 · 2 comments · Fixed by #569
Closed

using nested paths tag.path result in wrong content.root value #563

maxandersen opened this issue Nov 9, 2018 · 2 comments · Fixed by #569

Comments

@maxandersen
Copy link
Contributor

go to maxandersen/xam.dk@871e559
and comment back in tag.path in jbake.properties and see that pages in output/blog/tags have wrong relative paths.

if keep it as it then things are rendered correctly.

its as if rendering of tags don't have proper content.rootpath setup when it renders. (just a guess)

@manikmagar
Copy link
Member

I am able to reproduce this. Thanks for reporting this, @maxandersen! You are right, rootpath for tags is being set as ../ always and that won't work when nested folders such as blog/tags is provided. We should parse the tagPath before setting correct rootPath.

@maxandersen
Copy link
Contributor Author

Thanks @manikmagar for pointing me to where it does this - I've made a PR #569 to try fix this.

note, while doing so I found a few hidden bugs:

  1. current code will change path calculation based on noExtensionURI but does not check the noExtensionURI path.
  2. ../ is passed into other places in the code where it might be useful to use this method.

I didn't fix those to keep this fix focused - but it would be good to get that code cleaned up a bit more.

@jonbullock jonbullock added this to the v2.6.4 milestone Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants