related articles converted to hugo templating
This commit is contained in:
parent
cfc7d25449
commit
0c80aa9ee5
3 changed files with 39 additions and 62 deletions
28
layouts/partials/article_card.html
Normal file
28
layouts/partials/article_card.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<article class="card postlistitem {{ if .Site.Params.discreteCards }}discrete{{ end }}">
|
||||
<div>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</h2>
|
||||
<p class="date">
|
||||
<span title="Date"> </span>
|
||||
{{ .Date.Format "2006-01-02" }}
|
||||
{{ if .Params.tags }}
|
||||
| <!-- Pipe character as visual separator between date and tags-->
|
||||
<span title="Tags"> </span>
|
||||
{{ range .Params.tags }}
|
||||
<a href="/tags/{{ . }}">#{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ if .Site.Params.imageInArticlePreview }}
|
||||
{{ if .Params.Image }}
|
||||
<img src="{{ .Params.Image }}" />
|
||||
{{ end }}
|
||||
{{end}}
|
||||
<div class="articlePreview">
|
||||
<p>{{ .Summary }}</p>
|
||||
<p><a href="{{ .Permalink }}">Continue reading </a></p>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</article>
|
||||
Loading…
Add table
Add a link
Reference in a new issue