Open molotoff opened 4 years ago
Found some code in the blog extension that might explain this: https://github.com/middleman/middleman-blog/blob/master/lib/middleman-blog/uri_templates.rb#L76
Yeah, I saw those part of code. But is fork of repository is a single way to fix those problem?
No, if we find a fix we can update this repository. The biggest issue is that this "bug" has been around for years so changing it now might change other users URLs. So we'd have to fix this by adding a new option to opt in the new (aka fixed) behavior.
@tdreyno Do you know how can I access the blog options in that point of the code? I just made a quick look, but I can't find any way to access the blog instance here:
I'd like to introduce a new option to allow to opt in this behavior, as you pointed out in the comment above ☝️
@markets looks like a static helper function. probably best to see if there's access to the blog instance/config from wherever its being called. Can add params/options to that helper to be more configurable.
Yeah, that's what I thought too.. Ok! I'll take a look taking into account this approach.
Expected behaviour
Get the articles in build with initially names with underscore
Actual behaviour
Now all urls are replacing with dashes
Steps to reproduce the problem
name_of_article.html.markdown
name-of-article.html