docs: add modified time based on the git commit
This commit is contained in:
parent
65d6c8a731
commit
4ae9ba8236
2 changed files with 11 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ languageCode: "en"
|
|||
title: "Bootstrap"
|
||||
baseURL: "https://v5.getbootstrap.com"
|
||||
enableInlineShortcodes: true
|
||||
enableGitInfo: true
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
|
|
|
|||
|
|
@ -15,3 +15,13 @@
|
|||
<meta property="og:image:type" content="image/png">
|
||||
<meta property="og:image:width" content="1000">
|
||||
<meta property="og:image:height" content="500">
|
||||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||
{{- if .IsPage }}
|
||||
{{ if not .PublishDate.IsZero }}<meta property="article:published_time" {{ .PublishDate.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ else if not .Date.IsZero }}<meta property="article:published_time" {{ .Date.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{ end }}
|
||||
{{- if not .Lastmod.IsZero }}<meta property="article:modified_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>{{ end }}
|
||||
{{- else }}
|
||||
{{- if not .Date.IsZero }}<meta property="og:updated_time" {{ .Lastmod.Format $iso8601 | printf "content=%q" | safeHTMLAttr }}>
|
||||
{{- end }}
|
||||
{{- end }}{{/* .IsPage */}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue