From 2df3b951c993e01891e1e0686449d915c97e9950 Mon Sep 17 00:00:00 2001 From: Micha Pietsch Date: Tue, 15 Oct 2019 11:32:59 +0200 Subject: [PATCH] Correctly nest sub-menu for h3s inside h2 list item (#2345) --- package.json | 2 +- themes/vue/source/js/common.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2036a6441..5e3f472ff 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jp.vuejs.org", "private": true, "hexo": { - "version": "3.8.0" + "version": "3.8.1" }, "engines": { "node": ">=8.9.0" diff --git a/themes/vue/source/js/common.js b/themes/vue/source/js/common.js index 8667a167a..197ccb1d5 100644 --- a/themes/vue/source/js/common.js +++ b/themes/vue/source/js/common.js @@ -364,12 +364,13 @@ var headers = content.querySelectorAll('h2') if (headers.length) { each.call(headers, function (h) { - sectionContainer.appendChild(makeLink(h)) + var listItem = makeLink(h) + sectionContainer.appendChild(listItem) var h3s = collectH3s(h) allHeaders.push(h) allHeaders.push.apply(allHeaders, h3s) if (h3s.length) { - sectionContainer.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide)) + listItem.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide)) } }) } else {