mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
posts: Show related content
* Requires Hugo 0.27+ * Refer to https://gohugo.io/content-management/related/
This commit is contained in:
parent
779e5d830b
commit
ab24e5646c
3 changed files with 18 additions and 1 deletions
|
@ -6,6 +6,11 @@
|
||||||
- id: table_of_contents
|
- id: table_of_contents
|
||||||
translation: Table of Contents
|
translation: Table of Contents
|
||||||
|
|
||||||
|
# General
|
||||||
|
|
||||||
|
- id: related
|
||||||
|
translation: Related
|
||||||
|
|
||||||
# Buttons
|
# Buttons
|
||||||
|
|
||||||
- id: btn_details
|
- id: btn_details
|
||||||
|
|
|
@ -15,6 +15,18 @@
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||||
|
{{ with $related }}
|
||||||
|
<div class="article-container">
|
||||||
|
<h3>{{ i18n "related" }}</h3>
|
||||||
|
<ul>
|
||||||
|
{{ range . }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ partial "section_pager.html" . }}
|
{{ partial "section_pager.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,7 +3,7 @@ license = "MIT"
|
||||||
licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md"
|
licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md"
|
||||||
description = "Easily create beautifully simple academic or personal sites"
|
description = "Easily create beautifully simple academic or personal sites"
|
||||||
homepage = "https://github.com/gcushen/hugo-academic"
|
homepage = "https://github.com/gcushen/hugo-academic"
|
||||||
min_version = 0.24
|
min_version = 0.27
|
||||||
tags = ["academic",
|
tags = ["academic",
|
||||||
"portfolio",
|
"portfolio",
|
||||||
"responsive",
|
"responsive",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue