valaxy 0.27.0 → 0.28.0-beta.2

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.
Files changed (49) hide show
  1. package/client/components/AppLink.vue +4 -0
  2. package/client/components/ClientOnly.ts +12 -0
  3. package/client/components/ValaxyDynamicComponent.vue +22 -14
  4. package/client/components/ValaxyLogo.vue +1 -1
  5. package/client/components/ValaxyOverlay.vue +1 -1
  6. package/client/composables/codeGroups.ts +3 -3
  7. package/client/composables/collections.ts +101 -2
  8. package/client/composables/common.ts +6 -5
  9. package/client/composables/dark.ts +1 -1
  10. package/client/composables/features/collapse-code.ts +1 -1
  11. package/client/composables/features/copy-markdown.ts +85 -0
  12. package/client/composables/features/index.ts +1 -0
  13. package/client/composables/outline/anchor.ts +1 -1
  14. package/client/composables/post/index.ts +104 -2
  15. package/client/config.ts +4 -2
  16. package/client/entry-ssr.ts +25 -0
  17. package/client/layouts/README.md +1 -1
  18. package/client/locales/en.yml +12 -0
  19. package/client/locales/zh-CN.yml +12 -0
  20. package/client/main.ts +122 -24
  21. package/client/modules/components.ts +2 -2
  22. package/client/modules/floating-vue.ts +2 -3
  23. package/client/modules/valaxy.ts +2 -3
  24. package/client/setup/main.ts +2 -3
  25. package/client/setups.ts +24 -3
  26. package/client/styles/common/code.scss +8 -8
  27. package/client/styles/common/hamburger.scss +2 -2
  28. package/client/styles/common/markdown.scss +2 -2
  29. package/client/styles/common/transition.scss +2 -2
  30. package/client/styles/components/code-group.scss +2 -2
  31. package/client/styles/components/custom-block.scss +1 -1
  32. package/client/styles/css-vars.scss +7 -6
  33. package/client/styles/vars.scss +4 -3
  34. package/client/tsconfig.json +1 -1
  35. package/client/types/collection.ts +27 -0
  36. package/client/types/index.ts +2 -2
  37. package/client/utils/time.ts +1 -1
  38. package/dist/node/cli/index.mjs +14 -9
  39. package/dist/node/index.d.mts +216 -11
  40. package/dist/node/index.mjs +19 -10
  41. package/dist/shared/{valaxy.DpV6HHc6.mjs → valaxy.DXqMwOZX.mjs} +4034 -2514
  42. package/dist/shared/{valaxy._i636HSR.d.mts → valaxy.JIuR8V4d.d.mts} +111 -2
  43. package/dist/types/index.d.mts +2 -2
  44. package/index.d.ts +1 -0
  45. package/package.json +36 -36
  46. package/shared/node/i18n.ts +15 -1
  47. package/types/config.ts +74 -0
  48. package/types/frontmatter/page.ts +6 -1
  49. package/types/posts.ts +9 -1
@@ -27,6 +27,18 @@ interface CollectionConfig {
27
27
  description?: string;
28
28
  categories?: string[];
29
29
  tags?: string[];
30
+ /**
31
+ * @en Whether to show collection as a single collapsed entry in homepage/archive lists.
32
+ * When true (default), a synthetic collection card is added to the post list,
33
+ * representing all articles in the collection as one entry.
34
+ * When false, no synthetic entry is added.
35
+ * @zh 是否在首页/归档列表中以单个条目展示合集。
36
+ * 为 true(默认)时,合集以一张卡片出现在文章列表中,
37
+ * 代表合集内的所有文章。
38
+ * 为 false 时,不添加合集条目。
39
+ * @default true
40
+ */
41
+ collapse?: boolean;
30
42
  /**
31
43
  * items
32
44
  */
@@ -38,6 +50,20 @@ interface CollectionConfig {
38
50
  * 对应路径为 `/collections/${key}/${item.key}`
39
51
  */
40
52
  key?: string;
53
+ /**
54
+ * @en
55
+ * Link to an existing page or external URL.
56
+ * Internal links (starting with `/`) use `<RouterLink>`.
57
+ * External links (e.g. `https://...`) open in a new tab.
58
+ * Mutually exclusive with `key` — if both are set, `link` takes precedence.
59
+ *
60
+ * @zh
61
+ * 链接到已有页面或外部 URL。
62
+ * 内部链接(以 `/` 开头)使用 `<RouterLink>`。
63
+ * 外部链接(如 `https://...`)在新标签页中打开。
64
+ * 与 `key` 互斥——若同时设置,`link` 优先。
65
+ */
66
+ link?: string;
41
67
  }[];
42
68
  }
