I’m modifying my docs/single.html layout (using Docsy theme) to include something like a byline. I would prefer the byline to go under the .Title, so I use this…
{{ define "main" }}
<h1>{{ .Title }}</h1>
<left><p><font color="#00437b"><b>Author:</b> {{ .Params.author }} | <b>Version:</b> {{ .Params.version }} |
<b>Created on:</b> {{ .Params.date | time.Format ":date_short" }} |
<b>Last Modified:</b> {{ .Params.lastmod | time.Format ":date_short" }} |
<b>ServiceNow PRJ#:</b> {{ .Params.servicenowprj }}</p></font></p></left>
{{ .Content }}
{{ end }}
But when I use that, the markdown formatting of a table in my content docs disappears (where it would have shown alternating grey lines in the table.
So instead of using {{ .Content }}, I’m having to use {{ .Render “content” }}. This gives me my table formatting, but now it lumps the .Title into the content, which means I have to put my byline either above the title or below the content.
How can I fix this where the .Title can come first, then the byline, then the content (without reprinting the title) while keeping my table format?