File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -181,11 +181,16 @@ function handlerReadmeFile(filePath){
181181 directoryPath = matterData . permalink
182182 if ( ! directoryPath ) {
183183 directoryPath = getPermalink ( filePath )
184+ if ( matterData . createAt ) {
185+ matterData . createAt = getReallyContent ( matterData . createAt ) ;
186+ }
187+ if ( matterData . updateAt ) {
188+ matterData . updateAt = getReallyContent ( matterData . updateAt ) ;
189+ }
184190 matterData . permalink = directoryPath
185191 // 不存在permalink
186192 // 需要改动下readme的内容
187193 const newFileContent = jsonToYaml . stringify ( matterData ) . replace ( / \n \s { 2 } / g, "\n" ) . replace ( / " / g, "" ) + '---' + os . EOL + content ;
188- console . log ( '==jsonToYaml.stringify(matterData)' , jsonToYaml . stringify ( matterData ) )
189194 fs . writeFileSync ( readmePath , newFileContent ) ;
190195 }
191196 }
You can’t perform that action at this time.
0 commit comments