Skip to content

Commit

Permalink
chore: upgrade vuepress
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Dec 31, 2024
1 parent c30b822 commit 5f03e41
Show file tree
Hide file tree
Showing 9 changed files with 1,743 additions and 916 deletions.
1 change: 1 addition & 0 deletions docs/.vuepress/components/Sponsor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
justify-content: center;
width: auto;
margin: 0;
margin-bottom: 1em;
}
.sponsor img {
width: 180px;
Expand Down
5 changes: 5 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
import { sitemapPlugin } from '@vuepress/plugin-sitemap'
import { umamiAnalyticsPlugin } from 'vuepress-plugin-umami-analytics'
import { viteBundler } from '@vuepress/bundler-vite'
import { shikiPlugin } from '@vuepress/plugin-shiki'

import customTheme from './theme'

Expand Down Expand Up @@ -49,6 +50,10 @@ const plugins: PluginConfig = [
registerComponentsPlugin({
componentsDir: path.resolve(__dirname, './components'),
}),
shikiPlugin({
// 配置项
langs: ['ts', 'json', 'bash', 'shell', 'yaml', 'js', 'json5', 'html', 'ini', 'toml', 'md'],
}),
]

if (process.env.NODE_ENV === 'production') {
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/advance/surge-advance.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Surge 没有原生提供对 SSR 的支持 ~~(将来也不太可能)~~ ,但

找到 `surgio.conf.js`,补充如下字段:

```js{3-6}
```js {3-6}
module.exports = {
// ...
binPath: {
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/client/clash.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rules:
我们利用 `getClashNodes`([文档](/guide/custom-template.md#getclashnodes))来获取完整的节点信息,然后把它转换成 JSON 格式。

```yaml{7}
```yaml {7}
allow-lan: true
mode: Rule
external-controller: 127.0.0.1:7892
Expand All @@ -55,7 +55,7 @@ rules:

Clash 的 Proxy Group 有多种类型,这里分别举例。代码中的 `getClashNodeNames`([文档](/guide/custom-template.md#getclashnodenames))用于获取节点名。

```yaml{9-23}
```yaml {9-23}
allow-lan: true
mode: Rule
external-controller: 127.0.0.1:7892
Expand Down Expand Up @@ -87,7 +87,7 @@ rules:

下面例子中使用了本地和远程的规则片段,你可以在文档中找到对应的配置方法,或是在初始的仓库中找到相似的代码供参考。

```yaml{1,27-42}
```yaml {1,27-42}
{% import './snippet/blocked_rules.tpl' as blocked_rules %}
allow-lan: true
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/client/sing-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sidebarDepth: 1

## 编写 Artifact

```js{9-26}
```js {9-26}
const { extendOutbounds } = require('surgio');

module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/custom-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ http-response ^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/w

_for Surge_

```{4}
```txt {4}
{% import './snippet/surge_script.tpl' as surge_script %}
[Script]
Expand All @@ -724,7 +724,7 @@ _for Surge_

_for Quantumult X_

```{4}
```txt {4}
{% import './snippet/surge_script.tpl' as surge_script %}
[rewrite_local]
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Surgio 生成出的规则就是「产品」。

## 目录结构

```txt{5,6,7}
```txt {5,6,7}
./my-rule-store
├── node_modules
├── package-lock.json
Expand Down
42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"docs:dev": "NODE_ENV=development vuepress dev docs",
"docs:build": "NODE_ENV=production vuepress build docs",
"release": "bumpp && npm publish",
"release:beta": "bumpp --preid beta --no-push && npm publish --tag beta"
"release:beta": "bumpp --preid beta --no-push && npm publish --tag beta",
"check-vuepress-version": "ncu -f \"*vuepress*\" --interactive --target @next -p pnpm"
},
"oclif": {
"bin": "surgio",
Expand Down Expand Up @@ -146,17 +147,18 @@
"@types/urlsafe-base64": "^1.0.31",
"@typescript-eslint/eslint-plugin": "^7",
"@typescript-eslint/parser": "^7",
"@vuepress/bundler-vite": "2.0.0-rc.10",
"@vuepress/client": "2.0.0-rc.10",
"@vuepress/core": "2.0.0-rc.10",
"@vuepress/markdown": "2.0.0-rc.10",
"@vuepress/plugin-docsearch": "2.0.0-rc.26",
"@vuepress/plugin-google-analytics": "2.0.0-rc.21",
"@vuepress/plugin-register-components": "2.0.0-rc.21",
"@vuepress/plugin-sitemap": "2.0.0-rc.26",
"@vuepress/shared": "2.0.0-rc.10",
"@vuepress/theme-default": "2.0.0-rc.26",
"@vuepress/utils": "2.0.0-rc.10",
"@vuepress/bundler-vite": "2.0.0-rc.19",
"@vuepress/client": "2.0.0-rc.19",
"@vuepress/core": "2.0.0-rc.19",
"@vuepress/markdown": "2.0.0-rc.19",
"@vuepress/plugin-docsearch": "2.0.0-rc.68",
"@vuepress/plugin-google-analytics": "2.0.0-rc.66",
"@vuepress/plugin-register-components": "2.0.0-rc.66",
"@vuepress/plugin-shiki": "2.0.0-rc.68",
"@vuepress/plugin-sitemap": "2.0.0-rc.68",
"@vuepress/shared": "2.0.0-rc.19",
"@vuepress/theme-default": "2.0.0-rc.68",
"@vuepress/utils": "2.0.0-rc.19",
"ava": "^5.3.1",
"benchmark": "^2.1.4",
"bumpp": "^9.4.0",
Expand All @@ -183,16 +185,16 @@
"sinon": "^15.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vue": "^3.4.21",
"vuepress": "2.0.0-rc.10",
"vue": "^3.5.0",
"vuepress": "2.0.0-rc.19",
"vuepress-plugin-umami-analytics": "1.8.1"
},
"resolutions": {
"@vuepress/client": "2.0.0-rc.10",
"@vuepress/core": "2.0.0-rc.10",
"@vuepress/markdown": "2.0.0-rc.10",
"@vuepress/utils": "2.0.0-rc.10",
"vuepress": "2.0.0-rc.10"
"@vuepress/client": "2.0.0-rc.19",
"@vuepress/core": "2.0.0-rc.19",
"@vuepress/markdown": "2.0.0-rc.19",
"@vuepress/utils": "2.0.0-rc.19",
"vuepress": "2.0.0-rc.19"
},
"ava": {
"failFast": false,
Expand Down Expand Up @@ -246,4 +248,4 @@
"vuepress-plugin-umami-analytics@1.8.1": "patches/vuepress-plugin-umami-analytics@1.8.1.patch"
}
}
}
}
Loading

0 comments on commit 5f03e41

Please sign in to comment.