mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix(v2): fix recent baseurl issues (#3093)
* try to fix the baseUrl related issues * fix some newly detected broken links * fix baseurl and broken link issues * try to configure netlify to use baseUrl deployment * add proper netlify settings? * add proper netlify settings? * add proper netlify settings? * test commit * try to fix the redirects * cleanup working conf * minor redirect fix
This commit is contained in:
parent
27f384a67c
commit
811c7ae4e9
30 changed files with 2639 additions and 146 deletions
|
@ -178,7 +178,7 @@ Object {
|
|||
"pluginName": Object {
|
||||
"pluginId": Object {
|
||||
"latestVersionName": null,
|
||||
"path": "docs",
|
||||
"path": "/docs",
|
||||
"versions": Array [
|
||||
Object {
|
||||
"docs": Array [
|
||||
|
@ -469,7 +469,7 @@ Object {
|
|||
"pluginName": Object {
|
||||
"pluginId": Object {
|
||||
"latestVersionName": "1.0.1",
|
||||
"path": "docs",
|
||||
"path": "/docs",
|
||||
"versions": Array [
|
||||
Object {
|
||||
"docs": Array [
|
||||
|
|
|
@ -20,12 +20,12 @@ describe('docsClientUtils', () => {
|
|||
test('getActivePlugin', () => {
|
||||
const data: Record<string, GlobalPluginData> = {
|
||||
pluginIosId: {
|
||||
path: 'ios',
|
||||
path: '/ios',
|
||||
latestVersionName: 'xyz',
|
||||
versions: [],
|
||||
},
|
||||
pluginAndroidId: {
|
||||
path: 'android',
|
||||
path: '/android',
|
||||
latestVersionName: 'xyz',
|
||||
versions: [],
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@ export const getActivePlugin = (
|
|||
const activeEntry = Object.entries(allPluginDatas).find(
|
||||
([_id, pluginData]) => {
|
||||
return !!matchPath(pathname, {
|
||||
path: `/${pluginData.path}`,
|
||||
path: pluginData.path,
|
||||
exact: false,
|
||||
strict: false,
|
||||
});
|
||||
|
|
|
@ -323,7 +323,7 @@ Available document ids=
|
|||
const {addRoute, createData, setGlobalData} = actions;
|
||||
|
||||
const pluginInstanceGlobalData: GlobalPluginData = {
|
||||
path: options.path,
|
||||
path: normalizeUrl([baseUrl, options.path]),
|
||||
latestVersionName: versioning.latestVersion,
|
||||
// Initialized empty, will be mutated
|
||||
versions: [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue