mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Truncate webmention titles, add length indicators
This commit is contained in:
parent
589544cd6c
commit
d37d832274
1 changed files with 5 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
<header id="post-header">
|
<header id="post-header">
|
||||||
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
||||||
{{ if lt .Date .Lastmod -}}
|
{{ if lt .Date .Lastmod -}}
|
||||||
Posted <time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
|
Posted <time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
|
||||||
{{ with .OutputFormats.Get "gemtext" -}}
|
{{ with .OutputFormats.Get "gemtext" -}}
|
||||||
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -16,6 +16,8 @@
|
||||||
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<br>
|
||||||
|
<small><span itemprop="wordCount">{{ .WordCount }}</span> words, a <span itemprop="timeRequired" content="PT{{ .ReadingTime }}M">{{ .ReadingTime }} minute</span> read</small>
|
||||||
</header>
|
</header>
|
||||||
<section class="e-content" itemprop="articlebody">
|
<section class="e-content" itemprop="articlebody">
|
||||||
{{ partial "processed-content" . -}}
|
{{ partial "processed-content" . -}}
|
||||||
|
@ -58,9 +60,9 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<a class="u-url" href="{{ $webmention.source }}" rel="nofollow ugc"><span itemprop="name" class="p-content p-name">
|
<a class="u-url" href="{{ $webmention.source }}" rel="nofollow ugc"><span itemprop="name" class="p-content p-name">
|
||||||
{{- if $webmention.title -}}
|
{{- if $webmention.title -}}
|
||||||
{{- $webmention.title -}}
|
{{- $webmention.title | truncate 200 -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $webmention.source -}}
|
{{- $webmention.source | truncate 35 -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</span></a>
|
</span></a>
|
||||||
{{- if $webmention.author_name }}
|
{{- if $webmention.author_name }}
|
||||||
|
|
Loading…
Reference in a new issue