Better date handling
This commit is contained in:
parent
81630df612
commit
3af03da6d0
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: {{ replace .Name "-" " " }}
|
||||
draft: true
|
||||
date: {{ .Date }}
|
||||
publishdate: {{ .Date }}
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Hello, world
|
||||
draft: false
|
||||
date: 2023-03-24T15:35:00+02:00
|
||||
publishdate: 2023-03-24T15:35:00+02:00
|
||||
---
|
||||
|
||||
Hello. This is my first entry in the feels engine. I'm mostly
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Hugo, Blogging, Gemini and Gopher
|
||||
draft: false
|
||||
date: 2023-04-18T08:20:34+02:00
|
||||
publishdate: 2023-04-18T08:20:34+02:00
|
||||
---
|
||||
|
||||
Up until recently (yesterday, at time of writing), I was manging my
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Weechat, but with a sane config
|
||||
draft: false
|
||||
date: 2023-03-25T10:35:00+02:00
|
||||
publishdate: 2023-03-25T10:35:00+02:00
|
||||
---
|
||||
|
||||
I really like weechat. Out of all the common terminal IRC clients,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
title: Downloading Albums, from Youtube
|
||||
draft: false
|
||||
date: 2023-03-30T10:35:00+02:00
|
||||
publishdate: 2023-03-30T10:35:00+02:00
|
||||
---
|
||||
|
||||
So, for the geekier people out there, there's a really neat tool to
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<a href="{{ .URL }}">{{.Name}}</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
<header><h1 class="fancyboi">{{ .Title }}</h1></header>
|
||||
<header>{{ if .PublishDate }}<h5>{{ .PublishDate.Format "02 January 2006" | lower }}</h5>{{ end }}<h1 class="fancyboi">{{ .Title }}</h1></header>
|
||||
<main>
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# {{ .Site.Title }} - {{ .Title }}
|
||||
{{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}
|
||||
{{ end }}# {{ .Site.Title }} - {{ .Title }}
|
||||
|
||||
{{ replaceRE `\n\[([^\]]*)\]: *([^\n]*)` "\n=> $2 $1" .RawContent }}
|
||||
{{ range .Pages -}}
|
||||
=> {{ .RelPermalink }} {{ .Title }}
|
||||
=> {{ .RelPermalink }} {{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}: {{ end }}{{ .Title }}
|
||||
{{ end -}}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
!{{ .Site.Title }} - {{ .Title }}
|
||||
{{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}
|
||||
{{ end }}!{{ .Site.Title }} - {{ .Title }}
|
||||
|
||||
{{ .RawContent | replaceRE `\n#` "\n #" | replaceRE `\n\[([^\]]*)\]: *([^\n]*)` "\nh$1\tURL:$2" }}
|
||||
{{ range .Pages -}}
|
||||
1{{ .Title }} {{ .RelPermalink }}
|
||||
1{{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}: {{ end }}{{ .Title }} {{ .RelPermalink }}
|
||||
{{ end -}}
|
||||
.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<article>
|
||||
<h5>{{ .Date.Format "02 January 2006" | lower }}</h5>
|
||||
{{ if .PublishDate }}<h5>{{ .PublishDate.Format "02 January 2006" | lower }}</h5>{{ end }}
|
||||
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||
<p>{{ .Summary }}</p>
|
||||
<p>...</p>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# {{ .Site.Title }} - {{ .Title }}
|
||||
{{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}
|
||||
{{ end }}# {{ .Site.Title }} - {{ .Title }}
|
||||
|
||||
{{ replaceRE `\n\[([^\]]*)\]: *([^\n]*)` "\n=> $2 $1" .RawContent }}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
!{{ .Site.Title }} - {{ .Title }}
|
||||
{{ if .PublishDate }}{{ .PublishDate.Format "02 January 2006" | lower }}
|
||||
{{ end }}!{{ .Site.Title }} - {{ .Title }}
|
||||
|
||||
{{ .RawContent | replaceRE `\n#` "\n #" | replaceRE `\n\[([^\]]*)\]: *([^\n]*)` "\nh$1\tURL:$2" }}
|
||||
.
|
||||
|
|
Loading…
Reference in New Issue