43
69
 
@@ -187,7 +213,12 @@ interface PageFrontMatter extends BaseFrontMatter {
187
213
  */
188
214
  end: boolean;
189
215
  /**
190
- * use katex
216
+ * Enable/disable KaTeX math rendering for this page.
217
+ * Overrides the global `features.katex` setting.
218
+ *
219
+ * - When `features.katex: true` (default), set `katex: false` to disable KaTeX for this page.
220
+ * - When `features.katex: false`, set `katex: true` to enable KaTeX for this page.
221
+ *
191
222
  * @url https://katex.org/
192
223
  */
193
224
  katex: boolean;
@@ -353,7 +384,14 @@ interface PostFrontMatter extends PageFrontMatter {
353
384
  }
354
385
 
355
386
  type Page = Partial<PageFrontMatter>;
356
- type Post = Partial<PostFrontMatter>;
387
+ type Post = Partial<PostFrontMatter> & {
388
+ /**
389
+ * Runtime-only field set by `mergeCollapsedCollections`.
390
+ * Present when this post entry represents a collapsed collection.
391
+ * @internal
392
+ */
393
+ _collection?: CollectionConfig;
394
+ };
357
395
 
358
396
  /**
359
397
  * Extend vue-router's RouteMeta interface
@@ -649,6 +687,34 @@ interface SiteConfig {
649
687
  keys: FuseOptions<FuseListItem>['keys'];
650
688
  };
651
689
  };
690
+ /**
691
+ * Excerpt configuration
692
+ * @description:en-US Global excerpt settings for posts
693
+ * @description:zh-CN 全局摘要配置
694
+ */
695
+ excerpt: {
696
+ /**
697
+ * @description:en-US Default excerpt render type for `<!-- more -->` and auto-generated excerpts.
698
+ * Can be overridden per-post via frontmatter `excerpt_type`.
699
+ * Does not apply when frontmatter `excerpt` is set manually (used as-is).
700
+ * @description:zh-CN `<!-- more -->` 及自动摘要的默认渲染类型,可通过 frontmatter `excerpt_type` 逐篇覆盖。
701
+ * 当 frontmatter 手动指定 `excerpt` 时不生效(直接使用原始字符串)。
702
+ * @default 'html'
703
+ */
704
+ type: ExcerptType;
705
+ /**
706
+ * @description:en-US Auto-generate excerpt from post content when no manual excerpt is provided
707
+ * @description:zh-CN 当没有手动指定摘要时,自动从文章内容截取摘要
708
+ * @default false
709
+ */
710
+ auto: boolean;
711
+ /**
712
+ * @description:en-US Maximum length of auto-generated excerpt (in characters)
713
+ * @description:zh-CN 自动摘要的最大长度(字符数)
714
+ * @default 200
715
+ */
716
+ length: number;
717
+ };
652
718
  /**
653
719
  * set post default frontmatter
654
720
  */
@@ -807,6 +873,49 @@ interface SiteConfig {
807
873
  * @description:zh-CN 限制代码块的高度,单位是 px
808
874
  */
809
875
  codeHeightLimit?: number;
876
+ /**
877
+ * @zh llms.txt 及原始 Markdown 文件输出
878
+ * @en llms.txt and raw Markdown file output
879
+ * @see https://llmstxt.org/
880
+ */
881
+ llms: {
882
+ /**
883
+ * @zh 是否开启 llms.txt 和 .md 原始文件输出
884
+ * @en Enable llms.txt and raw .md file output
885
+ * @default false
886
+ */
887
+ enable: boolean;
888
+ /**
889
+ * @zh 是否生成 llms-full.txt(包含所有文章完整内容)
890
+ * @en Whether to generate llms-full.txt (with all post content inlined)
891
+ * @default true
892
+ */
893
+ fullText: boolean;
894
+ /**
895
+ * @zh 是否为每篇文章生成独立的 .md 文件(可通过 /posts/xxx.md 访问)
896
+ * @en Whether to generate individual .md files for each post (accessible via /posts/xxx.md)
897
+ * @default true
898
+ */
899
+ files: boolean;
900
+ /**
901
+ * @zh 自定义提示词(添加到 llms.txt blockquote 部分)
902
+ * @en Custom prompt text (added to the llms.txt blockquote section)
903
+ * @default ''
904
+ */
905
+ prompt: string;
906
+ /**
907
+ * @zh 要包含的 markdown 文件 glob 模式(相对于 pages/ 目录)。
908
+ * 默认为 `['posts\/**\/*.md']` 仅包含 posts。
909
+ * 设为 `['**\/*.md']` 可包含所有 pages 下的 markdown 文件。
910
+ * 也可以指定多个目录,如 `['posts\/**\/*.md', 'guide\/**\/*.md']`。
911
+ * @en Glob patterns for markdown files to include (relative to pages/ directory).
912
+ * Defaults to `['posts\/**\/*.md']` to only include posts.
913
+ * Set to `['**\/*.md']` to include all markdown files under pages/.
914
+ * You can also specify multiple directories, e.g. `['posts\/**\/*.md', 'guide\/**\/*.md']`.
915
+ * @default ['posts\/**\/*.md']
916
+ */
917
+ include?: string[];
918
+ };
810
919
  /**
811
920
  * @description:en-US client redirect rules
812
921
  * @description:zh-CN 客户端重定向规则
@@ -1,5 +1,5 @@
1
- import { c as Post } from '../shared/valaxy._i636HSR.mjs';
2
- export { A as Album, B as BaseFrontMatter, D as DefaultTheme, E as ExcerptType, F as FuseListItem, d as Page, e as PageFrontMatter, P as PartialDeep, f as Photo, g as Pkg, h as PostFrontMatter, a as RedirectItem, i as RedirectRule, R as RuntimeConfig, S as SiteConfig, j as SocialLink, U as UserSiteConfig, k as UserValaxyConfig, b as ValaxyAddon, V as ValaxyConfig } from '../shared/valaxy._i636HSR.mjs';
1
+ import { c as Post } from '../shared/valaxy.JIuR8V4d.mjs';
2
+ export { A as Album, B as BaseFrontMatter, D as DefaultTheme, E as ExcerptType, F as FuseListItem, d as Page, e as PageFrontMatter, P as PartialDeep, f as Photo, g as Pkg, h as PostFrontMatter, a as RedirectItem, i as RedirectRule, R as RuntimeConfig, S as SiteConfig, j as SocialLink, U as UserSiteConfig, k as UserValaxyConfig, b as ValaxyAddon, V as ValaxyConfig } from '../shared/valaxy.JIuR8V4d.mjs';
3
3
  import { Header } from '@valaxyjs/utils';
4
4
  import '@vueuse/integrations/useFuse';
5
5
  import 'medium-zoom';
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // re-export @vueuse/shared types. with strict installers like pnpm, user won't
2
2
  // be able to reference @vueuse/shared in project root.
3
3
  /// <reference types="@vueuse/shared" />
4
+ /// <reference types="vite/client" />
4
5
 
5
6
  export * from './client/index'
6
7
  export * from './dist/node/index.mjs'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.27.0",
4
+ "version": "0.28.0-beta.2",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -62,32 +62,32 @@
62
62
  "dependencies": {
63
63
  "@antfu/install-pkg": "^1.1.0",
64
64
  "@antfu/utils": "^9.3.0",
65
- "@clack/prompts": "^1.0.0",
66
- "@iconify-json/ri": "^1.2.9",
67
- "@intlify/unplugin-vue-i18n": "^11.0.3",
68
- "@shikijs/transformers": "^3.22.0",
65
+ "@clack/prompts": "^1.1.0",
66
+ "@iconify-json/ri": "^1.2.10",
67
+ "@intlify/unplugin-vue-i18n": "^11.0.7",
68
+ "@shikijs/transformers": "^3.23.0",
69
69
  "@types/katex": "^0.16.8",
70
- "@unhead/addons": "^2.1.2",
71
- "@unhead/schema-org": "^2.1.2",
72
- "@unhead/vue": "^2.1.2",
73
- "@vitejs/plugin-vue": "^6.0.4",
70
+ "@unhead/addons": "^2.1.12",
71
+ "@unhead/schema-org": "^2.1.12",
72
+ "@unhead/vue": "^2.1.12",
73
+ "@vitejs/plugin-vue": "^6.0.5",
74
74
  "@vue/devtools-api": "7.7.2",
75
- "@vueuse/core": "^14.2.0",
76
- "@vueuse/integrations": "^14.2.0",
75
+ "@vueuse/core": "^14.2.1",
76
+ "@vueuse/integrations": "^14.2.1",
77
77
  "beasties": "^0.4.1",
78
78
  "consola": "^3.4.2",
79
79
  "cross-spawn": "^7.0.6",
80
80
  "css-i18n": "^0.0.5",
81
- "dayjs": "^1.11.19",
81
+ "dayjs": "^1.11.20",
82
82
  "debug": "^4.4.3",
83
83
  "define-config-ts": "^0.1.3",
84
84
  "defu": "^6.1.4",
85
- "ejs": "^4.0.1",
85
+ "ejs": "^5.0.1",
86
86
  "escape-html": "^1.0.3",
87
87
  "fast-glob": "^3.3.3",
88
88
  "feed": "^5.2.0",
89
89
  "floating-vue": "^5.2.2",
90
- "fs-extra": "^11.3.3",
90
+ "fs-extra": "^11.3.4",
91
91
  "fuse.js": "^7.1.0",
92
92
  "gray-matter": "^4.0.3",
93
93
  "hookable": "^6.0.1",
@@ -95,9 +95,9 @@
95
95
  "jiti": "^2.6.1",
96
96
  "js-base64": "^3.7.8",
97
97
  "js-yaml": "^4.1.1",
98
- "katex": "^0.16.28",
99
- "lru-cache": "^11.2.5",
100
- "markdown-it": "^14.1.0",
98
+ "katex": "^0.16.38",
99
+ "lru-cache": "^11.2.6",
100
+ "markdown-it": "^14.1.1",
101
101
  "markdown-it-anchor": "^9.2.0",
102
102
  "markdown-it-async": "^2.2.0",
103
103
  "markdown-it-attrs": "^4.3.1",
@@ -108,38 +108,40 @@
108
108
  "markdown-it-table-of-contents": "^1.1.0",
109
109
  "markdown-it-task-lists": "^2.1.1",
110
110
  "medium-zoom": "^1.1.0",
111
- "mermaid": "^11.12.2",
112
- "mlly": "^1.8.0",
111
+ "mermaid": "^11.13.0",
112
+ "minisearch": "^7.2.0",
113
+ "mlly": "^1.8.1",
113
114
  "nprogress": "^0.2.0",
114
115
  "open": "10.1.0",
115
- "ora": "^9.1.0",
116
+ "ora": "^9.3.0",
117
+ "p-map": "^7.0.4",
116
118
  "pascalcase": "^2.0.0",
117
119
  "pathe": "^2.0.3",
118
120
  "pinia": "^3.0.4",
119
121
  "qrcode": "^1.5.4",
120
122
  "resolve-global": "^2.0.0",
121
- "sass": "^1.97.3",
122
- "shiki": "^3.22.0",
123
+ "sass": "^1.98.0",
124
+ "shiki": "^3.23.0",
123
125
  "star-markdown-css": "^0.5.3",
124
126
  "table": "^6.9.0",
125
- "unhead": "^2.1.2",
127
+ "unhead": "^2.1.12",
126
128
  "unocss": "66.5.10",
127
129
  "unplugin-vue-components": "28.0.0",
128
- "unplugin-vue-markdown": "^29.2.0",
130
+ "unplugin-vue-markdown": "^30.0.0",
129
131
  "vanilla-lazyload": "^19.1.3",
130
- "vite": "^7.3.1",
132
+ "vite": "^8.0.0",
131
133
  "vite-dev-rpc": "^1.1.0",
132
- "vite-plugin-vue-devtools": "^8.0.5",
133
- "vite-plugin-vue-layouts": "^0.11.0",
134
- "vite-ssg": "^28.2.2",
134
+ "vite-plugin-vue-devtools": "^8.1.0",
135
+ "vite-plugin-vue-layouts-next": "^2.0.1",
136
+ "vite-ssg": "^28.3.0",
135
137
  "vite-ssg-sitemap": "^0.10.0",
136
138
  "vitepress-plugin-group-icons": "^1.7.1",
137
139
  "vue": "3.5.22",
138
- "vue-i18n": "^11.2.8",
139
- "vue-router": "^5.0.2",
140
+ "vue-i18n": "^11.3.0",
141
+ "vue-router": "^5.0.3",
140
142
  "yargs": "^18.0.0",
141
- "@valaxyjs/utils": "0.27.0",
142
- "@valaxyjs/devtools": "0.27.0"
143
+ "@valaxyjs/devtools": "0.28.0-beta.2",
144
+ "@valaxyjs/utils": "0.28.0-beta.2"
143
145
  },
144
146
  "devDependencies": {
145
147
  "@mdit-vue/plugin-component": "^3.0.2",
@@ -160,12 +162,10 @@
160
162
  "@types/pascalcase": "^1.0.3",
161
163
  "@types/qrcode": "^1.5.6",
162
164
  "@types/yargs": "^17.0.35",
163
- "cilicili": "^0.1.1",
164
- "diacritics": "^1.3.0",
165
165
  "gh-pages": "^6.3.0",
166
166
  "https-localhost": "^4.7.1",
167
- "p-map": "^7.0.4",
168
- "rollup-plugin-visualizer": "^6.0.5",
167
+ "nanoid": "^5.1.6",
168
+ "rollup-plugin-visualizer": "^7.0.1",
169
169
  "unbuild": "^3.6.1"
170
170
  },
171
171
  "scripts": {
@@ -11,10 +11,23 @@ export const NODE_I18N: {
11
11
  locales: {},
12
12
  }
13
13
 
14
+ /**
15
+ * Track which paths have already been loaded to avoid redundant I/O.
16
+ */
17
+ const _loadedPaths = new Set<string>()
18
+
14
19
  /**
15
20
  * 读取翻译 yml 文件
21
+ *
22
+ * Results are cached by resolved path — subsequent calls with the same
23
+ * `localesPath` return the existing `NODE_I18N.locales` without re-reading
24
+ * the filesystem. Pass `force = true` to bypass the cache (e.g. after
25
+ * the user edits a locale file).
16
26
  */
17
- export function loadLocalesYml(localesPath: string): Record<string, any> {
27
+ export function loadLocalesYml(localesPath: string, force = false): Record<string, any> {
28
+ if (!force && _loadedPaths.has(localesPath))
29
+ return NODE_I18N.locales
30
+
18
31
  /**
19
32
  * read locales dir *.yml
20
33
  */
@@ -39,6 +52,7 @@ export function loadLocalesYml(localesPath: string): Record<string, any> {
39
52
 
40
53
  // cache
41
54
  NODE_I18N.locales = locales
55
+ _loadedPaths.add(localesPath)
42
56
  return locales
43
57
  }
44
58
 
package/types/config.ts CHANGED
@@ -5,6 +5,7 @@ import type { RouteRecordRaw } from 'vue-router'
5
5
  import type { ValaxyAddon } from './addon'
6
6
  import type { DefaultTheme } from './default-theme'
7
7
  import type { PostFrontMatter } from './frontmatter'
8
+ import type { ExcerptType } from './frontmatter/post'
8
9
  import type { FuseListItem } from './node'
9
10
 
10
11
  import './default-theme'
@@ -222,6 +223,35 @@ export interface SiteConfig {
222
223
  }
223
224
  }
224
225
 
226
+ /**
227
+ * Excerpt configuration
228
+ * @description:en-US Global excerpt settings for posts
229
+ * @description:zh-CN 全局摘要配置
230
+ */
231
+ excerpt: {
232
+ /**
233
+ * @description:en-US Default excerpt render type for `<!-- more -->` and auto-generated excerpts.
234
+ * Can be overridden per-post via frontmatter `excerpt_type`.
235
+ * Does not apply when frontmatter `excerpt` is set manually (used as-is).
236
+ * @description:zh-CN `<!-- more -->` 及自动摘要的默认渲染类型,可通过 frontmatter `excerpt_type` 逐篇覆盖。
237
+ * 当 frontmatter 手动指定 `excerpt` 时不生效(直接使用原始字符串)。
238
+ * @default 'html'
239
+ */
240
+ type: ExcerptType
241
+ /**
242
+ * @description:en-US Auto-generate excerpt from post content when no manual excerpt is provided
243
+ * @description:zh-CN 当没有手动指定摘要时,自动从文章内容截取摘要
244
+ * @default false
245
+ */
246
+ auto: boolean
247
+ /**
248
+ * @description:en-US Maximum length of auto-generated excerpt (in characters)
249
+ * @description:zh-CN 自动摘要的最大长度(字符数)
250
+ * @default 200
251
+ */
252
+ length: number
253
+ }
254
+
225
255
  /**
226
256
  * set post default frontmatter
227
257
  */
@@ -396,6 +426,50 @@ export interface SiteConfig {
396
426
  */
397
427
  codeHeightLimit?: number
398
428
 
429
+ /**
430
+ * @zh llms.txt 及原始 Markdown 文件输出
431
+ * @en llms.txt and raw Markdown file output
432
+ * @see https://llmstxt.org/
433
+ */
434
+ llms: {
435
+ /**
436
+ * @zh 是否开启 llms.txt 和 .md 原始文件输出
437
+ * @en Enable llms.txt and raw .md file output
438
+ * @default false
439
+ */
440
+ enable: boolean
441
+ /**
442
+ * @zh 是否生成 llms-full.txt(包含所有文章完整内容)
443
+ * @en Whether to generate llms-full.txt (with all post content inlined)
444
+ * @default true
445
+ */
446
+ fullText: boolean
447
+ /**
448
+ * @zh 是否为每篇文章生成独立的 .md 文件(可通过 /posts/xxx.md 访问)
449
+ * @en Whether to generate individual .md files for each post (accessible via /posts/xxx.md)
450
+ * @default true
451
+ */
452
+ files: boolean
453
+ /**
454
+ * @zh 自定义提示词(添加到 llms.txt blockquote 部分)
455
+ * @en Custom prompt text (added to the llms.txt blockquote section)
456
+ * @default ''
457
+ */
458
+ prompt: string
459
+ /**
460
+ * @zh 要包含的 markdown 文件 glob 模式(相对于 pages/ 目录)。
461
+ * 默认为 `['posts\/**\/*.md']` 仅包含 posts。
462
+ * 设为 `['**\/*.md']` 可包含所有 pages 下的 markdown 文件。
463
+ * 也可以指定多个目录,如 `['posts\/**\/*.md', 'guide\/**\/*.md']`。
464
+ * @en Glob patterns for markdown files to include (relative to pages/ directory).
465
+ * Defaults to `['posts\/**\/*.md']` to only include posts.
466
+ * Set to `['**\/*.md']` to include all markdown files under pages/.
467
+ * You can also specify multiple directories, e.g. `['posts\/**\/*.md', 'guide\/**\/*.md']`.
468
+ * @default ['posts\/**\/*.md']
469
+ */
470
+ include?: string[]
471
+ }
472
+
399
473
  /**
400
474
  * @description:en-US client redirect rules
401
475
  * @description:zh-CN 客户端重定向规则
@@ -159,7 +159,12 @@ export interface PageFrontMatter extends BaseFrontMatter {
159
159
  end: boolean
160
160
 
161
161
  /**
162
- * use katex
162
+ * Enable/disable KaTeX math rendering for this page.
163
+ * Overrides the global `features.katex` setting.
164
+ *
165
+ * - When `features.katex: true` (default), set `katex: false` to disable KaTeX for this page.
166
+ * - When `features.katex: false`, set `katex: true` to enable KaTeX for this page.
167
+ *
163
168
  * @url https://katex.org/
164
169
  */
165
170
  katex: boolean
package/types/posts.ts CHANGED
@@ -1,4 +1,12 @@
1
+ import type { CollectionConfig } from '../client/types'
1
2
  import type { PageFrontMatter, PostFrontMatter } from './frontmatter'
2
3
 
3
4
  export type Page = Partial<PageFrontMatter>
4
- export type Post = Partial<PostFrontMatter>
5
+ export type Post = Partial<PostFrontMatter> & {
6
+ /**
7
+ * Runtime-only field set by `mergeCollapsedCollections`.
8
+ * Present when this post entry represents a collapsed collection.
9
+ * @internal
10
+ */
11
+ _collection?: CollectionConfig
12
+ }