Skip to content

Commit 275b157

Browse files
committed
Add last-modified section to bottom of docs pages
1 parent 88b032a commit 275b157

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

assets/css/f5-hugo.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,4 +1648,8 @@ li.nav-item a.nav-link {
16481648
.remove-bottom-radius {
16491649
border-bottom-left-radius: 0;
16501650
border-bottom-right-radius: 0;
1651+
}
1652+
1653+
.last-modified {
1654+
font-weight:300;
16511655
}

layouts/_default/docs.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ <h1>{{ .Title }}</h1>
2121
{{ .Content }}
2222
{{ partial "version-list" . }}
2323
<hr>
24+
25+
{{ if .Page.Lastmod }}
26+
<div class="last-modified">
27+
Last modified {{ .Page.Lastmod.Format "January 2, 2006" }}
28+
</div>
29+
{{ end }}
30+
2431
{{ partial "previous-next-links-in-section-with-title.html" . }}
25-
2632
</main>
2733
{{ if and (gt .WordCount 200 ) (.Params.toc) }}
2834
{{ if (add (len (findRE "<h3" .Content)) (len (findRE "<h2" .Content))) }}
@@ -31,6 +37,7 @@ <h1>{{ .Title }}</h1>
3137
</div>
3238
{{ end }}
3339
{{ end }}
40+
3441
</div>
3542
<!-- If there is a script defined in the page metadata, load it -->
3643
{{if .Params.script}}

0 commit comments

Comments
 (0)