Skip to content

Commit 5e54f83

Browse files
committed
Revert "docs: upgrade vuepress"
This reverts commit 7808f5c.
1 parent 7808f5c commit 5e54f83

File tree

9 files changed

+6328
-936
lines changed

9 files changed

+6328
-936
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ DPlayer.log*
77
wxw
88
.vscode
99
package-lock.json
10-
docs/.vuepress/dist
11-
docs/.vuepress/.cache
12-
docs/.vuepress/.temp
10+
docs/.vuepress/dist
Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,56 @@
1-
import { defaultTheme } from 'vuepress';
2-
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics';
3-
import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
4-
import { defineUserConfig } from '@vuepress/cli';
5-
import path from 'path';
6-
7-
export default defineUserConfig({
8-
title: 'DPlayer',
9-
description: '🍭 Wow, such a lovely HTML5 danmaku video player',
10-
plugins: [
11-
googleAnalyticsPlugin({
12-
id: 'G-QEBJJDX922',
13-
}),
14-
registerComponentsPlugin({
15-
componentsDir: path.resolve(__dirname, './components'),
16-
}),
17-
],
18-
1+
module.exports = {
2+
plugins: {
3+
'@vuepress/google-analytics': {
4+
ga: 'UA-48084758-9',
5+
},
6+
'@vuepress/pwa': {
7+
serviceWorker: true,
8+
updatePopup: {
9+
'/zh/': {
10+
message: '发现新内容可用',
11+
buttonText: '刷新',
12+
},
13+
'/': {
14+
message: 'New content is available',
15+
buttonText: 'Refresh',
16+
},
17+
},
18+
},
19+
'@vuepress/back-to-top': true,
20+
},
1921
locales: {
2022
'/zh/': {
2123
lang: 'zh-CN',
24+
title: 'DPlayer',
25+
description: '🍭 Wow, such a lovely HTML5 danmaku video player',
2226
},
2327
'/': {
2428
lang: 'en-US',
29+
title: 'DPlayer',
30+
description: '🍭 Wow, such a lovely HTML5 danmaku video player',
2531
},
2632
},
27-
28-
theme: defaultTheme({
29-
repo: 'DIYgod/DPlayer',
33+
head: [
34+
['link', { rel: 'icon', href: `/logo.png` }],
35+
['script', { src: 'https://cdn.jsdelivr.net/npm/flv.js/dist/flv.min.js' }],
36+
['script', { src: 'https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js' }],
37+
['script', { src: 'https://cdn.jsdelivr.net/npm/dashjs/dist/dash.all.min.js' }],
38+
['script', { src: 'https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js' }],
39+
['script', { src: 'https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js' }],
40+
],
41+
theme: 'vuepress-theme-dplayer',
42+
themeConfig: {
43+
repo: 'MoePlayer/DPlayer',
44+
editLinks: true,
3045
docsDir: 'docs',
31-
logo: '/logo.png',
32-
3346
locales: {
3447
'/zh/': {
35-
selectLanguageName: '简体中文',
36-
navbar: [
48+
lang: 'zh-CN',
49+
selectText: '选择语言',
50+
label: '简体中文',
51+
editLinkText: '在 GitHub 上编辑此页',
52+
lastUpdated: '上次更新',
53+
nav: [
3754
{
3855
text: '指南',
3956
link: '/zh/guide/',
@@ -49,8 +66,12 @@ export default defineUserConfig({
4966
],
5067
},
5168
'/': {
52-
selectLanguageName: 'English',
53-
navbar: [
69+
lang: 'en-US',
70+
selectText: 'Languages',
71+
label: 'English',
72+
editLinkText: 'Edit this page on GitHub',
73+
lastUpdated: 'Last Updated',
74+
nav: [
5475
{
5576
text: 'Guide',
5677
link: '/guide/',
@@ -66,14 +87,5 @@ export default defineUserConfig({
6687
],
6788
},
6889
},
69-
}),
70-
71-
head: [
72-
['link', { rel: 'icon', href: `/logo.png` }],
73-
['script', { src: 'https://cdn.jsdelivr.net/npm/flv.js/dist/flv.min.js' }],
74-
['script', { src: 'https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js' }],
75-
['script', { src: 'https://cdn.jsdelivr.net/npm/dashjs/dist/dash.all.min.js' }],
76-
['script', { src: 'https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js' }],
77-
['script', { src: 'https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js' }],
78-
],
79-
});
90+
},
91+
};

docs/.vuepress/init.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/.vuepress/styles/index.scss

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/.vuepress/styles/index.styl

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.navbar .home-link .site-name {
2+
color: #F5712C;
3+
}
4+
5+
.page .custom-block.tip {
6+
border-color: #F5712C;
7+
}
8+
9+
.icon.outbound {
10+
display: none;
11+
}
12+
13+
a {
14+
word-break: break-all;
15+
}
16+
17+
#指南 {
18+
display: none;
19+
}
20+
21+
#guide {
22+
display: none;
23+
}
24+
25+
#app .global-ui .sw-update-popup {
26+
border: 1px solid #F5712C;
27+
}
28+
29+
.routes .sidebar-group-items > li > .sidebar-sub-headers > .sidebar-sub-header > a {
30+
color: $accentColor;
31+
}
32+
33+
#dplayer {
34+
margin-top: -1.5rem;
35+
margin-bottom: 1rem;
36+
}
37+
38+
.hero .description {
39+
display: none;
40+
}
41+
42+
.hero .action {
43+
display: none;
44+
}
45+
46+
.hero.custom .action {
47+
display: block;
48+
}

docs/.vuepress/styles/palette.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$accentColor = #F5712C

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
home: true
3+
actionText: Get Started →
4+
actionLink: /guide/
35
footer: MIT Licensed | Made with love by DIYgod
46
---
57

68
<div>
79
<DPlayer :immediate="true"></DPlayer>
810
</div>
911

10-
<div class="hero custom">
11-
<p class="actions"><a href="/guide/" class="action-button primary" aria-label="Get Started"> Get Started </a></p>
12-
</div>
12+
<div class="hero custom"><p class="action"><router-link to="/guide/" class="nav-link action-button">Get Started →</router-link></p></div>

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"devDependencies": {
4040
"@babel/core": "^7.6.0",
4141
"@babel/preset-env": "^7.4.5",
42-
"@vuepress/client": "2.0.0-beta.49",
43-
"@vuepress/plugin-google-analytics": "2.0.0-beta.49",
44-
"@vuepress/plugin-register-components": "2.0.0-beta.49",
42+
"@vuepress/plugin-back-to-top": "1.9.7",
43+
"@vuepress/plugin-google-analytics": "1.9.7",
44+
"@vuepress/plugin-pwa": "1.9.7",
4545
"art-template": "4.13.2",
4646
"art-template-loader": "1.4.3",
4747
"autoprefixer": "^10.4.8",
@@ -69,8 +69,7 @@
6969
"svg-inline-loader": "0.8.2",
7070
"template-string-optimize-loader": "^3.0.0",
7171
"url-loader": "^4.1.0",
72-
"vue": "^3.2.37",
73-
"vuepress": "2.0.0-beta.49",
72+
"vuepress": "1.9.7",
7473
"webpack": "^5.74.0",
7574
"webpack-cli": "4.10.0",
7675
"webpack-dev-server": "^4.10.0",

0 commit comments

Comments
 (0)