@@ -445,28 +445,6 @@ def create_category(self, web_path, category_data):
445445
446446 self .logger .info (f"Generated { output_path } for category { category_name } " )
447447
448- def create_misc_pages (self ):
449-
450- # Predefined articles
451- self .create_article ('privacy' )
452-
453- other_pages = [
454- {
455- 'path_html' : '404.html' ,
456- 'template' : '404.html' ,
457- },
458- ]
459-
460- for page in other_pages :
461- template = self .input_env .get_template (page ['template' ])
462- html_content = self .render_page (page ['path_html' ], template .render ())
463-
464- output_path = os .path .join (OUTPUT_HTML_PATH , page ['path_html' ])
465- with open (output_path , 'w' ) as html_file :
466- html_file .write (html_content )
467-
468- self .logger .info (f"Generated { output_path } for { page ['path_html' ]} " )
469-
470448 def create_pages (self ):
471449 self .navigation = [
472450 {
@@ -478,25 +456,25 @@ def create_pages(self):
478456 },
479457 },
480458 {
481- 'name' : 'Guides ' ,
459+ 'name' : 'Articles ' ,
482460 'subitems' : [
483461 {
484- 'name' : 'Official guides ' ,
485- 'path_html' : '/guides/ official' ,
462+ 'name' : 'Official articles ' ,
463+ 'path_html' : '/official' ,
486464 'category' : {
487- 'name' : 'Official guides ' ,
465+ 'name' : 'Official articles ' ,
488466 'articles' : {
489- 'path' : 'official-guides ' ,
467+ 'path' : 'official' ,
490468 },
491469 },
492470 },
493471 {
494- 'name' : 'Community guides ' ,
495- 'path_html' : '/guides/ community' ,
472+ 'name' : 'Community articles ' ,
473+ 'path_html' : '/community' ,
496474 'category' : {
497- 'name' : 'Community guides ' ,
475+ 'name' : 'Community articles ' ,
498476 'articles' : {
499- 'path' : 'community-guides ' ,
477+ 'path' : 'community' ,
500478 },
501479 },
502480 },
@@ -602,7 +580,28 @@ def create_item(item):
602580 for function in self .functions :
603581 self .create_function_page (function )
604582
605- self .create_misc_pages ()
583+
584+ # Other types of articles
585+ self .create_article ('privacy' )
586+
587+ # Official articles
588+ self .create_article ('OOP_Introduction' , 'official' )
589+
590+ other_pages = [
591+ {
592+ 'path_html' : '404.html' ,
593+ 'template' : '404.html' ,
594+ },
595+ ]
596+ for page in other_pages :
597+ template = self .input_env .get_template (page ['template' ])
598+ html_content = self .render_page (page ['path_html' ], template .render ())
599+
600+ output_path = os .path .join (OUTPUT_HTML_PATH , page ['path_html' ])
601+ with open (output_path , 'w' ) as html_file :
602+ html_file .write (html_content )
603+
604+ self .logger .info (f"Generated { output_path } for { page ['path_html' ]} " )
606605
607606 def copy_assets (self ):
608607
0 commit comments