-
Notifications
You must be signed in to change notification settings - Fork 996
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 returns unprocessed path name #1098
Comments
For context: that's because the get_url by default just does a concatenation. It can also resolves internal links but only for .md files. I've tagged it as bug/enhancement as it is not really a bug, more like a missing feature that people assume should be there. |
What's |
I understand, but I don't agree that it makes much sense. It's not obvious that
{% for asset in page.assets %}
{% if asset is matching("[.](jpg|png)$") %}
{% set_global image_asset = asset %}
{% elif asset is matching("nutrition.csv") %}
{# load tabular data #}
{% set_global nutrition = data.records[0] %}
{% endif %}
{% endfor %} |
It's an ongoing process to ensure they are consistent (see issue linked above your comment) as features are added. Hopefully we can get to something good! |
I'm having this issue but with markdown files. <li class="nav" {%- if current_path is starting_with("contact/") %} id="selected" {%- endif %}>
<a href="{{ get_url(path="./contact.md") | safe }}">contact</a>
</li> Turns into
Repros with
I read the docs for |
If you want to point to a .md in your content directory, you have to use |
That fixed it! Thank you so much. |
Everything should be working with 0.14. Open a new issue if it doesn't. |
Bug Report
First off, thanks for a great tool. I really appreciate all the time and effort that have been put into Zola.
I'm having issues where my directory names contain umlauts (åäö in Swedish). It's for a gallery listing and in order to have correct alphabetical sorting this is the best solution I have found. The umlauts are removed when building so it works well.
For every page in the gallery there is an associated image as well. This is resized and processed without issues, but the link to the original is broken.
Environment
Zola version: 0.11.0
Expected Behavior
get_url
should return a processed url to match the directory structure that is built by zola.Current Behavior
get_url
returns the path before the directory name has been transformed.Step to reproduce
Directory structure.
In the page template.
My workaround uses a relative url instead. I'm including it so anyone can tell me if it's unsound or something. Else it may help others. :)
The text was updated successfully, but these errors were encountered: