From 678d02b4182ee4cd73ee1d8544ef3013d10906d7 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Fri, 21 Sep 2018 13:56:26 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=8E=BB=E6=8E=89=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=9A=84=E6=A0=B9=E7=BB=84=E4=BB=B6=E5=8C=85=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translator/assets/aio-shell-index.html | 19 +++++++++++-------- .../translator/assets/aio-shell-template.html | 3 +-- aio/tools/translator/bin/ssr.ts | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/aio/tools/translator/assets/aio-shell-index.html b/aio/tools/translator/assets/aio-shell-index.html index 4042812112..7aecd705e6 100644 --- a/aio/tools/translator/assets/aio-shell-index.html +++ b/aio/tools/translator/assets/aio-shell-index.html @@ -1,8 +1,11 @@ - + + + diff --git a/aio/tools/translator/assets/aio-shell-template.html b/aio/tools/translator/assets/aio-shell-template.html index 982cf903c8..fccdc98b58 100644 --- a/aio/tools/translator/assets/aio-shell-template.html +++ b/aio/tools/translator/assets/aio-shell-template.html @@ -1,5 +1,4 @@ - +
diff --git a/aio/tools/translator/bin/ssr.ts b/aio/tools/translator/bin/ssr.ts index 73032c1ad3..dfc680f478 100644 --- a/aio/tools/translator/bin/ssr.ts +++ b/aio/tools/translator/bin/ssr.ts @@ -6,7 +6,7 @@ function buildInnerPages(): void { const navigation = fs.readFileSync('./content/navigation.json', 'utf-8'); const indexTemplate = fs.readFileSync('./dist/index.html', 'utf-8'); const aioShellTemplate = fs.readFileSync(__dirname + '/../assets/aio-shell-template.html'); - const pageTemplate = indexTemplate.replace('', `${aioShellTemplate}`); + const pageTemplate = indexTemplate.replace('', `${aioShellTemplate}`); const urls = navigation.match(/"url": "(.*?)"/g) .map((entry) => entry.replace(/^"url": "(.*?)".*$/, '$1')) .filter(url => url.slice(0, 4) !== 'http') @@ -25,7 +25,7 @@ function buildInnerPages(): void { function buildIndexPage(): void { const indexTemplate = fs.readFileSync('./dist/index.html', 'utf-8'); const aioShellIndex = fs.readFileSync(__dirname + '/../assets/aio-shell-index.html'); - const content = indexTemplate.replace('', `${aioShellIndex}`); + const content = indexTemplate.replace('', `${aioShellIndex}`); fs.writeFileSync(`./dist/index.html`, content, 'utf-8'); }