File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ function getContent(filename, data) {
8686 */
8787function updateContent ( modified , removed ) {
8888 const file = String ( fs . readFileSync ( `${ articlePath } /mkdocs.yml` ) ) ;
89- const data = YAML . parse ( file ) ;
89+ const data = YAML . parse ( file . replaceAll ( '!!python/name:' , '' ) ) ;
9090 let ops = [ ] ;
9191 modified . forEach ( ( filename ) => {
9292 ops . push ( { index : { _index : 'oiwiki' , _type : 'article' , _id : filename } } ) ;
@@ -160,7 +160,7 @@ function init() {
160160 exec ( `curl -X DELETE "http://${ esHost } /oiwiki"` ) ;
161161 let modified = [ ] ;
162162 const file = String ( fs . readFileSync ( `${ articlePath } /mkdocs.yml` ) ) ;
163- const data = YAML . parse ( file ) ;
163+ const data = YAML . parse ( file . replaceAll ( '!!python/name:' , '' ) ) ;
164164 traversalArticle ( data [ 'nav' ] , ( key , value ) => modified . push ( value ) ) ;
165165 updateContent ( modified , [ ] ) ;
166166}
You can’t perform that action at this time.
0 commit comments