From cf91ff39630cead0fad16c16858405b3efbe7994 Mon Sep 17 00:00:00 2001 From: Ngô Ngọc Đức Huy Date: Fri, 4 Aug 2023 10:17:49 +0700 Subject: Implement table of contents --- layouts/partials/root-toc.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 layouts/partials/root-toc.html (limited to 'layouts/partials/root-toc.html') diff --git a/layouts/partials/root-toc.html b/layouts/partials/root-toc.html new file mode 100644 index 0000000..2792ce9 --- /dev/null +++ b/layouts/partials/root-toc.html @@ -0,0 +1,8 @@ +
+ {{ i18n "toc" }} + {{ $currentLink := .RelPermalink }} + {{ range last 1 (where .Ancestors "Params.categories" "intersect" (slice "book") ) }} + {{ .Title }} + {{ partial "toc.html" (dict "content" . "currentLink" $currentLink) }} + {{ end }} +
-- cgit 1.4.1