Created
August 11, 2014 21:20
-
-
Save jagthedrummer/6fa9e7339a4bd337c144 to your computer and use it in GitHub Desktop.
Dorking with page titles in MiddleMan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helpers do | |
def default_title | |
title = current_page.data.title || @page_title | |
title | |
end | |
def page_title | |
title = default_title | |
if title.present? | |
title += " @ " | |
else | |
title = "" | |
end | |
title += "OctoLabs" | |
title | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title><%= page_title %></title> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment