mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-14 00:59:43 +00:00
7bb579950a
- Hide date part in posts if no date is given
28 lines
1 KiB
HTML
28 lines
1 KiB
HTML
{{ define "main" }}
|
|
<div class="container markdown top-pad">
|
|
{{ .Content }}
|
|
</div>
|
|
<div class="container">
|
|
{{ if .Site.Params.home.showLatest | default true }}
|
|
<h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2>
|
|
{{ range first 1 .Pages.ByPublishDate.Reverse }}
|
|
<div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
|
|
<h3 class="title is-3 strong-post-title">
|
|
<a href="{{ .Permalink }}">
|
|
{{ .Title }}
|
|
</a>
|
|
</h3>
|
|
<div class="markdown">
|
|
{{ .Summary }}
|
|
{{ if .Truncated }}
|
|
<a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
<h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2>
|
|
{{ partialCached "blog/li.html" . }}
|
|
</div>
|
|
{{ end }}
|