diff --git a/_config.yml b/_config.yml index cba1fe8e67..d8c2bb59bd 100644 --- a/_config.yml +++ b/_config.yml @@ -1,7 +1,7 @@ markdown: kramdown title: "Scala Documentation" -description: "Documentation for the Scala programming language- Tutorials, Overviews, Cheatsheets, and more." +description: "Documentation for the Scala programming language - Tutorials, Overviews, Cheatsheets, and more." keywords: - Scala - Documentation diff --git a/_includes/header.txt b/_includes/header.txt index ed3a8c15aa..38739eb338 100644 --- a/_includes/header.txt +++ b/_includes/header.txt @@ -2,7 +2,7 @@ - {% if page.partof %}{{ page.partof | replace: '-',' ' | split:" " | capitalize | join:" " }} - {% endif %}{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} + {% if page.partof %}{{ page.partof | replace: '-',' ' | capitalize_all }} - {% endif %}{% if page.title %}{{ page.title }} - {% endif %}{{ site.title }} {% if page.description %} {% endif %} diff --git a/_plugins/capitalize_all.rb b/_plugins/capitalize_all.rb new file mode 100644 index 0000000000..87850aa996 --- /dev/null +++ b/_plugins/capitalize_all.rb @@ -0,0 +1,11 @@ +require 'liquid' +require 'uri' + +# Capitalize all words of the input +module CapitalizeAll + def capitalize_all(words) + return words.split(' ').map(&:capitalize).join(' ') + end +end + +Liquid::Template.register_filter(CapitalizeAll)