-
Notifications
You must be signed in to change notification settings - Fork 1k
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
get_url: always add trailing slash unless path has extension? #2026
Comments
|
@Keats It's removing it automatically in this case. |
even with |
No, then it works as expected. It's just that I thought it would be a nice improvement to not strip it automatically for something that is obviously not an asset file. Alternatively, maybe we can update the documentation to state that anything passed into get_url (that is not an internal link starting with '@/') while the 'trailing_slash' argument is omitted will have no trailing slash. |
We can update the documentation to remove the asset word from
|
Small update to the doc linked to the discussion on getzola#2026.
Small update to the doc linked to the discussion on #2026.
Small update to the doc linked to the discussion on #2026.
I just migrated my blog from Jekyll to Zola and after it's been great once I got the hang of it! Thank you for your great work on it.
One thing I ran into and that the docs were a tiny bit ambiguous about was the proper way to generate permalinks using the
get_url
Tera function.The documentation for get_url states:
This + #85 gave me the impression that
get_url('/about/)
would returnhttps://mysite.com/about/
but it was stripping the trailing slash because I wasn't using the internal linking (@/
) feature.Would it make sense to always append a trailing slash for anything that looks like a URL / directory? Eg anything that does not have a file extension?
The text was updated successfully, but these errors were encountered: