mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-13 06:48:08 +02:00
fix(v2): swizzle should receive correct load context (#1844)
* fix(v2): swizzle should receive correct load context * new prettier version * niits
This commit is contained in:
parent
b82e211546
commit
d96b5f99b9
21 changed files with 480 additions and 460 deletions
|
@ -35,9 +35,7 @@ module.exports = function(type) {
|
|||
|
||||
const feed = new Feed({
|
||||
title: `${siteConfig.title} Blog`,
|
||||
description: `The best place to stay up-to-date with the latest ${
|
||||
siteConfig.title
|
||||
} news and events.`,
|
||||
description: `The best place to stay up-to-date with the latest ${siteConfig.title} news and events.`,
|
||||
id: blogRootURL,
|
||||
link: blogRootURL,
|
||||
image: siteImageURL,
|
||||
|
|
|
@ -175,9 +175,7 @@ function processMetadata(file, refDir) {
|
|||
versionPart = 'next/';
|
||||
}
|
||||
|
||||
metadata.permalink = `${docsPart}${langPart}${versionPart}${
|
||||
metadata.id
|
||||
}.html`;
|
||||
metadata.permalink = `${docsPart}${langPart}${versionPart}${metadata.id}.html`;
|
||||
|
||||
// change ids previous, next
|
||||
metadata.localized_id = metadata.id;
|
||||
|
|
|
@ -191,13 +191,9 @@ function processVersionMetadata(file, version, useVersion, language) {
|
|||
const docsPart = `${siteConfig.docsUrl ? `${siteConfig.docsUrl}/` : ''}`;
|
||||
const versionPart = `${version !== latestVersion ? `${version}/` : ''}`;
|
||||
if (!ENABLE_TRANSLATION && !siteConfig.useEnglishUrl) {
|
||||
metadata.permalink = `${docsPart}${versionPart}${
|
||||
metadata.original_id
|
||||
}.html`;
|
||||
metadata.permalink = `${docsPart}${versionPart}${metadata.original_id}.html`;
|
||||
} else {
|
||||
metadata.permalink = `${docsPart}${language}/${versionPart}${
|
||||
metadata.original_id
|
||||
}.html`;
|
||||
metadata.permalink = `${docsPart}${language}/${versionPart}${metadata.original_id}.html`;
|
||||
}
|
||||
metadata.id = metadata.id.replace(
|
||||
`version-${useVersion}-`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue