mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 12:47:14 +02:00
fix(vfix docs instance path (#3108)
This commit is contained in:
parent
2c5675cbc1
commit
9fab79c975
1 changed files with 8 additions and 1 deletions
|
@ -12,6 +12,8 @@ import sortBy from 'lodash.sortby';
|
|||
import globby from 'globby';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import chalk from 'chalk';
|
||||
|
||||
import admonitions from 'remark-admonitions';
|
||||
import {STATIC_DIR_NAME} from '@docusaurus/core/lib/constants';
|
||||
import {
|
||||
|
@ -150,6 +152,11 @@ export default function pluginContentDocs(
|
|||
const {include, sidebarPath} = options;
|
||||
|
||||
if (!fs.existsSync(docsDir)) {
|
||||
console.error(
|
||||
chalk.red(
|
||||
`No docs directory found for the docs plugin at: ${docsDir}`,
|
||||
),
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -323,7 +330,7 @@ Available document ids=
|
|||
const {addRoute, createData, setGlobalData} = actions;
|
||||
|
||||
const pluginInstanceGlobalData: GlobalPluginData = {
|
||||
path: normalizeUrl([baseUrl, options.path]),
|
||||
path: normalizeUrl([baseUrl, options.routeBasePath]),
|
||||
latestVersionName: versioning.latestVersion,
|
||||
// Initialized empty, will be mutated
|
||||
versions: [],
|
||||
|
|
Loading…
Add table
Reference in a new issue