@@ -22,12 +22,17 @@ import {
2222 NolebaseGitChangelogPlugin ,
2323} from '@nolebase/vitepress-plugin-git-changelog/client'
2424
25+ import {
26+ NolebasePagePropertiesPlugin ,
27+ } from '@nolebase/vitepress-plugin-page-properties/client'
28+
2529import 'virtual:uno.css'
2630
2731import '@nolebase/vitepress-plugin-enhanced-readabilities/dist/style.css'
2832import '@nolebase/vitepress-plugin-inline-link-preview/dist/style.css'
2933import '@nolebase/vitepress-plugin-highlight-targeted-heading/dist/style.css'
3034import '@nolebase/vitepress-plugin-git-changelog/client/style.css'
35+ import '@nolebase/vitepress-plugin-page-properties/client/style.css'
3136
3237import './styles/vars.css'
3338import './styles/main.css'
@@ -55,7 +60,6 @@ export const Theme: ThemeConfig = {
5560 app . component ( 'HomeContent' , HomeContent )
5661
5762 app . use ( NolebaseInlineLinkPreviewPlugin )
58- app . use ( NolebaseGitChangelogPlugin )
5963
6064 app . provide ( NolebaseEnhancedReadabilitiesInjectionKey , {
6165 layoutSwitch : {
@@ -66,6 +70,7 @@ export const Theme: ThemeConfig = {
6670 } ,
6771 } )
6872
73+ app . use ( NolebaseGitChangelogPlugin )
6974 app . provide ( NolebaseGitChangelogInjectionKey , {
7075 mapContributors : [
7176 {
@@ -82,6 +87,80 @@ export const Theme: ThemeConfig = {
8287 } ,
8388 ] ,
8489 } )
90+
91+ app . use ( NolebasePagePropertiesPlugin < {
92+ tags : string [ ]
93+ authors : string [ ]
94+ progress : string [ ]
95+ createdAt : string
96+ updatedAt : string
97+ url1 : string
98+ } > ( ) , {
99+ properties : {
100+ 'en' : [
101+ {
102+ key : 'tags' ,
103+ type : 'tags' ,
104+ title : 'Tags' ,
105+ } ,
106+ {
107+ key : 'progress' ,
108+ type : 'progress' ,
109+ title : 'Progress' ,
110+ } ,
111+ {
112+ key : 'createdAt' ,
113+ type : 'datetime' ,
114+ title : 'Created at' ,
115+ formatAsFrom : true ,
116+ dateFnsLocaleName : 'enUS' ,
117+ } ,
118+ {
119+ key : 'updatedAt' ,
120+ type : 'datetime' ,
121+ title : 'Updated at' ,
122+ formatAsFrom : true ,
123+ dateFnsLocaleName : 'enUS' ,
124+ } ,
125+ {
126+ key : 'url1' ,
127+ type : 'link' ,
128+ title : 'URL 1' ,
129+ } ,
130+ ] ,
131+ 'zh-CN' : [
132+ {
133+ key : 'tags' ,
134+ type : 'tags' ,
135+ title : '标签' ,
136+ } ,
137+ {
138+ key : 'progress' ,
139+ type : 'progress' ,
140+ title : '进度' ,
141+ } ,
142+ {
143+ key : 'createdAt' ,
144+ type : 'datetime' ,
145+ title : '创建时间' ,
146+ formatAsFrom : true ,
147+ dateFnsLocaleName : 'zhCN' ,
148+ } ,
149+ {
150+ key : 'updatedAt' ,
151+ type : 'datetime' ,
152+ title : '更新时间' ,
153+ formatAsFrom : true ,
154+ dateFnsLocaleName : 'zhCN' ,
155+ } ,
156+ {
157+ key : 'url1' ,
158+ type : 'link' ,
159+ title : '链接 1' ,
160+ } ,
161+ ] ,
162+ } ,
163+ } )
85164 } ,
86165}
87166
0 commit comments