From d98a4de07ec8727b10c3f059c1fbee3e19d01761 Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Sun, 16 Oct 2011 11:57:29 +0200 Subject: [PATCH] Makes titlecase of page/post titles configurable --- .themes/classic/source/_includes/article.html | 4 ++-- .themes/classic/source/_layouts/page.html | 2 +- _config.yml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.themes/classic/source/_includes/article.html b/.themes/classic/source/_includes/article.html index 79e2652..9db0745 100644 --- a/.themes/classic/source/_includes/article.html +++ b/.themes/classic/source/_includes/article.html @@ -1,9 +1,9 @@ {% unless page.no_header %}
{% if index %} -

{{ post.title | titlecase }}

+

{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}

{% else %} -

{{ page.title | titlecase }}

+

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

{% endif %} {% unless page.meta == false %}

diff --git a/.themes/classic/source/_layouts/page.html b/.themes/classic/source/_layouts/page.html index 4edd3ed..8ba6ec9 100644 --- a/.themes/classic/source/_layouts/page.html +++ b/.themes/classic/source/_layouts/page.html @@ -6,7 +6,7 @@ layout: default

{% if page.title %}
-

{{ page.title | titlecase }}

+

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

{% if page.date %}

{% include post/date.html %}{{ time }}

{% endif %}
{% endif %} diff --git a/_config.yml b/_config.yml index 26881bc..f90307a 100644 --- a/_config.yml +++ b/_config.yml @@ -34,6 +34,8 @@ pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/ recent_posts: 5 # Posts in the sidebar Recent Posts section excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles +titlecase: true # Converts page and post titles to tilecase + # list each of the sidebar modules you want to include, in the order you want them to appear. # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html]