mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
Allow for omitting date on post
Previously, all posts had to show a date. If the `date:` attribute was removed from the md file, then something like "0000 Jan 01" would default. This is use for static pages that are not part of the blog structure, like a separate "about" or "contact" page.
This commit is contained in:
parent
228d950e3d
commit
af8b36055b
|
@ -10,8 +10,7 @@
|
|||
<div class="post">
|
||||
<header class="post__header">
|
||||
<h1 id="post__title">{{.Title}}</h1>
|
||||
<time datetime="{{ .Date }}" class="post__date"
|
||||
>{{ .Date.Format $dateFormat }}</time>
|
||||
{{ if .Date }}<time datetime="{{ .Date }}" class="post__date">{{ .Date.Format $dateFormat }}</time> {{ end }}
|
||||
</header>
|
||||
<article class="post__content">
|
||||
{{ partial "anchored-headings.html" .Content }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user