From 7f95ff8ba9bdd48b3b83becadc76e40910872eae Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 19 Jan 2017 21:40:01 +0000 Subject: [PATCH] title case titles --- plugins/filters.py | 8 ++++++-- theme/templates/categories/robotics.md | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/filters.py b/plugins/filters.py index a01acad..450a135 100644 --- a/plugins/filters.py +++ b/plugins/filters.py @@ -26,11 +26,15 @@ def limit(line, length): def get_title(instance): - return get_attribute(instance, 'title') or (hasattr(instance, 'page') and get_attribute(instance.page, 'name')) or get_attribute(instance, 'name') or '' + return ( + get_attribute(instance, 'title') or (hasattr(instance, 'page') and get_attribute(instance.page, 'name')) or get_attribute(instance, 'name') or '' + ).title() def get_html_title(instance): - return get_attribute(instance, 'html_title') or get_title(instance) + return ( + get_attribute(instance, 'html_title') or get_title(instance) + ).title() def get_image(instance): diff --git a/theme/templates/categories/robotics.md b/theme/templates/categories/robotics.md index b3b0a1b..b0b7080 100644 --- a/theme/templates/categories/robotics.md +++ b/theme/templates/categories/robotics.md @@ -10,7 +10,7 @@ Student Robotics is the the place where my development knowledge really started More information can be found on [their website](https://studentrobotics.org). ## My Entries -Being at college for 2 years, meant I was able to enter 2 years of competitions, SR14, and SR15. We were encouraged to gain an online presence for our team, so I created a website for both years. Unfortunately due to account inactivity, and me changing my website 3 times since, The original pages have been lost, however a large amount of the content the content still remains. +Being at college for 2 years, meant I was able to enter 2 years of competitions, [SR14](2014), and [SR15](2015). We were encouraged to gain an online presence for our team, so I created a website for both years. Unfortunately due to account inactivity, and me changing my website 3 times since, The original pages have been lost, however a large amount of the content the content still remains.