diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-02-02 07:24:00 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-02-02 07:24:00 +0300 |
commit | 544ef61750d760501267258205e349ce08ca57cb (patch) | |
tree | c628582688f3df3be7e5fbe06e98421f2e6aa5e2 /layouts | |
parent | ee40b522d79d97ce22cdeaaa3e71c4cec7d96b7d (diff) |
Add title independent of markdown content
So the frontmatter data can be displayed right below the title
See https://gitlab.com/gitlab-com/gitlab-docs/issues/157#note_57237814
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/default.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/layouts/default.html b/layouts/default.html index 10ca2fdd..6387b09a 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -18,7 +18,11 @@ </ul> <% end %> <% end %> - <%= yield %> + <% if @item[:title] %> + <h1 class="article-title"> + <%= @item[:title] %> + </h1> + <% end %> <% if @item[:author] %> <div class="article-metadata"> Article written by <a href="https://gitlab.com/<%= @item[:author_gitlab] %>" target="_blank"><%= @item[:author] %></a> @@ -33,6 +37,9 @@ Level: <%= @item[:level] %> </div> <% end %> + <div class="article-content js-article-content"> + <%= yield %> + </div> <div class="edit-on"> <%= edit_on_gitlab(@item) %> </div> |