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:
Sébastien Lorber 2020-07-22 19:55:40 +02:00 committed by GitHub
parent 27f384a67c
commit 811c7ae4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 2639 additions and 146 deletions

View file

@ -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 [

View file

@ -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: [],
},

View file

@ -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,
});

View file

@ -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: [],