Add a feature to auto-detect newer iterations of a post.
This commit is contained in:
@ -1,8 +1,18 @@
|
||||
{{ partial "menu.html" . }}
|
||||
{{ with ($.Param "deprecated") }}
|
||||
{{ if ($.Param "deprecated") }}
|
||||
<p class="l-deprecation_warning">
|
||||
This post was saved / ported from a previous site migration. You may
|
||||
encounter missing images, dead links, and strange formatting. Sorry
|
||||
about that!
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Param "versioned" }}
|
||||
{{ range (where (where .Site.RegularPages "Type" "posts") "Params.versioned" (.Param "versioned")).Limit 1 }}
|
||||
{{ if not (eq .Slug $.Slug) }}
|
||||
<p class="l-new_version_message">
|
||||
There is a newer version of this post available, published on {{.Date | time.Format .Site.Params.dateFormat}}. <a href="{{.RelPermalink}}">Click here</a> to read the latest version.
|
||||
</p>
|
||||
{{ end }}
|
||||
{{end }}
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user