-
Notifications
You must be signed in to change notification settings - Fork 179
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
How to configure URLs of articles with underscore #376
Comments
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. |
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: middleman-blog/lib/middleman-blog/uri_templates.rb Lines 80 to 81 in 9bb7fc7
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. |
This issue is stale because it has been open for more than 90 days with no activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
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
The text was updated successfully, but these errors were encountered: