3
3
import os .path
4
4
from sys import argv
5
5
6
- Site = collections .namedtuple ('Site' , ('input_path' , 'output_path' , 'title' , 'search_properties' ))
6
+ Site = collections .namedtuple ('Site' , ('input_path' , 'output_path' , 'title' , 'search_properties' , 'canonical' ))
7
7
8
8
# Build directory name will be the name of Makefile recipe
9
9
BUILD_DIR = argv [1 ]
12
12
Site ('./src/html/cloud.html' ,
13
13
os .path .join (BUILD_DIR , 'cloud' , 'index.html' ),
14
14
'Cloud Products — MongoDB Documentation' ,
15
- 'atlas-master,mms-onprem-current,mms-cloud-master,stitch-master' ),
15
+ 'atlas-master,mms-onprem-current,mms-cloud-master,stitch-master' ,
16
+ 'cloud' ),
16
17
Site ('./src/html/tools.html' ,
17
18
os .path .join (BUILD_DIR , 'tools' , 'index.html' ),
18
19
'MongoDB Tools — MongoDB Documentation' ,
19
- 'bi-connector-current,spark-connector-current,compass-master' ),
20
+ 'bi-connector-current,spark-connector-current,compass-master' ,
21
+ 'tools' ),
20
22
]
21
23
22
24
@@ -37,6 +39,7 @@ def build_individual(template: str, site: Site) -> None:
37
39
file_contents = file_contents .replace ('{projectTitle}' , project_title )
38
40
file_contents = file_contents .replace ('{searchProperties}' , site .search_properties )
39
41
file_contents = file_contents .replace ('{body}' , html )
42
+ file_contents = file_contents .replace ('{canonical}' , site .canonical )
40
43
41
44
# Write the output file
42
45
with open (site .output_path , 'w' ) as out_file :
0 commit comments