From bf3aeb14e43fea2c89de65c66210f371bfdd56c8 Mon Sep 17 00:00:00 2001 From: slorber Date: Thu, 23 Jul 2020 19:36:18 +0200 Subject: [PATCH] fix docs instance path --- packages/docusaurus-plugin-content-docs/src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-content-docs/src/index.ts b/packages/docusaurus-plugin-content-docs/src/index.ts index 521c793a22f2..8d6cde8c3789 100644 --- a/packages/docusaurus-plugin-content-docs/src/index.ts +++ b/packages/docusaurus-plugin-content-docs/src/index.ts @@ -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: [],