From edff1f416d0a2ca114892e433f744c0c64713598 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 23 Oct 2021 00:03:44 -0500 Subject: [PATCH] Add See also section --- i18n/en.toml | 3 +++ i18n/es.toml | 3 +++ layouts/_default/single.html | 17 +++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/i18n/en.toml b/i18n/en.toml index 3087eb6..363cd7c 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -29,3 +29,6 @@ [table_of_contents] other = "Table of Contents" + +[see_also] + other = "See also" diff --git a/i18n/es.toml b/i18n/es.toml index 7ecb391..e019388 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -29,3 +29,6 @@ [table_of_contents] other = "Índice" + +[see_also] + other = "Véase también" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index bf79a5d..5664e9a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -24,4 +24,21 @@ {{ end }} {{ .Content }} + +{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ with $related }} +
+

{{ i18n "see_also" }}

+ + +
+{{ end }} + {{ end }}