mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
Update CNAME file generation
This commit is contained in:
parent
3c2b585a60
commit
c0792044b2
1 changed files with 4 additions and 11 deletions
|
@ -386,17 +386,10 @@ function execute() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Generate CNAME file if the domain is custom */
|
/* Generate CNAME file if a custom domain is specified in siteConfig */
|
||||||
if (!siteConfig.url.includes("github.io")) { // github.io urls are not custom
|
if (siteConfig.cname) {
|
||||||
let cname = siteConfig.url;
|
let targetFile = CWD + "/build/" + siteConfig.projectName + "/CNAME";
|
||||||
let targetFile =
|
fs.writeFileSync(targetFile, siteConfig.cname);
|
||||||
__dirname +
|
|
||||||
"/../../build" +
|
|
||||||
"/" +
|
|
||||||
siteConfig.projectName +
|
|
||||||
"/" +
|
|
||||||
"CNAME";
|
|
||||||
fs.writeFileSync(targetFile, cname);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue