mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
Use versions.json file and move versioned, translated docs into translated_docs
This commit is contained in:
parent
d3e3d209a4
commit
67592dcf8a
4 changed files with 21 additions and 34 deletions
|
@ -106,9 +106,9 @@ function execute() {
|
|||
|
||||
let file;
|
||||
if (metadata.version) {
|
||||
if (ENABLE_TRANSLATION) {
|
||||
if (ENABLE_TRANSLATION && metadata.language !== "en") {
|
||||
file =
|
||||
CWD + "/versioned_docs/" + metadata.language + "/" + metadata.source;
|
||||
CWD + "/translated_docs/" + metadata.language + "/" + metadata.source;
|
||||
} else {
|
||||
file = CWD + "/versioned_docs/" + metadata.source;
|
||||
}
|
||||
|
@ -120,9 +120,11 @@ function execute() {
|
|||
CWD + "/translated_docs/" + metadata.language + "/" + metadata.source;
|
||||
}
|
||||
}
|
||||
|
||||
if (!fs.existsSync(file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
let rawContent = readMetadata.extractMetadata(fs.readFileSync(file, "utf8"))
|
||||
.rawContent;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue