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

Remove double slashes from media_folder/public_folder #3204

Closed
erquhart opened this issue Feb 5, 2020 · 0 comments · Fixed by #3208
Closed

Remove double slashes from media_folder/public_folder #3204

erquhart opened this issue Feb 5, 2020 · 0 comments · Fixed by #3208

Comments

@erquhart
Copy link
Contributor

erquhart commented Feb 5, 2020

Is your feature request related to a problem? Please describe.

There's bound to be confusion and mistakes around our cascading media_folder/public_folder string replacements. If your global value ends with a slash, and then you add a slash after including that value as a string replacement, you get an unexpected double slash:

media_folder: /static/img/

collections:
  - name: blog
    media_folder: "{{media_folder}}/blog"

Describe the solution you'd like

This potential mistake is simple to anticipate and account for, so we should. When constructing the final value of either property, double slashes (//) should be replaced with a single slash. Because media_folder/public_folder are not used for complete urls, they won't be affected.

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.

2 participants