@@ -90,9 +90,9 @@ def h4(name: str) -> str:
9090
9191
9292class HTMLGenerator (Generator ):
93- def __init__ (self , parsers : List [Parser ], output : str , ark_version : str ):
93+ def __init__ (self , parsers : List [Parser ], output : str , ark_version : str , root : str ):
9494 super ().__init__ (
95- parsers , spec .HTML_TEMPLATE_FOLDER , "*.html" , output , ark_version
95+ parsers , spec .HTML_TEMPLATE_FOLDER , "*.html" , output , ark_version , root
9696 )
9797
9898 self .footer = f"<i>Last generation at { datetime .now ()} </i>"
@@ -111,18 +111,19 @@ def generate_index(self):
111111 f"Welcome! This is the official documentation for ArkScript { self .version } "
112112 + html .ul (
113113 [
114- html .a (file .path , f"/{ self .version } /{ file .path } .html" )
114+ html .a (file .path , f"{ self . root } /{ self .version } /{ file .path } .html" )
115115 for file in self .list .files
116116 ]
117117 ),
118118 )
119119
120120 content = self .templates ["index.html" ]
121121 content = content .format (
122+ root = self .root ,
122123 page_title = f"ArkScript { self .version } documentation" ,
123- home_link = f"/{ self .version } " ,
124+ home_link = f"{ self . root } /{ self .version } " ,
124125 has_banner = "has-banner" ,
125- banner = self .templates ["banner.html" ],
126+ banner = self .templates ["banner.html" ]. format ( root = self . root ) ,
126127 table_of_content = "" ,
127128 navigation_links = "" ,
128129 sections = sections ,
@@ -180,8 +181,9 @@ def generate_one(self, path: str, functions: List[spec.Function]):
180181
181182 content = self .templates ["index.html" ]
182183 content = content .format (
184+ root = self .root ,
183185 page_title = f"{ path } - ArkScript { self .version } documentation" ,
184- home_link = f"/{ self .version } " ,
186+ home_link = f"{ self . root } /{ self .version } " ,
185187 has_banner = "" ,
186188 banner = "" ,
187189 table_of_content = table_of_content ,
0 commit comments