-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More control over titles #15
Labels
Comments
Ok, found a simple way to do it right now. Here's the code for the above example: <title><% if @path == 'index' %>MySiteTitle<% else %> MySiteTitle - <%= title %><% end %></title> |
Ok, above solution isn't going to serve proper titles for pages. Here's a better one: <% if @path == 'index' %> MySite <% elsif @path.split('/').compact.length == 4 %> MySite - <%= title %> <% else %> MySite - <%= @path.capitalize.gsub(/[-]/, ' ') %> <% end %> The second condition checks if the page is an article. A bit of a hack but works. |
FWIW, here's the solution I came up with. |
ok, it's late. That didn't work at all. This is better. |
I want to put my vote in for making this easier, as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can we have an option to attach the site title to all the page titles. So default title would be "MySite" and then when you go to an article page it would be something like "MySite - Some Article Title". Is this possible now?
The text was updated successfully, but these errors were encountered: