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
In 3.0.0, if a post (file) name contains underscores, they are converted to hyphens in the URL output by {{ post.url }}. This does not happen in 2.5.3. Is this an intentional change and can it be worked around? I have not been able to find anything in the documentation or existing issues.
When I send pr #4100 , I thought it was just a cased/uncased issue, now it turns out to be a bigger problem.
In 2.5.3, we use document and post separately to store post files and other pages. For document, the title is slugified however for post, the title is just what we extract from the filename.
:title => slug,
def process(name)
m, cats, date, slug, ext = *name.match(MATCHER)
self.date = Utils.parse_date(date, "Post '#{relative_path}' does not have a valid date in the filename.")
self.slug = slug
self.ext = ext
end
In 3.0.0, we merged document and post into one document.rb, which means, the title of each post is slugified: title: Utils.slugify(data['slug']) || Utils.slugify(basename_without_ext).
We can't simply remove the slugify as it will affect original documents. So a proper solution here is: keep the title slugified and add a new property like unslugified_title then users can customize their permalink as /:categories/:year/:month/:day/:unslugifed_title/. Users will have all backwards compatibility.
@envygeeks , are you okay with this suggestion? Or maybe you can propose a name better than unslugified_title ( I'm not a native English speaker, naming is always the hardest part 😢 )
IMO merge it with #title (:title) in your current pull, where title will keep the case, -, and _, whichever you use and guard against special chars and :slug will not. /cc @parkr @jekyll/core
@rogerjohansson This issue can be resolved once my pr is merged into master and Jekyll release 3.0.1 (I suppose). Before that, you can use a tiny plugin jekyll-post-unslugify I just wrote to workaround, then you can have your title back.
I find we have defined Pretty mode in Util.Slugify. This mode can keep characters like _, ~, etc, but currently we only use default mode across the entire code base.
@envygeeks Can we use pretty mode for :title? It would be like a hole in the default mode or raw mode if we only handle _ specially
This issue has been automatically marked as stale because it has not been commented on for at least
three months.
The resources of the Jekyll Core team are limited, and so we are asking for your help.
If you can still reproduce this error on the 3.0-stable branch or on master,
please reply with all of the information you have about it in order to keep the issue open.
Activity
rebornix commentedon Nov 15, 2015
When I send pr #4100 , I thought it was just a cased/uncased issue, now it turns out to be a bigger problem.
In 2.5.3, we use
document
andpost
separately to store post files and other pages. Fordocument
, thetitle
is slugified however forpost
, the title is just what we extract from the filename.In 3.0.0, we merged
document
andpost
into onedocument.rb
, which means, the title of each post is slugified:title: Utils.slugify(data['slug']) || Utils.slugify(basename_without_ext)
.We can't simply remove the slugify as it will affect original documents. So a proper solution here is: keep the
title
slugified and add a new property likeunslugified_title
then users can customize their permalink as/:categories/:year/:month/:day/:unslugifed_title/
. Users will have all backwards compatibility.@envygeeks , are you okay with this suggestion? Or maybe you can propose a name better than
unslugified_title
( I'm not a native English speaker, naming is always the hardest part 😢 )envygeeks commentedon Nov 15, 2015
IMO merge it with
#title
(:title
) in your current pull, where title will keep the case,-
, and_
, whichever you use and guard against special chars and:slug
will not. /cc @parkr @jekyll/corerebornix commentedon Nov 15, 2015
@envygeeks thanks! I'll update my pr later.
@rogerjohansson This issue can be resolved once my pr is merged into master and Jekyll release 3.0.1 (I suppose). Before that, you can use a tiny plugin jekyll-post-unslugify I just wrote to workaround, then you can have your title back.
rogerjohansson commentedon Nov 15, 2015
@rebornix Thanks! Your plugin seems to work as advertised :-).
rebornix commentedon Nov 16, 2015
I find we have defined Pretty mode in Util.Slugify. This mode can keep characters like
_
,~
, etc, but currently we only usedefault
mode across the entire code base.@envygeeks Can we use
pretty
mode for:title
? It would be like a hole in thedefault
mode orraw
mode if we only handle_
specially:title
and add:slug
for automatic downcasing in URLs #4100jekyllbot commentedon Feb 17, 2016
This issue has been automatically marked as stale because it has not been commented on for at least
three months.
The resources of the Jekyll Core team are limited, and so we are asking for your help.
If you can still reproduce this error on the
3.0-stable
branch or onmaster
,please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.