Skip to content

Commit b60b42e

Browse files
committed
chore: 🤖 修改图片地址
1 parent ff40c6a commit b60b42e

File tree

20 files changed

+329
-333
lines changed

20 files changed

+329
-333
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
shell: bash
3939
run: |
4040
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
41-
- name: Setup pnpm cache
41+
- name: Setup pnpm cache
4242
uses: actions/cache@v4
4343
with:
4444
path: ${{ env.STORE_PATH }}

.vitepress/markdown/imagePlugin.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import type MarkdownIt from 'markdown-it';
1+
import type MarkdownIt from 'markdown-it'
22

3-
export default function(md: MarkdownIt) {
3+
export default function (md: MarkdownIt) {
44
md.renderer.rules.image = (...props) => {
5-
const [tokens, idx] = props;
6-
const token = tokens[idx];
7-
const attrs = [];
5+
const [tokens, idx] = props
6+
const token = tokens[idx]
7+
const attrs = []
88
if (token.attrs) {
99
for (const [key, value] of token.attrs) {
1010
if (key === 'alt') {
11-
attrs.push(`${key}="${token.content}"`);
12-
} else {
13-
attrs.push(`${key}="${value}"`);
11+
attrs.push(`${key}="${token.content}"`)
12+
}
13+
else {
14+
attrs.push(`${key}="${value}"`)
1415
}
1516
}
1617
}
17-
return `<ClientOnly><Image ${attrs.join(' ')} :preview-mask="false" /></ClientOnly>`;
18-
};
18+
return `<ClientOnly><Image ${attrs.join(' ')} :preview-mask="false" /></ClientOnly>`
19+
}
1920
}

.vitepress/theme/components/Comment.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
2-
import { nextTick, onMounted, ref, watch } from 'vue'
32
import { useData } from 'vitepress'
3+
import { nextTick, onMounted, ref, watch } from 'vue'
44
55
const utterancesRef = ref()
66
const { theme, isDark } = useData()

.vitepress/theme/components/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
2-
import DefaultTheme from 'vitepress/theme'
32
import { useData, withBase } from 'vitepress'
3+
import DefaultTheme from 'vitepress/theme'
44
import Copyright from './Copyright.vue'
55
66
const { Layout } = DefaultTheme

.vitepress/theme/index.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { Image } from 'ant-design-vue';
2-
import DefaultTheme from 'vitepress/theme';
3-
import Archives from './components/Archives.vue';
4-
import Category from './components/Category.vue';
5-
import Comment from './components/Comment.vue';
6-
import Layout from './components/Layout.vue';
7-
import Page from './components/Page.vue';
8-
import Tags from './components/Tags.vue';
1+
import { Image } from 'ant-design-vue'
2+
import DefaultTheme from 'vitepress/theme'
3+
import Archives from './components/Archives.vue'
4+
import Category from './components/Category.vue'
5+
import Comment from './components/Comment.vue'
6+
import Layout from './components/Layout.vue'
7+
import Page from './components/Page.vue'
8+
import Tags from './components/Tags.vue'
99

10-
import './style.scss';
10+
import './style.scss'
1111

1212
export default {
1313
...DefaultTheme,
1414
Layout,
1515
enhanceApp({ app }) {
1616
// register global component
17-
app.component('Tags', Tags);
18-
app.component('Category', Category);
19-
app.component('Archives', Archives);
20-
app.component('Page', Page);
21-
app.component('Comment', Comment);
17+
app.component('Tags', Tags)
18+
app.component('Category', Category)
19+
app.component('Archives', Archives)
20+
app.component('Page', Page)
21+
app.component('Comment', Comment)
2222
// antd component
23-
app.component('Image', Image);
23+
app.component('Image', Image)
2424
},
25-
};
25+
}

.vitepress/theme/style.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616

1717
.vp-doc {
18-
1918
h1,
2019
h2,
2120
h3,
@@ -99,10 +98,8 @@
9998
font-size: 1em;
10099
color: #777;
101100
}
102-
103101
}
104102

105-
106103
.vp-doc a {
107104
font-weight: 500;
108105
text-decoration: none;
@@ -179,9 +176,8 @@ a[rel~='noreferrer']:visited {
179176
color: var(--vp-c-text-1);
180177
}
181178

182-
183179
.vp-doc {
184180
.ant-image-img {
185181
cursor: pointer;
186182
}
187-
}
183+
}

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import config from '@antfu/eslint-config';
1+
import config from '@antfu/eslint-config'
22

33
export default config({
44
stylistic: true,
@@ -10,4 +10,4 @@ export default config({
1010
html: true,
1111
markdown: 'dprint',
1212
},
13-
});
13+
})

0 commit comments

Comments
 (0)