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

Inconsistent use of absolute_url vs. relative_url filter #1408

Open
vorth opened this issue Dec 21, 2024 · 0 comments
Open

Inconsistent use of absolute_url vs. relative_url filter #1408

vorth opened this issue Dec 21, 2024 · 0 comments

Comments

@vorth
Copy link

vorth commented Dec 21, 2024

I'm using a Docker container to test my site, either locally or with a GitHub Codespace. It works marvelously, for everything except one detail: many of the links are absolute URLs saying "http://0.0.0.0:4000/...". These are constructed as href attributes something like this:

href="{{ post.url | absolute_url }}"

These will never work in a container environment, since the container and server cannot possibly know how traffic is being directed to them, often through some generated domain name.

The relative_url filter seems to be the appropriate one in all cases, as far as I can tell. Your theme has about an even mix of both absolute_url and relative_url. Is there a reason they are not all relative_url?

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

1 participant