Skip to content

Commit

Permalink
docs: handle missing redirects (refinedev#5333)
Browse files Browse the repository at this point in the history
* docs: handle missing redirects

* docs: fix redirect paths
  • Loading branch information
aliemir authored Nov 30, 2023
1 parent f8e407f commit 9a0232e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ const siteConfig = {
"@docusaurus/plugin-client-redirects",
{
redirects: redirectJson.redirects,
createRedirects(existingPath) {
if (existingPath.includes("/api-reference/core/")) {
return [
existingPath.replace(
"/api-reference/core/",
"/api-references/",
),
];
}
return undefined; // Return a falsy value: no redirect created
},
},
],
[
Expand Down Expand Up @@ -109,7 +120,8 @@ const siteConfig = {
"./plugins/blog-plugin.js",
{
blogTitle: "Blog",
blogDescription: "A resource for Refine, front-end ecosystem, and web development",
blogDescription:
"A resource for Refine, front-end ecosystem, and web development",
routeBasePath: "/blog",
postsPerPage: 12,
blogSidebarTitle: "All posts",
Expand Down

0 comments on commit 9a0232e

Please sign in to comment.