mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 23:09:47 +00:00
parent
2f8e809667
commit
7bb579950a
5 changed files with 10 additions and 4 deletions
6
exampleSite/content/en/blog/no-date.md
Normal file
6
exampleSite/content/en/blog/no-date.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Undated post"
|
||||||
|
tags: ["words"]
|
||||||
|
---
|
||||||
|
|
||||||
|
I was born yesterday, tomorrow.
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .Site.Params.home.showLatest | default true }}
|
{{ if .Site.Params.home.showLatest | default true }}
|
||||||
<h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2>
|
<h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2>
|
||||||
{{ range first 1 .Pages.ByPublishDate.Reverse }}
|
{{ range first 1 .Pages.ByPublishDate.Reverse }}
|
||||||
<div class="summary">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}
|
<div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
|
||||||
<h3 class="title is-3 strong-post-title">
|
<h3 class="title is-3 strong-post-title">
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .Permalink }}">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="post-data">
|
<div class="post-data">
|
||||||
{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} |
|
{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} |{{ end }}
|
||||||
{{ i18n "blog_readingTime" .ReadingTime }}
|
{{ i18n "blog_readingTime" .ReadingTime }}
|
||||||
</div>
|
</div>
|
||||||
{{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }}
|
{{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ range .Pages.ByPublishDate.Reverse }}
|
{{ range .Pages.ByPublishDate.Reverse }}
|
||||||
<li class="post-item">
|
<li class="post-item">
|
||||||
<span><a href="{{ .Permalink }}">{{ .Title }}</a></span> - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>
|
<span><a href="{{ .Permalink }}">{{ .Title }}</a></span>{{ if .Params.date }} - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{{ if .Site.Params.home.showLatest | default true }}
|
{{ if .Site.Params.home.showLatest | default true }}
|
||||||
<h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2>
|
<h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2>
|
||||||
{{ range first 1 .Pages.ByPublishDate.Reverse }}
|
{{ range first 1 .Pages.ByPublishDate.Reverse }}
|
||||||
<div class="summary">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}
|
<div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
|
||||||
<h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
<h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||||
<div class="markdown">
|
<div class="markdown">
|
||||||
{{ .Summary }}
|
{{ .Summary }}
|
||||||
|
|
Loading…
Reference in a new issue