diff --git a/README.md b/README.md index 6329e68..2d77a42 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,12 @@ paginate = 5 # set a custom favicon (default is a `themeColor` square) # favicon = "favicon.ico" + # set post to show the last updated # If you use git, you can set `enableGitInfo` to `true` and then post will automatically get the last updated showLastUpdated = false + # Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author + # updatedDatePrefix = "Updated" # set all headings to their default size (depending on browser settings) # it's set to `true` by default diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 41e507f..a3a92e5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,9 +3,9 @@

{{ .Title | markdownify }}

- {{ if .Params.Date }} + {{ if .Params.Date }} - {{ .Date.Format "2006-01-02" }} + {{ .Date.Format "2006-01-02" }} {{ if $.Site.Params.showLastUpdated }}[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]{{ end }} {{ end }} {{ with .Params.Author }} @@ -34,11 +34,6 @@
{{- end -}} - {{ if $.Site.Params.showLastUpdated }} -
- Last Updated :: {{ .Lastmod.Format "2006-01-02" }} -
- {{ end }} {{ if or .NextInSection .PrevInSection }}