@@ -215,7 +215,7 @@ def create_function(self, function_name):
215
215
216
216
return function
217
217
218
- def create_article (self , article_name , article_parent_path = '' , custom_web_path = False ):
218
+ def create_article (self , article_name , article_parent_path = '' , custom_web_path = False , custom_web_title = False ):
219
219
article_real_path = os .path .join (DOCS_REPO_PATH , 'articles' , article_parent_path , article_name , f"article.yaml" )
220
220
article = utils .load_and_validate_yaml (article_real_path , self .schema_article )
221
221
@@ -226,7 +226,10 @@ def create_article(self, article_name, article_parent_path='', custom_web_path=F
226
226
227
227
article_template = self .input_env .get_template ('article.html' )
228
228
article ["html_content" ] = markdown .markdown (article ['content' ])
229
- html_content = self .render_page (article ['title' ], article_template .render (article = article ))
229
+ html_content = self .render_page (
230
+ custom_web_title or article ['title' ],
231
+ article_template .render (article = article )
232
+ )
230
233
if custom_web_path :
231
234
web_path = custom_web_path
232
235
else :
@@ -431,7 +434,7 @@ def create_pages(self):
431
434
432
435
def create_item (item ):
433
436
if 'article' in item :
434
- self .create_article (item ['article' ]['name' ], item ['article' ]['folder' ], item ['path_html' ])
437
+ self .create_article (item ['article' ]['name' ], item ['article' ]['folder' ], item ['path_html' ], item [ "name" ] )
435
438
elif 'category' in item :
436
439
self .create_category (item ['path_html' ], item ['category' ])
437
440
0 commit comments