mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Merge pull request #217 from JoelMarcey/custom-docs-subdir
Allow custom path for the location of documentation
This commit is contained in:
commit
8d14f8fb02
8 changed files with 44 additions and 16 deletions
|
@ -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"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue