From cf5c7431f122f759e772a38745b76d3b1e9e0ec1 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Thu, 4 Feb 2021 14:40:12 -0600 Subject: [PATCH 1/6] =?UTF-8?q?Set=20html=20=E2=80=9Clang=E2=80=9D=20attri?= =?UTF-8?q?bute=20based=20on=20URL=20hash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required to trigger auto-translate feature in applicable Chromium-based browsers (Chrome & Edge) --- docs/index.html | 8 ++++++++ index.html | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/index.html b/docs/index.html index 0a83d114d..440c02748 100644 --- a/docs/index.html +++ b/docs/index.html @@ -56,6 +56,14 @@
Loading ...
+ + - #carbonads { - box-shadow: none !important; - width: auto !important; - } - - + +
+ - - - - - - - - - - + plugins: [ + DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'), + function(hook, vm) { + hook.beforeEach(function(html) { + if (/githubusercontent\.com/.test(vm.route.file)) { + url = vm.route.file + .replace('raw.githubusercontent.com', 'github.com') + .replace(/\/master/, '/blob/master'); + } else if (/jsdelivr\.net/.test(vm.route.file)) { + url = vm.route.file + .replace('cdn.jsdelivr.net/gh', 'github.com') + .replace('@master', '/blob/master'); + } else { + url = + 'https://github.com/docsifyjs/docsify/blob/master/docs/' + + vm.route.file; + } + var editHtml = '[:memo: Edit Document](' + url + ')\n'; + return ( + editHtml + + html + + '\n\n----\n\n' + + 'Powered by docsify' + ); + }); + }, + ], + }; + + + + + + + + + + From 7cdf460066e3edc16f42f623f14ba5b5443f7a67 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Thu, 4 Feb 2021 18:53:14 -0600 Subject: [PATCH 5/6] Restore pathNamespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 沈唁 <52o@qq52o.cn> --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 185af3b27..3e680a4b6 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@ '/zh-cn/': '搜索', '/': 'Search', }, - // pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'] + pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'] }, plugins: [ DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'), From 46bad401c3ff936c4230b8cedd615fd7005b335b Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Thu, 4 Feb 2021 18:59:34 -0600 Subject: [PATCH 6/6] Update test snapshot --- test/integration/__snapshots__/docs.test.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/__snapshots__/docs.test.js.snap b/test/integration/__snapshots__/docs.test.js.snap index 98b5089a0..62109358b 100644 --- a/test/integration/__snapshots__/docs.test.js.snap +++ b/test/integration/__snapshots__/docs.test.js.snap @@ -7,6 +7,6 @@ exports[`Docs Site coverpage renders and is unchanged 1`] = ` Getting Started

" `; -exports[`Docs Site navbar renders and is unchanged 1`] = `""`; +exports[`Docs Site navbar renders and is unchanged 1`] = `""`; exports[`Docs Site sidebar renders and is unchanged 1`] = `""`;