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

Generated paths during the output generation don't point to the right files #608

Open
john0isaac opened this issue Feb 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@john0isaac
Copy link
Contributor

john0isaac commented Feb 19, 2024

Generated paths during the output generation don't point to the right files.

For example the blog folder.

The static folder is in the parent directory, to fix this while creating any new folder all the paths inside it should start with ../ or be absolute path.

@john0isaac john0isaac added the bug Something isn't working label Feb 19, 2024
@kjaymiller
Copy link
Collaborator

Can you provide an example of the fix that you're suggesting.

If I understand correctly the issue is that the static path isn't pointing to an absolute path so you wind up with urls not always pointing to the correct path.

This is an issue that I've noticed a few times when dealing with GH Pages where your url may not be the root path. I think the best solution is one similar to other frameworks where there is a {{"<PATH/AFTER/STATIC>" | static }} or similar pattern be added to create an absolute URL for the path.

My main concern with this is do you use that in content for blog posts or do something different.

To my knowledge you cannot pass jinja variables into your content (perhaps this is a reason to change that).

@john0isaac
Copy link
Contributor Author

We agreed on using absolute paths for the whole website during generation we substitute with the SITE_URL var instead of relative or current implementation to account for cases when you just want to double click on the page to open it instead of using a server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants