Skip to content

Commit 1387c49

Browse files
committed
(杂项更改)移除旧版本的旧文件
1 parent a5505b0 commit 1387c49

File tree

87 files changed

+283
-916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+283
-916
lines changed

docs/.vuepress/config.js

Lines changed: 8 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -12,183 +12,19 @@ module.exports = ctx => ({
1212
description: 'NumPy is the fundamental package for scientific computing with Python.'
1313
}
1414
},
15-
head: [
16-
['link', {
17-
rel: 'dns-prefetch',
18-
href: `//cdn.bootcss.com`
19-
}],
20-
['link', {
21-
rel: 'dns-prefetch',
22-
href: `//cdn.mathjax.org`
23-
}],
24-
// 使主题能够支持数学公式
25-
['script', {
26-
type: 'text/x-mathjax-config'
27-
}, `
28-
MathJax.Hub.Config({
29-
showProcessingMessages: false, //关闭js加载过程信息
30-
messageStyle: "none", //不显示信息
31-
tex2jax: {
32-
"inlineMath": [["$", "$"], ["\\\\(", "\\\\)"]],
33-
"processEscapes": true,
34-
"ignoreClass": "document",
35-
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'a', 'td'],
36-
"processClass": "math|output_area"
37-
},
38-
"HTML-CSS": {
39-
showMathMenu: false
40-
}
41-
})
42-
`],
43-
['script', {
44-
src: '//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
45-
}],
46-
// 监听路由重新渲染数学公式
47-
['script', {}, `
48-
(function() {
49-
var url1 = window.location.href;
50-
var url2 = window.location.href;
51-
setInterval(function() {
52-
if (url1 === url2) {
53-
url2 = window.location.href;
54-
} else {
55-
url1 = url2;
56-
if (window.MathJax) window.MathJax.Hub.Typeset();
57-
}
58-
}, 200);
59-
})();
60-
`],
61-
['link', {
62-
rel: 'icon',
63-
href: `/logo.png`
64-
}],
65-
['link', {
66-
rel: 'manifest',
67-
href: '/manifest.json'
68-
}],
69-
['meta', {
70-
name: 'theme-color',
71-
content: '#3eaf7c'
72-
}],
73-
['meta', {
74-
name: 'apple-mobile-web-app-capable',
75-
content: 'yes'
76-
}],
77-
['meta', {
78-
name: 'apple-mobile-web-app-status-bar-style',
79-
content: 'black'
80-
}],
81-
['link', {
82-
rel: 'apple-touch-icon',
83-
href: `/icons/apple-touch-icon-152x152.png`
84-
}],
85-
['link', {
86-
rel: 'mask-icon',
87-
href: '/icons/safari-pinned-tab.svg',
88-
color: '#3eaf7c'
89-
}],
90-
['meta', {
91-
name: 'msapplication-TileImage',
92-
content: '/icons/msapplication-icon-144x144.png'
93-
}],
94-
['meta', {
95-
name: 'msapplication-TileColor',
96-
content: '#000000'
97-
}],
98-
// 百度统计
99-
['script', {}, `
100-
(function() {
101-
var onDocumentComplete = function() { 
102-
if (document.readyState =='complete') {
103-
var hm = document.createElement("script");
104-
hm.src = "https://hm.baidu.com/hm.js?a809b6f7e6517af8c15c6076273e80fe";
105-
var s = document.getElementsByTagName("script")[0];
106-
s.parentNode.insertBefore(hm, s);
107-
}
108-
}
109-
document.onreadystatechange = onDocumentComplete; //当页面加载状态改变的时候执行这个方法. 
110-
})();
111-
`],
112-
],
15+
head: require('./configs/head'),
11316
theme: 'teadocs',
114-
themeConfig: {
115-
logo: {
116-
text: 'NumPy',
117-
subText: '中文网',
118-
image: '/logo.svg'
119-
},
120-
alert: [{
121-
id: '2019-7-29',
122-
title: '文档公告',
123-
content: `我们经常发布文档更新,部分页面的翻译可能仍在进行中。有关最新信息,请访问<a href="/en/">英文文档</a>。如果某个页面上的翻译有问题,请提issues<a href="https://github.com/teadocs/numpy-cn/issues" target="_blank">告诉我们</a>。`
124-
}],
125-
repo: 'teadocs/numpy-cn',
126-
editLinks: true,
127-
docsDir: 'docs',
128-
locales: {
129-
'/': {
130-
label: '简体中文',
131-
selectText: '选择语言',
132-
editLinkText: '在 GitHub 上编辑此页',
133-
lastUpdated: '上次更新',
134-
nav: require('./nav/zh'),
135-
sidebar: {
136-
'/user/': require('./sidebar/user_zh')(),
137-
'/reference/': require('./sidebar/reference_zh')(),
138-
'/f2py': require('./sidebar/f2py_zh')(),
139-
'/dev': require('./sidebar/dev_zh')(),
140-
'/bedocs': require('./sidebar/bedocs_zh')()
141-
}
142-
},
143-
'/en/': {
144-
label: 'English',
145-
selectText: 'Languages',
146-
editLinkText: 'Edit this page on GitHub',
147-
lastUpdated: 'Last Updated',
148-
nav: require('./nav/en'),
149-
sidebar: {
150-
'/en/user/': require('./sidebar/user_en')(),
151-
'/en/reference/': require('./sidebar/reference_en')(),
152-
'/en/f2py': require('./sidebar/f2py_en')(),
153-
'/en/dev': require('./sidebar/dev_en')(),
154-
'/en/bedocs': require('./sidebar/bedocs_en')()
155-
}
156-
}
157-
}
158-
},
159-
plugins: [
160-
['@vuepress/back-to-top', true],
161-
['@vuepress/pwa', {
162-
serviceWorker: true,
163-
updatePopup: {
164-
'/': {
165-
message: "发现新内容可用",
166-
buttonText: "刷新"
167-
},
168-
'/en/': {
169-
message: "New content is available.",
170-
buttonText: "Refresh"
171-
}
172-
}
173-
}],
174-
['@vuepress/medium-zoom', true],
175-
['container', {
176-
type: 'vue',
177-
before: '<pre class="vue-container"><code>',
178-
after: '</code></pre>',
179-
}],
180-
['container', {
181-
type: 'upgrade',
182-
before: info => `<UpgradePath title="${info}">`,
183-
after: '</UpgradePath>',
184-
}],
185-
],
17+
themeConfig: require('./configs/themeConfig'),
18+
plugins: require('./configs/plugins'),
18619
extraWatchFiles: [
18720
'.vuepress/nav/en.js',
18821
'.vuepress/nav/zh.js',
18922
'.vuepress/sidebar/user_en.js',
19023
'.vuepress/sidebar/user_zh.js',
19124
'.vuepress/sidebar/reference_zh.js',
192-
'.vuepress/sidebar/reference_zh.js'
25+
'.vuepress/sidebar/reference_zh.js',
26+
'.vuepress/configs/head.js',
27+
'.vuepress/configs/plugins.js',
28+
'.vuepress/configs/themeConfig.js'
19329
]
194-
})
30+
});

docs/.vuepress/configs/head.js

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
module.exports = [
2+
['link', {
3+
rel: 'dns-prefetch',
4+
href: `//cdn.bootcss.com`
5+
}],
6+
['link', {
7+
rel: 'dns-prefetch',
8+
href: `//cdn.mathjax.org`
9+
}],
10+
// 使主题能够支持数学公式
11+
['script', {
12+
type: 'text/x-mathjax-config'
13+
}, `
14+
MathJax.Hub.Config({
15+
showProcessingMessages: false, //关闭js加载过程信息
16+
messageStyle: "none", //不显示信息
17+
tex2jax: {
18+
"inlineMath": [["$", "$"], ["\\\\(", "\\\\)"]],
19+
"processEscapes": true,
20+
"ignoreClass": "document",
21+
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'a', 'td'],
22+
"processClass": "math|output_area"
23+
},
24+
"HTML-CSS": {
25+
showMathMenu: false
26+
}
27+
})
28+
`],
29+
['script', {
30+
src: '//cdn.bootcss.com/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
31+
}],
32+
// 监听路由重新渲染数学公式
33+
['script', {}, `
34+
(function() {
35+
var url1 = window.location.href;
36+
var url2 = window.location.href;
37+
setInterval(function() {
38+
if (url1 === url2) {
39+
url2 = window.location.href;
40+
} else {
41+
url1 = url2;
42+
if (window.MathJax) window.MathJax.Hub.Typeset();
43+
}
44+
}, 200);
45+
})();
46+
`],
47+
['link', {
48+
rel: 'icon',
49+
href: `/logo.png`
50+
}],
51+
['link', {
52+
rel: 'manifest',
53+
href: '/manifest.json'
54+
}],
55+
['meta', {
56+
name: 'theme-color',
57+
content: '#3eaf7c'
58+
}],
59+
['meta', {
60+
name: 'apple-mobile-web-app-capable',
61+
content: 'yes'
62+
}],
63+
['meta', {
64+
name: 'apple-mobile-web-app-status-bar-style',
65+
content: 'black'
66+
}],
67+
['link', {
68+
rel: 'apple-touch-icon',
69+
href: `/icons/apple-touch-icon-152x152.png`
70+
}],
71+
['link', {
72+
rel: 'mask-icon',
73+
href: '/icons/safari-pinned-tab.svg',
74+
color: '#3eaf7c'
75+
}],
76+
['meta', {
77+
name: 'msapplication-TileImage',
78+
content: '/icons/msapplication-icon-144x144.png'
79+
}],
80+
['meta', {
81+
name: 'msapplication-TileColor',
82+
content: '#000000'
83+
}],
84+
// 百度统计
85+
['script', {}, `
86+
(function() {
87+
var onDocumentComplete = function() { 
88+
if (document.readyState =='complete') {
89+
var hm = document.createElement("script");
90+
hm.src = "https://hm.baidu.com/hm.js?a809b6f7e6517af8c15c6076273e80fe";
91+
var s = document.getElementsByTagName("script")[0];
92+
s.parentNode.insertBefore(hm, s);
93+
}
94+
}
95+
document.onreadystatechange = onDocumentComplete; //当页面加载状态改变的时候执行这个方法. 
96+
})();
97+
`],
98+
];

