Display post author

This commit is contained in:
simon987
2019-05-14 22:26:17 -04:00
parent f16e743150
commit 0a43b0764b
6 changed files with 18 additions and 3 deletions

View File

@@ -32,6 +32,9 @@
{{ end }}
</p>
<h1>{{ if .Draft }}DRAFT: {{end}}{{ .Title }}</h1>
{{ if isset .Params "author" }}
<div class="post-author">by {{ .Params.author }}</divv>
{{ end }}
</div>
<div class="post-content">

View File

@@ -19,6 +19,9 @@
<a class="post-list" href="{{ .Permalink }}">{{ $page.Title }}</a>
<p class="footnote">
{{ with $page.Params.author }}
{{ . }},
{{ end }}
<time datetime="{{ $page.Date }}">
{{ if .Site.Params.dateformatpretty }}
{{ $page.Date.Format .Site.Params.dateformatpretty }}
@@ -42,7 +45,6 @@
{{ with $page.Params.series }}
series: [ {{ range $page.Params.series }}<a href="{{ $baseurl }}series/{{ . | urlize }}/">{{ . }}</a> {{ end }}]
{{ end }}
</p>
</li>
{{ end }}

View File

@@ -61,7 +61,6 @@ pre code {
}
.site-title {
text-transform: none;
font-weight: normal;
font-family: "Source Sans Pro", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@@ -235,7 +234,6 @@ pre code {
font-weight: bold;
font-size: 39px;
line-height: 40px;
margin-top: 8px;
margin-bottom: 0;
}
@@ -318,3 +316,12 @@ hr {
figure {
text-align: center;
}
.post-author {
display: block;
font-family: verdana, arial, helvetica, sans-serif;
color: #757575;
margin-top: -0.1em;
margin-left: 2em;
margin-bottom: 1em;
}