Skip to content

Commit

Permalink
Backport #6791 from master to 3.7-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
olivia committed Feb 25, 2018
1 parent 053acd3 commit 31130f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/jekyll.rb
Expand Up @@ -35,7 +35,6 @@ def require_all(path)
require "i18n"

SafeYAML::OPTIONS[:suppress_warnings] = true
I18n.config.available_locales = :en

module Jekyll
# internal requires
Expand Down
5 changes: 4 additions & 1 deletion lib/jekyll/utils.rb
Expand Up @@ -203,7 +203,10 @@ def slugify(string, mode: nil, cased: false)
end

# Drop accent marks from latin characters. Everything else turns to ?
string = ::I18n.transliterate(string) if mode == "latin"
if mode == "latin"
I18n.config.available_locales = :en if I18n.config.available_locales.empty?
string = I18n.transliterate(string)
end

slug = replace_character_sequence_with_hyphen(string, :mode => mode)

Expand Down

0 comments on commit 31130f7

Please sign in to comment.