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

Improve multisite Glide support #2379

Closed
wants to merge 3 commits into from
Closed

Conversation

jasonvarga
Copy link
Member

This PR aims to solve a long running problem where Glide URLs in a subdirectory based site would have the subdirectory in it, causing 404s.

e.g. You have / and /fr set up as sites.

Generate an image on /, you get something like /img/image.jpg, which works.
Generate one on /fr, you get something like /fr/img/image.jpg, which 404s because there's no Glide route at /fr/img.

A solution was to use symlinks, which always felt quite hacky, and only really worked when using the cached setup. As pointed out in this comment, adding a symlink would break the root url anyway.

This PR now makes the Glide routes available for every subdirectory-based site.

When using cached mode, the URLs will always be from the top level.

Unrelated to multisite, it also removes the Glide routes entirely if the cached option is being used, since the images get generated on demand in your template and the actual images get served.

Closes #1953
Closes #1304

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.

Multi-site locale in asset path => file not found
1 participant