mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
fix(v2): don't render docs baseUrl because its empty (#1407)
This commit is contained in:
parent
ecf1f9a2c4
commit
96cc3dbc88
2 changed files with 3 additions and 5 deletions
|
@ -43,7 +43,9 @@ async function loadRoutes(pluginsRouteConfigs) {
|
||||||
exact,
|
exact,
|
||||||
} = routeConfig;
|
} = routeConfig;
|
||||||
|
|
||||||
|
if (!routes) {
|
||||||
addRoutesPath(routePath);
|
addRoutesPath(routePath);
|
||||||
|
}
|
||||||
|
|
||||||
// Given an input (object or string), get the import path str
|
// Given an input (object or string), get the import path str
|
||||||
const getModulePath = target => {
|
const getModulePath = target => {
|
||||||
|
|
|
@ -14,7 +14,6 @@ describe('loadRoutes', () => {
|
||||||
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
||||||
Array [
|
Array [
|
||||||
"/",
|
"/",
|
||||||
"/docs",
|
|
||||||
"/docs/endiliey/permalink",
|
"/docs/endiliey/permalink",
|
||||||
"/docs/foo/bar",
|
"/docs/foo/bar",
|
||||||
"/docs/foo/baz",
|
"/docs/foo/baz",
|
||||||
|
@ -30,7 +29,6 @@ Array [
|
||||||
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
||||||
Array [
|
Array [
|
||||||
"/",
|
"/",
|
||||||
"/docs",
|
|
||||||
"/docs/1.0.0/foo/bar",
|
"/docs/1.0.0/foo/bar",
|
||||||
"/docs/1.0.0/foo/baz",
|
"/docs/1.0.0/foo/baz",
|
||||||
"/docs/1.0.0/hello",
|
"/docs/1.0.0/hello",
|
||||||
|
@ -52,7 +50,6 @@ Array [
|
||||||
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
||||||
Array [
|
Array [
|
||||||
"/",
|
"/",
|
||||||
"/docs",
|
|
||||||
"/docs/en/1.0.0/foo/bar",
|
"/docs/en/1.0.0/foo/bar",
|
||||||
"/docs/en/1.0.0/foo/baz",
|
"/docs/en/1.0.0/foo/baz",
|
||||||
"/docs/en/1.0.0/hello",
|
"/docs/en/1.0.0/hello",
|
||||||
|
@ -87,7 +84,6 @@ Array [
|
||||||
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
expect(routesPaths.sort()).toMatchInlineSnapshot(`
|
||||||
Array [
|
Array [
|
||||||
"/",
|
"/",
|
||||||
"/docs",
|
|
||||||
"/docs/en/endiliey/permalink",
|
"/docs/en/endiliey/permalink",
|
||||||
"/docs/en/foo/bar",
|
"/docs/en/foo/bar",
|
||||||
"/docs/en/foo/baz",
|
"/docs/en/foo/baz",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue