Skip to content

Commit

Permalink
更改文档构建方式
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoqize committed Nov 27, 2018
1 parent b94f555 commit 9595752
Show file tree
Hide file tree
Showing 75 changed files with 4,444 additions and 3,828 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions .docs/index.html
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Puppeteer API</title>
<link rel="icon" href="_media/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script src="//unpkg.com/docsify-edit-on-github/index.js"></script>
<script>
window.$docsify = {
name: 'Puppeteer API',
repo: 'https://github.com/zhaoqize/puppeteer-api-zh_CN',
auto2top: true,
loadSidebar: true,
mergeNavbar: true,
loadNavbar: true,
maxLevel: 4,
subMaxLevel: 4,
coverpage: true,
search: 'auto', // default
plugins: [
EditOnGithubPlugin.create(
'https://github.com/zhaoqize/puppeteer-api-zh_CN/blob/master/docs/'
),
],
formatUpdated: '{MM}/{DD} {HH}:{mm}',
ga: 'UA-122080504-1'
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'puppeteer-China/Lobby'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</body>
</html>
32 changes: 0 additions & 32 deletions _docs/index.html

This file was deleted.

4 changes: 0 additions & 4 deletions _docs/index.js

This file was deleted.

3,551 changes: 0 additions & 3,551 deletions _official/api.md

This file was deleted.

3 changes: 2 additions & 1 deletion build.js
Expand Up @@ -83,7 +83,7 @@ if (os.platform() === 'win32') {
await page.evaluate(() => {
const $$ = selector => Array.from(document.querySelectorAll(selector));
const links = $$('link[rel=stylesheet]').filter(link => link.href.startsWith('file://'));
links.shift().href = '/style.css';
links.shift().href = './style.css';
links.forEach(link => link.remove());
});
const indexContent = '<!-- THIS FILE IS GENERATED BY build.js -->\n\n' + (await page.content()).split('\n').filter(line => !/^\s*$/.test(line)).join('\n');
Expand All @@ -95,6 +95,7 @@ if (os.platform() === 'win32') {
// 5. Copy images and favicons into dist/
await cpAsync(path.join(SRC_PATH, 'images'), path.join(DST_PATH, 'images'));
await cpAsync(path.join(SRC_PATH, 'favicons'), path.join(DST_PATH, 'favicons'));
await cpAsync(path.join(SRC_PATH, 'offcial'), path.join(DST_PATH, 'offcial'));
});

await step('6. generate sw.js', async () => {
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
73 changes: 26 additions & 47 deletions docs/index.html 100755 → 100644
@@ -1,47 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Puppeteer API</title>
<link rel="icon" href="_media/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script src="//unpkg.com/docsify-edit-on-github/index.js"></script>
<script>
window.$docsify = {
name: 'Puppeteer API',
repo: 'https://github.com/zhaoqize/puppeteer-api-zh_CN',
auto2top: true,
loadSidebar: true,
mergeNavbar: true,
loadNavbar: true,
maxLevel: 4,
subMaxLevel: 4,
coverpage: true,
search: 'auto', // default
plugins: [
EditOnGithubPlugin.create(
'https://github.com/zhaoqize/puppeteer-api-zh_CN/blob/master/docs/'
),
],
formatUpdated: '{MM}/{DD} {HH}:{mm}',
ga: 'UA-122080504-1'
}
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
<script src="//unpkg.com/docsify/lib/plugins/ga.js"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'puppeteer-China/Lobby'
};
</script>
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
</body>
</html>
<!-- THIS FILE IS GENERATED BY build.js -->

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-106086244-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-106086244-2');
</script>
<!-- FavIcons -->
<link rel="apple-touch-icon" sizes="180x180" href="./favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicons/favicon-16x16.png">
<link rel="manifest" href="./favicons/site.webmanifest">
<link rel="mask-icon" href="./favicons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="./favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="msapplication-config" content="./favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- styles -->
<link rel="stylesheet" href="./style.css">
<script type="module" src="./index.js"></script>
</head><body></body></html>
4 changes: 4 additions & 0 deletions docs/index.js

Large diffs are not rendered by default.

0 comments on commit 9595752

Please sign in to comment.