valaxy 0.15.3 → 0.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/App.vue +17 -9
- package/client/composables/widgets/aplayer.ts +1 -1
- package/client/composables/widgets/codepen.ts +1 -1
- package/client/locales/en.yml +6 -0
- package/client/locales/zh-CN.yml +6 -0
- package/client/modules/schemaOrg.ts +1 -1
- package/client/styles/common/code.scss +35 -0
- package/client/styles/components/custom-block.scss +0 -1
- package/dist/chunk-APBMT6DR.cjs +128 -0
- package/dist/chunk-URU76UTL.mjs +129 -0
- package/dist/{config-9f7e02a4.d.ts → config-29a16f62.d.ts} +9 -1
- package/dist/node/cli.cjs +1 -1
- package/dist/node/cli.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +7 -5
- package/types/config.ts +9 -1
- package/types/default-theme.d.ts +1 -0
- package/dist/chunk-MKCRUHWU.cjs +0 -128
- package/dist/chunk-MYBVUVA6.mjs +0 -129
package/client/App.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, onBeforeMount } from 'vue'
|
|
3
|
-
import { useHead, useSeoMeta } from '@
|
|
3
|
+
import { useHead, useSeoMeta } from '@unhead/vue'
|
|
4
4
|
|
|
5
5
|
// @ts-expect-error virtual module
|
|
6
6
|
import ValaxyUserApp from '/@valaxyjs/UserAppVue'
|
|
@@ -9,7 +9,7 @@ import ValaxyUserApp from '/@valaxyjs/UserAppVue'
|
|
|
9
9
|
import ValaxyThemeApp from '/@valaxyjs/ThemeAppVue'
|
|
10
10
|
import pkg from 'valaxy/package.json'
|
|
11
11
|
import { useI18n } from 'vue-i18n'
|
|
12
|
-
import { definePerson, defineWebPage, defineWebSite, useSchemaOrg } from '@
|
|
12
|
+
import { definePerson, defineWebPage, defineWebSite, useSchemaOrg } from '@unhead/schema-org'
|
|
13
13
|
import dayjs from 'dayjs'
|
|
14
14
|
import ValaxyAddons from './components/ValaxyAddons.vue'
|
|
15
15
|
import { isDark, useFrontmatter } from './composables'
|
|
@@ -55,6 +55,12 @@ useHead({
|
|
|
55
55
|
content: `Valaxy ${pkg.version}`,
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
|
+
|
|
59
|
+
templateParams: {
|
|
60
|
+
schemaOrg: {
|
|
61
|
+
host: siteConfig.value.url,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
58
64
|
})
|
|
59
65
|
|
|
60
66
|
// seo
|
|
@@ -65,25 +71,27 @@ const description = computed(() => fm.value.excerpt || fm.value.description || s
|
|
|
65
71
|
useSeoMeta({
|
|
66
72
|
description,
|
|
67
73
|
ogDescription: description,
|
|
68
|
-
ogLocale: computed(() => fm.value.lang || siteConfig.value.lang),
|
|
74
|
+
ogLocale: computed(() => locale.value || fm.value.lang || siteConfig.value.lang || 'en'),
|
|
75
|
+
ogLocaleAlternate: computed(() => siteConfig.value.languages.filter(l => l !== locale.value)),
|
|
69
76
|
ogSiteName: computed(() => siteConfig.value.title),
|
|
70
77
|
ogTitle: computed(() => fm.value.title || siteConfig.value.title),
|
|
71
78
|
ogImage: computed(() => fm.value.ogImage || fm.value.cover || siteConfig.value.favicon),
|
|
79
|
+
ogType: 'website',
|
|
72
80
|
ogUrl: siteUrl,
|
|
73
81
|
})
|
|
74
82
|
|
|
75
83
|
// for SEO
|
|
76
84
|
useSchemaOrg([
|
|
77
|
-
// https://unhead
|
|
85
|
+
// https://unhead.unjs.io/guide/guides/identity.html
|
|
78
86
|
// Personal Website or Blog
|
|
79
87
|
definePerson({
|
|
80
|
-
name:
|
|
81
|
-
url: siteUrl,
|
|
82
|
-
image:
|
|
83
|
-
sameAs:
|
|
88
|
+
name: siteConfig.value.author.name,
|
|
89
|
+
url: siteUrl.value,
|
|
90
|
+
image: siteConfig.value.author.avatar,
|
|
91
|
+
sameAs: siteConfig.value.social.map(s => s.link),
|
|
84
92
|
}),
|
|
85
93
|
defineWebSite({
|
|
86
|
-
name: title,
|
|
94
|
+
name: title.value,
|
|
87
95
|
datePublished: computed(() => fm.value.date),
|
|
88
96
|
dateModified: computed(() => fm.value.updated),
|
|
89
97
|
}),
|
package/client/locales/en.yml
CHANGED
|
@@ -6,6 +6,7 @@ button:
|
|
|
6
6
|
toggle_light: Switch to light mode
|
|
7
7
|
toggle_dark: Switch to dark mode
|
|
8
8
|
toggle_langs: Change languages
|
|
9
|
+
appearance: Appearance
|
|
9
10
|
intro:
|
|
10
11
|
desc: Theme Yun | Valaxy
|
|
11
12
|
hi: Hi, {name}!
|
|
@@ -19,6 +20,7 @@ title:
|
|
|
19
20
|
gallery: Gallery
|
|
20
21
|
|
|
21
22
|
menu:
|
|
23
|
+
title: Menu
|
|
22
24
|
home: Home
|
|
23
25
|
archives: Archives
|
|
24
26
|
categories: Categories
|
|
@@ -29,6 +31,7 @@ menu:
|
|
|
29
31
|
sidebar:
|
|
30
32
|
overview: Overview
|
|
31
33
|
toc: Table of Contents
|
|
34
|
+
return_top: Return to top
|
|
32
35
|
|
|
33
36
|
post:
|
|
34
37
|
decrypt: DECRYPT
|
|
@@ -104,3 +107,6 @@ time:
|
|
|
104
107
|
hour: 1 Hour | {count} Hours
|
|
105
108
|
minute: 1 Minute | {count} Minutes
|
|
106
109
|
second: 1 Second | {count} Seconds
|
|
110
|
+
|
|
111
|
+
tooltip:
|
|
112
|
+
last_updated: Last updated
|
package/client/locales/zh-CN.yml
CHANGED
|
@@ -6,6 +6,7 @@ button:
|
|
|
6
6
|
toggle_light: 切换亮色模式
|
|
7
7
|
toggle_dark: 切换深色模式
|
|
8
8
|
toggle_langs: 切换语言
|
|
9
|
+
appearance: 外观
|
|
9
10
|
intro:
|
|
10
11
|
desc: 主题 Yun
|
|
11
12
|
hi: 你好,{name}
|
|
@@ -19,6 +20,7 @@ title:
|
|
|
19
20
|
gallery: 图片库
|
|
20
21
|
|
|
21
22
|
menu:
|
|
23
|
+
title: 菜单
|
|
22
24
|
home: 首页
|
|
23
25
|
archives: 归档
|
|
24
26
|
categories: 分类
|
|
@@ -29,6 +31,7 @@ menu:
|
|
|
29
31
|
sidebar:
|
|
30
32
|
overview: 站点概览
|
|
31
33
|
toc: 文章目录
|
|
34
|
+
return_top: 返回顶部
|
|
32
35
|
|
|
33
36
|
post:
|
|
34
37
|
decrypt: 解密
|
|
@@ -103,3 +106,6 @@ time:
|
|
|
103
106
|
hour: 1 小时 | {count} 小时
|
|
104
107
|
minute: 1 分 | {count} 分
|
|
105
108
|
second: 1 秒 | {count} 秒
|
|
109
|
+
|
|
110
|
+
tooltip:
|
|
111
|
+
last_updated: 最后更新于
|
|
@@ -9,7 +9,7 @@ export const install: UserModule = async ({ head, isClient, router }) => {
|
|
|
9
9
|
|
|
10
10
|
const valaxyConfig = initValaxyConfig()
|
|
11
11
|
|
|
12
|
-
const { SchemaOrgUnheadPlugin } = await import('@
|
|
12
|
+
const { SchemaOrgUnheadPlugin } = await import('@unhead/schema-org')
|
|
13
13
|
head?.use(SchemaOrgUnheadPlugin({
|
|
14
14
|
// config
|
|
15
15
|
host: valaxyConfig.value.siteConfig.url || 'https://valaxy.site',
|
|
@@ -190,3 +190,38 @@ html:not(.dark) .vp-code-dark {
|
|
|
190
190
|
opacity: 0;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
// diff
|
|
195
|
+
.markdown-body {
|
|
196
|
+
[class*='language-'] code .diff {
|
|
197
|
+
transition: background-color 0.5s;
|
|
198
|
+
margin: 0 -24px;
|
|
199
|
+
padding: 0 24px;
|
|
200
|
+
width: calc(100% + 2 * 24px);
|
|
201
|
+
display: inline-block;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
[class*='language-'] code .diff::before {
|
|
205
|
+
position: absolute;
|
|
206
|
+
left: 10px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[class*='language-'] code .diff.remove {
|
|
210
|
+
background-color: var(--va-code-line-diff-remove-color);
|
|
211
|
+
opacity: 0.7;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
[class*='language-'] code .diff.remove::before {
|
|
215
|
+
content: '-';
|
|
216
|
+
color: var(--va-code-line-diff-remove-symbol-color);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[class*='language-'] code .diff.add {
|
|
220
|
+
background-color: var(--va-code-line-diff-add-color);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[class*='language-'] code .diff.add::before {
|
|
224
|
+
content: '+';
|
|
225
|
+
color: var(--va-code-line-diff-add-symbol-color);
|
|
226
|
+
}
|
|
227
|
+
}
|