Skip to content

Commit

Permalink
fix: docusaurus-version generates wrong metadata
Browse files Browse the repository at this point in the history
Fix #1140 

Regression from #1125
  • Loading branch information
endiliey authored Dec 4, 2018
1 parent 7a0ff33 commit cb1395e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions v1/lib/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ files.forEach(file => {

const docsDir = path.join(CWD, '../', readMetadata.getDocsPath());
const subDir = utils.getSubDir(file, docsDir);
const originalId = subDir ? `${subDir}/${metadata.id}` : metadata.id;
if (!versionFallback.diffLatestDoc(file, originalId)) {
const docId = subDir ? `${subDir}/${metadata.id}` : metadata.id;
if (!versionFallback.diffLatestDoc(file, docId)) {
return;
}

metadata.original_id = originalId;
metadata.id = `version-${version}-${originalId}`;
metadata.original_id = metadata.id;
metadata.id = `version-${version}-${metadata.id}`;
const targetFile = subDir
? `${versionFolder}/${subDir}/${path.basename(file)}`
: `${versionFolder}/${path.basename(file)}`;
Expand Down

0 comments on commit cb1395e

Please sign in to comment.