docs/.vuepress/configs/plugins.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = [
2+
['@vuepress/back-to-top', true],
3+
['@vuepress/pwa', {
4+
serviceWorker: true,
5+
updatePopup: {
6+
'/': {
7+
message: "更新了新内容呢!",
8+
buttonText: "立即刷新"
9+
},
10+
'/en/': {
11+
message: "New content is available.",
12+
buttonText: "Refresh"
13+
}
14+
}
15+
}],
16+
['@vuepress/medium-zoom', true],
17+
['container', {
18+
type: 'vue',
19+
before: '<pre class="vue-container"><code>',
20+
after: '</code></pre>',
21+
}],
22+
['container', {
23+
type: 'upgrade',
24+
before: info => `<UpgradePath title="${info}">`,
25+
after: '</UpgradePath>',
26+
}],
27+
];
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = {
2+
logo: {
3+
text: 'NumPy',
4+
subText: '中文网',
5+
image: '/logo.svg'
6+
},
7+
alert: [{
8+
id: '2019-7-29',
9+
title: '文档公告',
10+
content: `我们经常发布文档更新,部分页面的翻译可能仍在进行中。有关最新信息,请访问<a href="/en/">英文文档</a>。如果某个页面上的翻译有问题,请提issues<a href="https://github.com/teadocs/numpy-cn/issues" target="_blank">告诉我们</a>。`
11+
}],
12+
// 评论面板配置
13+
comment: {
14+
title: 'NumPy 爱好者'
15+
},
16+
repo: 'teadocs/numpy-cn',
17+
editLinks: true,
18+
docsDir: 'docs',
19+
locales: {
20+
'/': {
21+
label: '简体中文',
22+
selectText: '选择语言',
23+
editLinkText: '在 GitHub 上编辑此页',
24+
lastUpdated: '上次更新',
25+
nav: require('../nav/zh'),
26+
sidebar: {
27+
'/user/': require('../sidebar/user_zh')(),
28+
'/reference/': require('../sidebar/reference_zh')(),
29+
'/f2py': require('../sidebar/f2py_zh')(),
30+
'/dev': require('../sidebar/dev_zh')(),
31+
'/bedocs': require('../sidebar/bedocs_zh')()
32+
}
33+
},
34+
'/en/': {
35+
label: 'English',
36+
selectText: 'Languages',
37+
editLinkText: 'Edit this page on GitHub',
38+
lastUpdated: 'Last Updated',
39+
nav: require('../nav/en'),
40+
sidebar: {
41+
'/en/user/': require('../sidebar/user_en')(),
42+
'/en/reference/': require('../sidebar/reference_en')(),
43+
'/en/f2py': require('../sidebar/f2py_en')(),
44+
'/en/dev': require('../sidebar/dev_en')(),
45+
'/en/bedocs': require('../sidebar/bedocs_en')()
46+
}
47+
}
48+
}
49+
};

0 commit comments

Comments
 (0)