From 91d46da8d803fb588292eaf2374d8edac18dd85d Mon Sep 17 00:00:00 2001 From: David Lehman Date: Thu, 10 Jul 2014 17:34:33 -0500 Subject: [PATCH 3/6] Show "News" as the subheader when reading blog articles. Otherwise you get the article title both in the subheader and at the start of the article in the content/body, which is silly and confusing. --- source/contributing.html.haml | 15 --------------- source/layouts/_subheader.haml | 7 ++++++- 2 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 source/contributing.html.haml diff --git a/source/contributing.html.haml b/source/contributing.html.haml deleted file mode 100644 index f847201..0000000 --- a/source/contributing.html.haml +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Contributing ---- - -- content_for :head do - %link(href="/blog/feed.xml" rel="alternate" title="Atom feed" type="application/atom+xml") - -- if defined? page_number && page_number < 2 - - -# First-page only stuff here - -# (If a blog is included below, then it may paginate) - -.title Contributing to blivet - -Some stuff can go here. diff --git a/source/layouts/_subheader.haml b/source/layouts/_subheader.haml index f0b3621..2d6a7ec 100644 --- a/source/layouts/_subheader.haml +++ b/source/layouts/_subheader.haml @@ -1,5 +1,10 @@ %header#subhead %section - if current_page.data.title + -# Show "News" in the subheader for blog posts instead of showing the + -# article title twice. %h2#page-title - = current_page.data.title + - if current_article + = current_page.parent.data.title + - else + = current_page.data.title -- 1.9.3