valaxy 0.15.10 → 0.15.11

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.
@@ -1,228 +1,11 @@
1
- export { F as FuseListItem, P as PartialDeep, R as RuntimeConfig, S as SiteConfig, b as SocialLink, U as UserSiteConfig, c as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-29a16f62.js';
1
+ import { b as Post } from '../config-e5704a2c.js';
2
+ export { A as Album, E as ExcerptType, F as FuseListItem, h as Page, f as PageFrontMatter, P as PartialDeep, e as Photo, g as PostFrontMatter, R as RuntimeConfig, S as SiteConfig, c as SocialLink, U as UserSiteConfig, d as UserValaxyConfig, a as ValaxyAddon, V as ValaxyConfig } from '../config-e5704a2c.js';
2
3
  import * as DefaultTheme from 'valaxy/default-theme';
3
4
  export { DefaultTheme };
4
5
  import 'medium-zoom';
5
6
  import '@vueuse/integrations/useFuse';
6
7
  import 'vanilla-lazyload';
7
8
 
8
- interface Album {
9
- /**
10
- * @description:en-US Album Link
11
- */
12
- url: string;
13
- /**
14
- * @description:en-US Album cover
15
- * url
16
- */
17
- cover: string;
18
- /**
19
- * @description:en-US Album caption
20
- */
21
- caption: string;
22
- /**
23
- * @description:en-US Album description
24
- */
25
- desc: string;
26
- }
27
- interface Photo {
28
- src: string;
29
- caption: string;
30
- desc: string;
31
- }
32
- type ExcerptType = 'md' | 'html' | 'text' | 'ai';
33
- interface PageFrontMatter extends Record<string, any> {
34
- /**
35
- * Path of post
36
- * route.path
37
- * @description 路径
38
- */
39
- path: string;
40
- /**
41
- * Title
42
- * @description 文章标题
43
- */
44
- title: string;
45
- date: string | number | Date;
46
- /**
47
- * Updated Time
48
- */
49
- updated: string | number | Date;
50
- /**
51
- * i18n
52
- */
53
- lang: string;
54
- /**
55
- * TODO
56
- * Read Time
57
- * @description 阅读时长
58
- */
59
- duration: string;
60
- /**
61
- * @description Author
62
- * @description:zh-CN 作者
63
- */
64
- author: string;
65
- /**
66
- * Display sponsor info
67
- * @description 是否开启赞助
68
- */
69
- sponsor: boolean;
70
- /**
71
- * Copyright
72
- * @description 是否显示文章底部版权信息
73
- */
74
- copyright: boolean;
75
- /**
76
- * cover
77
- * @description 封面图片
78
- */
79
- cover: string;
80
- /**
81
- * display toc
82
- * @description 是否显示目录
83
- */
84
- toc: boolean;
85
- /**
86
- * display right sidebar
87
- * @description 是否显示右侧侧边栏
88
- */
89
- aside: boolean;
90
- /**
91
- * enable markdown-body class
92
- * @description 是否启用默认的 markdown 样式
93
- */
94
- markdown: boolean;
95
- /**
96
- * icon before title
97
- */
98
- icon: string;
99
- /**
100
- * title color
101
- */
102
- color: string;
103
- /**
104
- * display comment
105
- */
106
- comment: boolean;
107
- /**
108
- * post is end
109
- * @description 是否完结,将在末尾添加衬线字体 Q.E.D.
110
- */
111
- end: boolean;
112
- /**
113
- * use aplayer
114
- */
115
- aplayer: boolean;
116
- /**
117
- * use katex
118
- */
119
- katex: boolean;
120
- /**
121
- * use codepen
122
- */
123
- codepen: boolean;
124
- /**
125
- * use medium-zoom
126
- * @url https://github.com/francoischalifour/medium-zoom
127
- */
128
- medium_zoom: boolean;
129
- /**
130
- * @description:en-US Albums
131
- * @description:zh-CN 相册
132
- */
133
- albums: Album[];
134
- /**
135
- * For layout Gallery
136
- * @description:en-US Photos
137
- */
138
- photos: Photo[];
139
- /**
140
- * @description:zh-CN 是否启用加密,password 存在时默认为 true
141
- */
142
- encrypt: boolean;
143
- /**
144
- * @description:zh-CN 加密密码
145
- */
146
- password?: string;
147
- /**
148
- * @description:zh-CN 相册密码
149
- */
150
- gallery_password?: string;
151
- /**
152
- * @description:zh-CN 加密后的内容
153
- */
154
- encryptedContent?: string;
155
- /**
156
- * @description:zh-CN 加密后的相册
157
- */
158
- encryptedPhotos?: string;
159
- }
160
- interface PostFrontMatter extends PageFrontMatter {
161
- /**
162
- * post card type, can be bilibili/yuque/...
163
- */
164
- type: string;
165
- /**
166
- * override url, and jump directly
167
- */
168
- url: string;
169
- /**
170
- * @description 摘要
171
- */
172
- excerpt: string;
173
- /**
174
- * @default 'html'
175
- * render type of excerpt
176
- * - md: render as raw markdown
177
- * - html: render as html
178
- * - text: render as text
179
- */
180
- excerpt_type: 'md' | 'text' | 'html' | 'ai';
181
- /**
182
- * Category
183
- * @description 分类,若为数组,则按顺序代表多层文件夹
184
- */
185
- categories: string | string[];
186
- /**
187
- * Tags
188
- * @description 标签,可以有多个
189
- */
190
- tags: string[];
191
- /**
192
- * display prev next
193
- * @description 是否显示前一篇、后一篇导航
194
- */
195
- nav: boolean;
196
- /**
197
- * 置顶
198
- */
199
- top: number;
200
- /**
201
- * is draft
202
- * @description 是否为草稿
203
- */
204
- draft: boolean;
205
- /**
206
- * hide in index
207
- * - true/`all`: hide in index & archive
208
- * - `index`: hide in index
209
- * @description 是否隐藏
210
- */
211
- hide: 'index' | boolean;
212
- /**
213
- * when the post is updated more than 30 days ago, show a warning
214
- * default 30 days, you can set `time_warning` in frontmatter to change it
215
- *
216
- * @zh
217
- * 当文章更新时间超过 30 天时,显示一个警告
218
- * 默认 30 天,你可以在 frontmatter 中设置 `time_warning` (数字)来修改,单位 ms
219
- * @example 3600000
220
- */
221
- time_warning: boolean | number;
222
- }
223
- type Page = Partial<PageFrontMatter>;
224
- type Post = Partial<PostFrontMatter>;
225
-
226
9
  type CleanUrlsMode = 'disabled' | 'without-subfolders' | 'with-subfolders';
227
10
  interface Header {
228
11
  /**
@@ -268,4 +51,4 @@ interface PageDataPayload {
268
51
  }
269
52
  type HeadConfig = [string, Record<string, string>] | [string, Record<string, string>, string];
270
53
 
271
- export { Album, CleanUrlsMode, ExcerptType, HeadConfig, Header, Page, PageData, PageDataPayload, PageFrontMatter, Photo, Post, PostFrontMatter };
54
+ export { CleanUrlsMode, HeadConfig, Header, PageData, PageDataPayload, Post };
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{e}from"../chunk-GY4S4RDR.mjs";e();e();e();e();e();e();
2
+ import{e as t}from"../chunk-GY4S4RDR.mjs";t();t();t();t();t();t();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.15.10",
4
+ "version": "0.15.11",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -30,6 +30,7 @@
30
30
  "require": "./dist/node/index.cjs"
31
31
  },
32
32
  "./types": "./dist/types/index.d.ts",
33
+ "./default-theme": "./types/default-theme.d.ts",
33
34
  "./*": "./*"
34
35
  },
35
36
  "main": "dist/node/index.cjs",
@@ -58,9 +59,9 @@
58
59
  "@iconify-json/ri": "^1.1.12",
59
60
  "@intlify/unplugin-vue-i18n": "^1.4.0",
60
61
  "@types/body-scroll-lock": "^3.1.1",
61
- "@unhead/addons": "^1.7.4",
62
- "@unhead/schema-org": "^1.7.4",
63
- "@unhead/vue": "^1.7.4",
62
+ "@unhead/addons": "^1.8.0",
63
+ "@unhead/schema-org": "^1.8.0",
64
+ "@unhead/vue": "^1.8.0",
64
65
  "@vitejs/plugin-vue": "^4.4.0",
65
66
  "@vueuse/core": "^10.5.0",
66
67
  "@vueuse/integrations": "^10.5.0",
@@ -70,7 +71,7 @@
70
71
  "cross-spawn": "^7.0.3",
71
72
  "css-i18n": "^0.0.2",
72
73
  "dayjs": "^1.11.10",
73
- "defu": "^6.1.2",
74
+ "defu": "^6.1.3",
74
75
  "ejs": "^3.1.9",
75
76
  "escape-html": "^1.0.3",
76
77
  "feed": "^4.2.2",
@@ -99,20 +100,20 @@
99
100
  "pascalcase": "^2.0.0",
100
101
  "pinia": "^2.1.7",
101
102
  "qrcode": "^1.5.3",
102
- "sass": "^1.69.4",
103
+ "sass": "^1.69.5",
103
104
  "shiki": "^0.14.5",
104
105
  "star-markdown-css": "^0.4.2",
105
106
  "unconfig": "^0.3.11",
106
- "unocss": "^0.56.5",
107
+ "unocss": "^0.57.1",
107
108
  "unplugin-vue-components": "^0.25.2",
108
109
  "vanilla-lazyload": "^17.8.5",
109
110
  "vite": "^4.5.0",
110
111
  "vite-plugin-pages": "^0.31.0",
111
112
  "vite-plugin-vue-layouts": "^0.8.0",
112
- "vite-ssg": "0.23.3",
113
+ "vite-ssg": "0.23.4",
113
114
  "vite-ssg-sitemap": "0.6.0",
114
- "vue": "^3.3.6",
115
- "vue-i18n": "^9.5.0",
115
+ "vue": "^3.3.7",
116
+ "vue-i18n": "^9.6.1",
116
117
  "vue-router": "^4.2.5",
117
118
  "yargs": "^17.7.2"
118
119
  },
@@ -128,7 +129,7 @@
128
129
  "@types/ejs": "^3.1.4",
129
130
  "@types/html-to-text": "^9.0.3",
130
131
  "@types/katex": "^0.16.5",
131
- "@types/markdown-it": "^13.0.4",
132
+ "@types/markdown-it": "^13.0.5",
132
133
  "@types/nprogress": "^0.2.2",
133
134
  "@types/pascalcase": "^1.0.2",
134
135
  "@types/qrcode": "^1.5.4",
package/types/config.ts CHANGED
@@ -3,6 +3,7 @@ import type { FuseOptions } from '@vueuse/integrations/useFuse'
3
3
  import type { ILazyLoadOptions } from 'vanilla-lazyload'
4
4
  import type * as DefaultTheme from 'valaxy/default-theme'
5
5
  import type { ValaxyAddon } from '../types'
6
+ import type { PostFrontMatter } from './posts'
6
7
  import type { FuseListItem } from './node'
7
8
 
8
9
  export interface SocialLink {
@@ -157,6 +158,11 @@ export interface SiteConfig {
157
158
  }
158
159
  }
159
160
 
161
+ /**
162
+ * set post default frontmatter
163
+ */
164
+ frontmatter: Partial<PostFrontMatter>
165
+
160
166
  /**
161
167
  * comment: waline/...
162
168
  */