File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 7
7
editTextMap ,
8
8
feedbackLinkMap ,
9
9
footerTextMap ,
10
+ gitTimestampMap ,
10
11
headDescriptionMap ,
11
12
languageMap ,
12
13
searchPlaceholderMap ,
@@ -135,6 +136,23 @@ const themeConfig = {
135
136
) ;
136
137
} ,
137
138
} ,
139
+ gitTimestamp ( { timestamp } ) {
140
+ const { locale } = useRouter ( ) ;
141
+ const lastUpdatedOn = useLocalesMap ( gitTimestampMap ) ;
142
+
143
+ return (
144
+ < >
145
+ { lastUpdatedOn } { " " }
146
+ < time dateTime = { timestamp . toISOString ( ) } >
147
+ { timestamp . toLocaleDateString ( locale , {
148
+ day : "numeric" ,
149
+ month : "long" ,
150
+ year : "numeric" ,
151
+ } ) }
152
+ </ time >
153
+ </ >
154
+ ) ;
155
+ } ,
138
156
i18n : Object . entries ( languageMap ) . map ( ( [ locale , text ] ) => ( {
139
157
locale,
140
158
text,
Original file line number Diff line number Diff line change @@ -115,3 +115,9 @@ export const searchPlaceholderMap = {
115
115
ko : "문서 검색..." ,
116
116
ru : "Искать в документации..." ,
117
117
} ;
118
+
119
+ /** @type {Readonly<Record<Locale, string>> } */
120
+ export const gitTimestampMap = {
121
+ "en-US" : "Last updated on" ,
122
+ ru : "Последнее обновление" ,
123
+ } ;
You can’t perform that action at this time.
0 commit comments