Add See also section

This commit is contained in:
BBaoVanC 2021-10-23 00:03:44 -05:00
parent ff2e87fd9e
commit edff1f416d
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 23 additions and 0 deletions

View File

@ -29,3 +29,6 @@
[table_of_contents]
other = "Table of Contents"
[see_also]
other = "See also"

View File

@ -29,3 +29,6 @@
[table_of_contents]
other = "Índice"
[see_also]
other = "Véase también"

View File

@ -24,4 +24,21 @@
{{ end }}
{{ .Content }}
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<div class="see-also">
<h2>{{ i18n "see_also" }}</h2>
<ul>
{{ range . }}
<li>
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ end }}