Add a page title to every page.
The page_title
helper pushes the provided string at the end of the title, but because of the order that layouts are rendered in by ActionView, the result is always this:
<title from view> |
<title from as specified in the controller or by its layout> |
<title from layouts/_head>
For example: Merge Requests | GitLab.org / Gitlab Community Edition | GitLab
.
All a developer needs to know is to put a page_title
call describing the page in question at the start of every template.
To get everything where I wanted it to go without too much duplication, I had to make some changes around layouts, sidebars and controllers.