Closed wichert closed 12 years ago
duh, I followed up with the statement "URLs should not be editable", and made them uneditable, even by configurators.
they are editable now, but that's a necessary evil, the trade-off being that strip_extensions should work again.
I've pushed the fix (v4.1.8), but i'm gonna write a "site" test to make sure.
On May 7, 2012, at 3:50 PM, Wichert Akkerman wrote:
My config.yaml looks like this:
strip_extensions: ['.html'] strip_metadata_from_name: true strip_metadata_from_target_name: true root_url: /new/ configurators: - strange_case.extensions.configurators.created_at_from_name - strange_case.extensions.configurators.order_from_name - strange_case.extensions.configurators.file_ctime - strange_case.extensions.configurators.file_mtime - strange_case.extensions.configurators.strip_extensions
at the site root I have a template which does this:
{% for article in site.articles %} <h3><a href="{{ article.url }}">{{ article.title }}</a></h3> {% endfor %}
The URLs generated do get a .html extension.
Reply to this email directly or view it on GitHub: https://github.com/colinta/StrangeCase/issues/23
test added (test_strip_extensions_site.py
), test passes. let me know is your mileage varies.
That fixes URL stripping. But now the order and date are no longer stripped from the URL, but they are stripped from the generated filename.
I can't recreate this, I'll try it on your site. If you're able to recreate it in a test (see strange_case/tests/test_strip_extensions_and_meta_site.py
) that would be peachy.
I thought I bumped the version number, but I was remiss. v4.1.7 has been pushed and published to PyPi.
My config.yaml looks like this:
at the site root I have a template which does this:
The URLs generated do get a .html extension.