Merge pull request #217 from JoelMarcey/custom-docs-subdir

Allow custom path for the location of documentation
This commit is contained in:
Eric Nakagawa 2017-11-13 13:50:39 -08:00 committed by GitHub
commit 8d14f8fb02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 16 deletions

View file

@ -129,7 +129,7 @@ function execute() {
}
} else {
if (metadata.language === "en") {
file = CWD + "/../docs/" + metadata.source;
file = CWD + "/../" + readMetadata.getDocsPath() + "/" + metadata.source;
} else {
file =
CWD + "/translated_docs/" + metadata.language + "/" + metadata.source;
@ -219,9 +219,9 @@ function execute() {
});
// copy docs assets if they exist
if (fs.existsSync(CWD + "/../docs/assets")) {
if (fs.existsSync(CWD + "/../" + readMetadata.getDocsPath() + "/assets")) {
fs.copySync(
CWD + "/../docs/assets",
CWD + "/../" + readMetadata.getDocsPath() + "/assets",
CWD + "/build/" + siteConfig.projectName + "/docs/assets"
);
}