diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a70e29f..e8fde85 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -8,8 +8,13 @@ {{ end }} {{ if .IsHome -}} + {{ if .Site.Params.subtitle -}} {{ .Site.Title }} | {{ .Site.Params.subtitle}} + {{ else -}} + {{ .Site.Title }} + + {{ end -}} @@ -53,4 +58,4 @@ {{ range .Site.Params.customCSS }} {{ end }} - + \ No newline at end of file diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 39617b2..bdefff8 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -71,8 +71,8 @@ var postToc = $(".post-toc"); if (postToc.length) { var leftPos = $("#main").offset().left; - if(leftPos<220){ - postToc.css({"width":leftPos-10,"margin-left":(0-leftPos)}) + if (leftPos < 220) { + postToc.css({ "width": leftPos - 10, "margin-left": (0 - leftPos) }) } var t = postToc.offset().top - 20, @@ -91,6 +91,10 @@ e < t ? postToc.css(a.start) : postToc.css(a.process) }) } + + if ($("#TableOfContents").children().length < 1) { + $(".post-toc").remove(); + } }) {{- end }} \ No newline at end of file