From eeef3176feddce51577ce1f073d34e8bd1325173 Mon Sep 17 00:00:00 2001 From: Andre Marcelo-Tanner Date: Sun, 13 Aug 2017 14:18:30 +0800 Subject: [PATCH 1/2] If Table of Contents link is external, do not try to add base url to link --- data/layout.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/layout.pug b/data/layout.pug index 238ec87..34855ca 100644 --- a/data/layout.pug +++ b/data/layout.pug @@ -17,7 +17,7 @@ mixin disqus(shortname) mixin menu(m, depth) li.menu-item(class=('-level-' + depth + (m.sections ? ' -parent' : ''))) if m.url - a.link.title(href=(base + m.url + (m.anchor || '')) class=((active === m.url && !m.anchor ? '-active' : '') + (' link-' + m.slug)))= m.title + a.link.title(href=(((m.url.match(/^[a-z]+:\/\//) || m.url.match(/^mailto:/) || m.url.match(/^#/)) ? '' : base) + m.url + (m.anchor || '')) class=((active === m.url && !m.anchor ? '-active' : '') + (' link-' + m.slug)) )= m.title else if m.title span.title= m.title From 04631d3f3db2f6098ef2aefa18731c7a1d118519 Mon Sep 17 00:00:00 2001 From: Andre Marcelo-Tanner Date: Mon, 14 Aug 2017 12:24:25 +0800 Subject: [PATCH 2/2] prepublish lifecycle script has been deprecated in npm@^4, using prepublishOnly and prepare now See http://blog.lholmquist.org/npm-prepublish-changes/ --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index eb868fa..e340a01 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "coverage": "istanbul cover _mocha -x '**/fixture/**' -- -R spec", "coveralls": "nyc report --reporter=text-lcov | coveralls", "lint": "standard", - "prepublish": "npm run build", + "prepublishOnly": "npm run build", + "prepare": "npm run build", "pretest": "npm run lint", "serve": "ss fixture/onmount/_docpress", "test": "nyc mocha",