Skip to content

Commit f850e24

Browse files
committed
Partial: Move changelog-date to theme from documentation
1 parent 28f9d22 commit f850e24

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

layouts/partials/changelog-date.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ $changelogContent := readFile "content/nginx-one/changelog.md" }}
2+
{{ $maxNumLogs := 3 }}
3+
{{ $headings := first $maxNumLogs (findRE `(?m)^##\s(.+)$` $changelogContent) }}
4+
<ul>
5+
{{ range $headings }}
6+
{{ $title := replaceRE "^##\\s" "" . }}
7+
<li><a href="{{ absURL "nginx-one/changelog/" }}#{{urlize $title}}">{{ $title }}</a></li>
8+
{{ end }}
9+
<li><a href="{{ absURL "nginx-one/changelog/" }}">Older...</a></li>
10+
</ul>

0 commit comments

Comments
 (0)