From 7394031c54d66e6285b4dcc041651a9125a0ff50 Mon Sep 17 00:00:00 2001 From: He Yeshuang Date: Sat, 20 Jun 2020 21:49:36 +0800 Subject: add 'table of contents' feature --- layouts/partials/page-header.html | 1 + layouts/partials/toc.html | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 layouts/partials/toc.html (limited to 'layouts/partials') diff --git a/layouts/partials/page-header.html b/layouts/partials/page-header.html index e66b019..6aeb563 100644 --- a/layouts/partials/page-header.html +++ b/layouts/partials/page-header.html @@ -16,4 +16,5 @@ {{- .Date.Format "2006-1-2 15:04" -}} +{{ partial "toc.html" . }}
\ No newline at end of file diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..1c6b5e0 --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,10 @@ +{{ if (.Params.toc) }} +
+ +
+
+
+ {{.TableOfContents}} +
+
+{{ end }} \ No newline at end of file -- cgit v1.2.3