Merge pull request #202 from igorkulman/related-posts

Showing related posts
This commit is contained in:
Michael Romero 2018-10-26 00:44:34 -07:00 committed by GitHub
commit f5db9161c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 61 additions and 16 deletions

View File

@ -25,6 +25,7 @@ pygmentsCodefencesGuessSyntax = true
readingTime = true
useHLJS = true
socialShare = true
showRelatedPosts = true
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
#[[Params.bigimg]]

View File

@ -62,3 +62,7 @@
translation: "Seu email"
- id: yourWebsite
translation: "Seu website"
# Related posts
- id: seeAlso
translation: "Veja também"

View File

@ -63,4 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "Siehe auch"

View File

@ -63,4 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "See also"

View File

@ -62,3 +62,7 @@
translation: "Via retpoŝtadreso"
- id: yourWebsite
translation: "Via retpaĝaro"
# Related posts
- id: seeAlso
translation: "Vidu ankaŭ"

View File

@ -63,5 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "Ver también"

View File

@ -62,3 +62,7 @@
translation: "Votre addresse mail"
- id: yourWebsite
translation: "Votre site web"
# Related posts
- id: seeAlso
translation: "Voir également"

View File

@ -63,4 +63,6 @@
- id: yourWebsite
translation: "Il tuo website"
# Related posts
- id: seeAlso
translation: "Guarda anche"

View File

@ -63,6 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "も参照してください"

View File

@ -63,4 +63,6 @@
- id: yourWebsite
translation: "Din webside"
# Related posts
- id: seeAlso
translation: "Se også"

View File

@ -62,3 +62,7 @@
translation: "Jouw e-mailadres"
- id: yourWebsite
translation: "Jouw website"
# Related posts
- id: seeAlso
translation: "Zie ook"

View File

@ -63,5 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "Zobacz też"

View File

@ -63,6 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "Смотрите также"

View File

@ -63,5 +63,6 @@
- id: yourWebsite
translation: "You website"
# Related posts
- id: seeAlso
translation: "也可以看看"

View File

@ -21,6 +21,18 @@
</ul>
</section>
{{ end }}
{{ if .Site.Params.showRelatedPosts }}
{{ $related := .Site.RegularPages.Related . | first 3 }}
{{ with $related }}
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</article>
{{ if ne .Type "page" }}

View File

@ -742,3 +742,8 @@ div.splitbox div.right {
display:inline-block;
float:left;}
}
/* Related posts */
h4.see-also {
margin-top: 20px
}