mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 04:37:28 +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 globby from 'globby';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import chalk from 'chalk';
|
||||||
|
|
||||||
import admonitions from 'remark-admonitions';
|
import admonitions from 'remark-admonitions';
|
||||||
import {STATIC_DIR_NAME} from '@docusaurus/core/lib/constants';
|
import {STATIC_DIR_NAME} from '@docusaurus/core/lib/constants';
|
||||||
import {
|
import {
|
||||||
|
@ -150,6 +152,11 @@ export default function pluginContentDocs(
|
||||||
const {include, sidebarPath} = options;
|
const {include, sidebarPath} = options;
|
||||||
|
|
||||||
if (!fs.existsSync(docsDir)) {
|
if (!fs.existsSync(docsDir)) {
|
||||||
|
console.error(
|
||||||
|
chalk.red(
|
||||||
|
`No docs directory found for the docs plugin at: ${docsDir}`,
|
||||||
|
),
|
||||||
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +330,7 @@ Available document ids=
|
||||||
const {addRoute, createData, setGlobalData} = actions;
|
const {addRoute, createData, setGlobalData} = actions;
|
||||||
|
|
||||||
const pluginInstanceGlobalData: GlobalPluginData = {
|
const pluginInstanceGlobalData: GlobalPluginData = {
|
||||||
path: normalizeUrl([baseUrl, options.path]),
|
path: normalizeUrl([baseUrl, options.routeBasePath]),
|
||||||
latestVersionName: versioning.latestVersion,
|
latestVersionName: versioning.latestVersion,
|
||||||
// Initialized empty, will be mutated
|
// Initialized empty, will be mutated
|
||||||
versions: [],
|
versions: [],
|
||||||
|
|
Loading…
Add table
Reference in a new issue