Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 8e61854

Browse files
authored
Merge pull request #141 from Mitrichius/see-next-section/#44
Add See Next section
2 parents ed55969 + 4503d1b commit 8e61854

File tree

13 files changed

+56
-3
lines changed

13 files changed

+56
-3
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/).
2020
- ISSO
2121
- Utteranc.es
2222
- RSS feeds
23+
- Related posts (Read Next section)
2324
- Deploy via Netlify (config included in example site)
2425
- Hiding posts from the RSS feed
2526
- Hidden posts (available only by link)
@@ -82,7 +83,8 @@ params:
8283
dateFormat: "2006-01-02"
8384
paginationSinglePost: true
8485
style: light-without-switcher
85-
readMore: false
86+
readMore: false # show read more button
87+
readNextPosts: 5 # show 5 related posts, 0 by default
8688
disableSummary: false
8789
copyCodeButton: true # true by default
8890
rssAsSocialIcon: true
@@ -216,6 +218,9 @@ For production — allow all, for other — disallow all.
216218
### Favorite posts
217219
Add `favorite: true` to post front matter. It adds a "★" icon nearby post's title.
218220

221+
### Related posts (Read Next section)
222+
Based on `readNextPosts` config parameter. Check [this article](https://gohugo.io/content-management/related/#configure-related-content) for configuration details.
223+
219224
### Hiding posts from RSS
220225
Add `disable_feed: true` to post front matter.
221226

assets/css/main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,16 @@ article figcaption {
556556
color: var(--link-state-color);
557557
}
558558

559+
.read-next-title {
560+
margin-bottom: 0;
561+
}
562+
563+
.read-next-posts {
564+
margin-top: 5px;
565+
list-style-type:"- ";
566+
padding-inline-start: 20px;
567+
}
568+
559569
/* Other pages */
560570
.terms {
561571
list-style-type: none;

exampleSite/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dateFormat = "2006-01-02"
1717
paginationSinglePost = true
1818
style = "auto"
1919
readMore = false
20+
readNextPosts = 2
2021
copyCodeButton = true
2122
rssAsSocialIcon = true
2223

exampleSiteMultilingual/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dateFormat = "2006-01-02"
1818
paginationSinglePost = true
1919
style = "auto"
2020
readMore = false
21+
readNextPosts = 2
2122
copyCodeButton = true
2223
rssAsSocialIcon = true
2324

i18n/de.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ darkTheme:
4242

4343
lightTheme:
4444
other: "Helles Theme"
45+
46+
readNext:
47+
other: "Weiter lesen"

i18n/en.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ darkTheme:
4242

4343
lightTheme:
4444
other: "Light theme"
45+
46+
readNext:
47+
other: "Read next"

i18n/fr.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ darkTheme:
4242

4343
lightTheme:
4444
other: "Thème clair"
45+
46+
readNext:
47+
other: "Lire la suite"

i18n/pl.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ darkTheme:
4242

4343
lightTheme:
4444
other: "Jasny schemat"
45+
46+
readNext:
47+
other: "Czytaj dalej"

i18n/pt.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ darkTheme:
4141
other: "Tema Escuro"
4242

4343
lightTheme:
44-
other: "Tema Claro"
44+
other: "Tema Claro"
45+
46+
readNext:
47+
other: "Leia a seguir"

i18n/ru.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ darkTheme:
4242

4343
lightTheme:
4444
other: "Светлая тема"
45+
46+
readNext:
47+
other: "Читать далее"

0 commit comments

Comments
 (0)