You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading my website from 2.5 to 3.0, :title in permalinks will be converted to lower case. All my website page links change slightly, for instance, from /2015/10/27/NewPost/ to /2015/10/27/newpost/. It's a minor change, but all the links I used in other websites are broken totally.
As all permalink style are using the lower case :title, there is no backwards compability or any flexibility. Can we have another permalink style to use the original title from file name?
The text was updated successfully, but these errors were encountered:
It only affects posts, documents and pages are okay. I went through the code base roughly, it maybe not an easy fix. The code is using Utils.slugify to generate post file's metadata permalink or title in pre-process phase
string.
# Strip according to the mode
gsub(re, '-').
# Remove leading/trailing hyphen
gsub(/^\-|\-$/i, '').
# Downcase
downcase
When we finally generate the permalink per Permalink Style configuration
def add_permalink_suffix(template, permalink_style)
case permalink_style
when :pretty
template << "/"
when :date, :ordinal, :none
template << ":output_ext"
else
template << "/" if permalink_style.to_s.end_with?("/")
template << ":output_ext" if permalink_style.to_s.end_with?(":output_ext")
end
template
end
The permalink is already finalized. We can't easily pass any optional parameter to determine whether to lowercase the title.
BTW, there is a workaround for this issue: add permalink "/2015/10/31/UpperCase.html" in post's yaml front matter. But I have to update all my posts.
It's Okay with me that there's some breaking change in 3.0, if you think lowercase title is a must in 3.x, maybe provide users a migration tool to help workaround these breaking changes.
After upgrading my website from 2.5 to 3.0,
:title
in permalinks will be converted to lower case. All my website page links change slightly, for instance, from/2015/10/27/NewPost/
to/2015/10/27/newpost/
. It's a minor change, but all the links I used in other websites are broken totally.As all permalink style are using the lower case
:title
, there is no backwards compability or any flexibility. Can we have another permalink style to use the originaltitle
from file name?The text was updated successfully, but these errors were encountered: