Skip to content

Commit

Permalink
Warn when blog posts are outdated (#5883)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Jan 6, 2025
1 parent c6833f4 commit dc55d9d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions layouts/blog/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{/* Docsy override (temporary) */ -}}

<div class="td-content">
<h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<div class="td-byline mb-4">
{{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}}
<time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-body-secondary">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
</div>
<header class="article-meta">
{{ partial "taxonomy_terms_article_wrapper.html" . -}}
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) -}}
{{ partial "reading-time.html" . -}}
{{ end -}}
</header>
{{ if .Date.Before (now.AddDate -1 0 0) -}}
<div class="pageinfo pageinfo-warning">
<p>
<i class="fa-solid fa-triangle-exclamation"></i>
Blog posts are not updated after publication. This post is more
than a year old, so its content may be outdated, and some links may be
invalid. Cross-verify any information before relying on it.
</p>
</div>
{{ end -}}
{{ .Content }}
{{ if (.Site.Config.Services.Disqus.Shortname) -}}
<br />
{{- partial "disqus-comment.html" . -}}
<br />
{{ end -}}

{{ partial "pager.html" . }}
{{ partial "page-meta-lastmod.html" . -}}
</div>

0 comments on commit dc55d9d

Please sign in to comment.