File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,13 +73,30 @@ export function getCustomFields() {
7373
7474 let websiteFields = { } ;
7575 try {
76- const websiteFilePath = path . join ( path . dirname ( path . dirname ( pwd ) ) , 'website' , 'package.json' ) ;
76+ const websiteFilePath = path . join (
77+ path . dirname ( path . dirname ( pwd ) ) ,
78+ "website" ,
79+ "config" ,
80+ "website-templates.json" ,
81+ ) ;
7782 // console.log(filePath);
7883 const websiteFileContent = fs . readFileSync ( websiteFilePath ) ;
7984 const websitePackageJson = JSON . parse ( websiteFileContent . toString ( ) ) ;
80- websiteFields = websitePackageJson ?. websiteConfig ?? { } ;
85+ websiteFields = websitePackageJson ?? { } ;
8186 } catch ( error ) {
82- // Most probably there is no website/package.json.
87+ try {
88+ const websiteFilePath = path . join (
89+ path . dirname ( path . dirname ( pwd ) ) ,
90+ "website" ,
91+ "package.json" ,
92+ ) ;
93+ // console.log(filePath);
94+ const websiteFileContent = fs . readFileSync ( websiteFilePath ) ;
95+ const websitePackageJson = JSON . parse ( websiteFileContent . toString ( ) ) ;
96+ websiteFields = websitePackageJson ?. websiteConfig ?? { } ;
97+ } catch ( error ) {
98+ // Most probably there is no website/package.json.
99+ }
83100 }
84101
85102 return {
You can’t perform that action at this time.
0 commit comments