From 886aafac1f1fbdee64537938fa906c3dacb516eb Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 8 Sep 2022 23:17:43 +0800 Subject: inline_links partial finally find a way to determine whether a section/term page has archives or not by conquering hugo's faultiness of .RelPermalink --- layouts/_default/list.html | 15 ++++++--------- layouts/newsletter/section.html | 9 +-------- layouts/partials/inline_links.html | 11 +++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 layouts/partials/inline_links.html (limited to 'layouts') diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 654297b..7dce17b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,20 +7,17 @@ {{- if not .IsHome | and .Title }} {{- end }} diff --git a/layouts/newsletter/section.html b/layouts/newsletter/section.html index 04c3eed..7814708 100644 --- a/layouts/newsletter/section.html +++ b/layouts/newsletter/section.html @@ -37,14 +37,7 @@ {{ end }}

相关链接

- + {{- partial "inline_links.html" . -}} {{ end }} diff --git a/layouts/partials/inline_links.html b/layouts/partials/inline_links.html new file mode 100644 index 0000000..72e4af2 --- /dev/null +++ b/layouts/partials/inline_links.html @@ -0,0 +1,11 @@ + -- cgit v1.2.3