Skip to content

Commit 81d838a

Browse files
committed
Warn when blog posts are outdated
1 parent 8da0445 commit 81d838a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

layouts/blog/content.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{/* Docsy override (temporary) */ -}}
2+
3+
<div class="td-content">
4+
<h1>{{ .Title }}</h1>
5+
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
6+
<div class="td-byline mb-4">
7+
{{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}}
8+
<time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-body-secondary">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
9+
</div>
10+
<header class="article-meta">
11+
{{ partial "taxonomy_terms_article_wrapper.html" . -}}
12+
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) -}}
13+
{{ partial "reading-time.html" . -}}
14+
{{ end -}}
15+
</header>
16+
{{ if .Date.Before (now.AddDate -1 0 0) -}}
17+
<div class="pageinfo pageinfo-warning">
18+
<p>
19+
<i class="fa-solid fa-triangle-exclamation"></i>
20+
Blog posts are not updated after publication. This post is more
21+
than a year old, so its content may be outdated, and some links may be
22+
invalid. Cross-verify any information before relying on it.
23+
</p>
24+
</div>
25+
{{ end -}}
26+
{{ .Content }}
27+
{{ if (.Site.Config.Services.Disqus.Shortname) -}}
28+
<br />
29+
{{- partial "disqus-comment.html" . -}}
30+
<br />
31+
{{ end -}}
32+
33+
{{ partial "pager.html" . }}
34+
{{ partial "page-meta-lastmod.html" . -}}
35+
</div>

0 commit comments

Comments
 (0)