From 3763502f15c12b3b97713ed27cd186e24f30b26b Mon Sep 17 00:00:00 2001 From: Carson Ip Date: Sat, 25 Feb 2017 18:51:02 +0100 Subject: [PATCH] Add smart toc Smart table of contents will highlight and expand current section Fix #1 --- layouts/partials/article.html | 43 ++++++++++++++++++++++++++++++++++- static/css/style.css | 3 +++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/layouts/partials/article.html b/layouts/partials/article.html index b7dc303..58a6b6a 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -34,13 +34,54 @@ {{ if not .Params.notoc }} {{ if .TableOfContents }} -
+

Contents

{{ .TableOfContents }}
{{ end }} {{ end }} + {{ if .Site.Params.SmartToc }} + + + {{ end }} + + {{ if .Params.tags }}