Adjust post meta format and move tags to post listing
- Remove showing of tags completely on gemini. I didn't find any good place to put it - List of tags are now shown in post listing with its display muted but known as links - Changelog is removed as I didn't find a good place to put it - Made the "EOF" optional through post params with self-documenting frontmatter adjusted in archetypes - Explicit date format in archetypes - Better formatting of post meta information in both WWW and gemini
This commit is contained in:
parent
9cdfd7749a
commit
7346846c71
|
@ -1,6 +1,6 @@
|
|||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
title = '{{ replace .Name '-' ' ' | title }}'
|
||||
date = {{ .Date.Format "2006-01-02" }}
|
||||
draft = true
|
||||
outputs = ['html', 'gemtext']
|
||||
slug = {{ .Name }}
|
||||
|
|
|
@ -5,10 +5,14 @@ description = {{ strings.FirstUpper $title }}
|
|||
highlight = false
|
||||
draft = true
|
||||
|
||||
date = {{ .Date }}
|
||||
date = {{ .Date.Format "2006-01-02T15:04:05Z" }}
|
||||
draft = true
|
||||
outputs = ['html', 'gemtext']
|
||||
# Filename after the date
|
||||
slug = {{ slicestr .Name 11 }}
|
||||
# The "EOF" after the hr at the end of a post.
|
||||
# Generally: disable if footnotes are used, enable otherwise to signify the end.
|
||||
EOF = true
|
||||
+++
|
||||
|
||||
|
||||
|
|
|
@ -154,19 +154,23 @@ nav .pfp-text {
|
|||
}
|
||||
|
||||
/* Differentiating between normal content links and meta content links */
|
||||
.meta a, .post-meta a, footer a, #after-content a {
|
||||
.meta a, .post-meta :not(.tags) a, footer a, #after-content a {
|
||||
text-decoration: none;
|
||||
@media (prefers-color-scheme: dark) {
|
||||
color: var(--link-alt);
|
||||
}
|
||||
}
|
||||
.meta a:hover, .post-meta a:hover, footer a:hover, #after-content a:hover {
|
||||
.meta a:hover, .post-meta :not(.tags) a:hover, footer a:hover, #after-content a:hover {
|
||||
color: var(--accent-light);
|
||||
text-decoration: underline;
|
||||
@media (prefers-color-scheme: dark) {
|
||||
opacity: .75;
|
||||
}
|
||||
}
|
||||
.post-meta .tags a, .post-meta .tags a:visited {
|
||||
text-decoration: underline;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
nav a {
|
||||
text-decoration: none;
|
||||
|
@ -546,7 +550,7 @@ a.anchor:hover {
|
|||
#post-header {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.post-meta, .meta, footer, #after-content, .post-description {
|
||||
.post-meta, .meta, footer, #after-content {
|
||||
font-size: .9rem;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ outputs = ['html', 'gemtext']
|
|||
slug = 'vim-column-editing'
|
||||
tags = ['howto']
|
||||
title = 'Vim visual block mode for column editing'
|
||||
EOF = false
|
||||
+++
|
||||
|
||||
The visual block mode in Vim lets you edit text simultaneously across adjacent
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
{{ $lastmod := .Page.Lastmod -}}
|
||||
{{- if lt .Page.Date $lastmod }}{{ with .Prefix }}{{ . }}{{ end }}Last updated on {{ $lastmod.Format "Jan 02, 2006" }}{{ with .Postfix }}{{ . }}{{ end }}{{ end -}}
|
|
@ -1,5 +1,4 @@
|
|||
{{ if lt .Date .Lastmod -}}
|
||||
|
|
||||
Last updated on
|
||||
<time itemprop="dateModified" class="dt-updated">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||
{{ if lt .Page.Date .Page.Lastmod -}}
|
||||
{{ .Prefix | safeHTML }}Last updated on
|
||||
<time itemprop="dateModified" class="dt-updated">{{ .Page.Lastmod.Format "Jan 2, 2006" }}</time>
|
||||
{{- end -}}
|
||||
|
|
|
@ -29,7 +29,10 @@
|
|||
{{ else -}}
|
||||
</h3>
|
||||
{{ end -}}
|
||||
<p class="post-meta"><time datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></p>
|
||||
<p class="post-meta">
|
||||
<time datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
||||
· {{ partial "tags.html" . }}
|
||||
</p>
|
||||
<p class="desc">{{ .Description }}</p>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{{- $taxonomy := "tags" }}
|
||||
{{- with .Param $taxonomy }}
|
||||
Tagged{{ range $index, $tag := . -}}{{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
|
||||
{{- if $index -}}, {{ end -}}{{ if (not $index) }}{{ printf " " }}{{ end }}{{ $tag | urlize }}{{ end }}{{ end }}{{- end }}
|
|
@ -1,7 +1,5 @@
|
|||
{{ $taxonomy := "tags" -}}
|
||||
{{ with .Param $taxonomy -}}
|
||||
|
|
||||
Tagged
|
||||
{{ with .Param $taxonomy -}}<span class="tags">
|
||||
{{ range $index, $tag := . -}}{{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
|
||||
{{- if $index -}}, {{ end -}}<a href="{{ .RelPermalink }}">{{ $tag | urlize }}</a>{{- end -}}{{- end }}
|
||||
{{- end -}}
|
||||
</span>{{- end -}}
|
||||
|
|
|
@ -1,28 +1,16 @@
|
|||
{{ define "content" -}}
|
||||
# {{ $.Title }}
|
||||
|
||||
Posted {{ .Date.Format "2006-01-02" }}
|
||||
{{- $lastmod := .Lastmod }}
|
||||
{{- if lt .Date $lastmod }}
|
||||
Last updated {{ .Lastmod.Format "2006-01-02" }}
|
||||
{{- end }}
|
||||
{{- $taxonomy := "tags" }}
|
||||
{{- with .Param $taxonomy }}
|
||||
{{- if gt (len .) 1 }}
|
||||
Tags:
|
||||
{{- else if gt (len .) 0 }}
|
||||
Tag:
|
||||
{{- end -}}
|
||||
|
||||
{{ range $index, $tag := . -}}{{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
|
||||
{{- if $index -}}, {{ end -}}{{ if (not $index) }}{{printf " "}}{{end}}{{ $tag | urlize }}{{- end -}}{{- end }}
|
||||
{{- end }}
|
||||
{{ .Date.Format "Jan 02, 2006" }} · {{ .WordCount }} words
|
||||
{{ partial "lastmod.gmi" (dict "Page" . "Postfix" ".") }}
|
||||
--
|
||||
{{ partial "processed-content.gmi" . }}
|
||||
|
||||
--
|
||||
{{- if (ne .Params.EOF false) }}
|
||||
EOF
|
||||
{{ end }}
|
||||
Questions/comments:
|
||||
|
||||
=> mailto:~hedy/posts@lists.sr.ht Public gemlog mailing list (plain-text only)
|
||||
=> mailto:{{ .Site.Author.email }} Or email me directly
|
||||
|
||||
|
|
|
@ -3,19 +3,14 @@
|
|||
<article itemprop="mainEntityOfPage">
|
||||
<header id="post-header">
|
||||
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
||||
{{ with .Description -}}
|
||||
<div class="post-description"><p>{{ . }}</p></div>
|
||||
{{- end }}
|
||||
<div class="post-meta">
|
||||
<p>Posted on
|
||||
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
{{ partial "tags.html" . }}
|
||||
{{ partial "lastmod.html" . }}
|
||||
|
|
||||
<a href="{{ .Site.Params.logURLPrefix }}content/{{ .File.Path }}">Changelog</a>
|
||||
<p>
|
||||
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 02, 2006" }}</time>
|
||||
{{ partial "lastmod.html" (dict "Page" . "Prefix" " · " ) }}
|
||||
· {{ .WordCount }} words
|
||||
</p>
|
||||
<hr>
|
||||
</div>
|
||||
<hr>
|
||||
</header>
|
||||
<section class="e-content" itemprop="articlebody">
|
||||
{{ partial "processed-content" . -}}
|
||||
|
@ -24,7 +19,7 @@
|
|||
</div>
|
||||
{{- end }}
|
||||
{{- define "after" }}
|
||||
<p id="#EOF">EOF</p>
|
||||
{{ if (eq .Params.EOF false) }}{{ else }}<p id="#EOF">EOF</p>{{ end }}
|
||||
<section class="comments">
|
||||
<p>
|
||||
Questions, comments? Send an email to my
|
||||
|
|
Loading…
Reference in New Issue