Skip to content

Conversation

@bengerman13
Copy link

jinja now lives on palletsproject.com, not pocoo.org.

One thing of note is that these links are coded for English, which is a little opinionated. On the other hand, this site is in English and Pallets doesn't seem to have other languages currently.

jinja now lives on palletsprojects.com, not pocoo.org
@dairiki
Copy link
Contributor

dairiki commented Jul 23, 2025

One thing of note is that these links are coded for English, which is a little opinionated.

Heuristically, it appears that https://jinja.palletsprojects.com/templates/ redirects to https://jinja.palletsprojects.com/en/stable/templates/, so the hard-coded en could be avoided.

Almost any other path will result in an infinite redirect hole, however, so this may not be the safest behavior to rely upon.

$ curl -Lv https://jinja.palletsprojects.com/xxx/ 2>&1 | grep location:
< location: https://jinja.palletsprojects.com/en/3.1.x/xxx/
< location: https://jinja.palletsprojects.com/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/3.1.x/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/stable/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/3.1.x/en/stable/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/stable/en/stable/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/3.1.x/en/stable/en/stable/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/stable/en/stable/en/stable/en/stable/xxx/
< location: https://jinja.palletsprojects.com/en/3.1.x/en/stable/en/stable/en/stable/en/stable/xxx/
[...]

On the other hand, this site is in English and Pallets doesn't seem to have other languages currently.

Given the above, I agree that the hard-coded en is not particularly an issue.

@dairiki
Copy link
Contributor

dairiki commented Jul 23, 2025

Further poking reveals that jinja.palletsprojects.com points directly to readthedocs.io.

Read the Docs supports auto-redirects for specific pages from /page/... to the default language and version of the hosted documentation.
Experimentally, https://jinja.palletsprojects.com/page/templates/ does, indeed, redirect to the right place.

Given that this is documented behavior, it doesn't seem unreasonable to use /page/templates/ in place of /en/stable/templates/.

$ dig +noall +answer jinja.palletsprojects.com
jinja.palletsprojects.com. 17	IN	CNAME	readthedocs.io.
readthedocs.io.		17	IN	A	104.16.254.120
readthedocs.io.		17	IN	A	104.16.253.120

$ curl -Lv https://jinja.palletsprojects.com/page/templates/ 2>&1 | grep location:
< location: https://jinja.palletsprojects.com/en/stable/templates/

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

Successfully merging this pull request may close these issues.

2 participants