From: danix Date: Tue, 7 Mar 2023 14:40:23 +0000 (+0100) Subject: initial setup of related content inside single articles. Needs working. X-Git-Url: https://git.danix.xyz/?p=theme-danix.xyz.git;a=commitdiff_plain;h=eae15ff2fc37cc4f24d0a35ae8129e9480ec6a68 initial setup of related content inside single articles. Needs working. --- diff --git a/layouts/partials/funcs/related.html b/layouts/partials/funcs/related.html new file mode 100644 index 0000000..94d2fca --- /dev/null +++ b/layouts/partials/funcs/related.html @@ -0,0 +1,36 @@ +{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ with $related }} +

You might also be interested in:

+ +{{ else }} +

Check out these awesome articles:

+ +{{ end }} \ No newline at end of file diff --git a/layouts/post/single-baseof.html b/layouts/post/single-baseof.html index d75dd0f..c6f8bb9 100644 --- a/layouts/post/single-baseof.html +++ b/layouts/post/single-baseof.html @@ -28,7 +28,7 @@ {{- block "article-main" . }}{{- end }}
-
articoli correlati
+ {{- partial "funcs/related.html" . -}}
{{- partial "footer.html" . -}}