mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-13 16:23:34 +02:00
fix: yarn build error
This commit is contained in:
parent
59fa427dbd
commit
185f7b1ed1
2 changed files with 8 additions and 2 deletions
|
@ -64,7 +64,10 @@ module.exports = async function processMetadata(source, refDir, env, order) {
|
|||
|
||||
/* version */
|
||||
let versionRefDir = refDir;
|
||||
if (language && language !== idx(env, ['translation', 'defaultLanguage', 'tag'])) {
|
||||
if (
|
||||
language &&
|
||||
language !== idx(env, ['translation', 'defaultLanguage', 'tag'])
|
||||
) {
|
||||
versionRefDir = path.join(refDir, language);
|
||||
}
|
||||
const version = getVersion(filepath, versionRefDir, env);
|
||||
|
|
|
@ -17,7 +17,10 @@ module.exports = function createServerConfig(props) {
|
|||
const {siteConfig, docsData, pagesData} = props;
|
||||
|
||||
// static site generator webpack plugin
|
||||
const paths = [...docsData, ...pagesData].map(data => data.path);
|
||||
const docsLinks = Object.values(docsData).map(data => ({
|
||||
path: `${siteConfig.baseUrl}${data.permalink}`
|
||||
}));
|
||||
const paths = [...docsLinks, ...pagesData].map(data => data.path);
|
||||
config.plugin('siteGenerator').use(staticSiteGenerator, [
|
||||
{
|
||||
entry: 'main',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue