Skip to content

Commit

Permalink
Merge pull request #25 from FriendlyCaptcha/docs-redirect
Browse files Browse the repository at this point in the history
Setup redirect from /docs to /docs/v2
  • Loading branch information
merlinfuchs authored Oct 24, 2024
2 parents c32a3a3 + bdb06f6 commit fc10a12
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 186 deletions.
29 changes: 21 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ const config = {
locales: ["en"],
},

plugins: ["docusaurus-plugin-sass"],
plugins: [
"docusaurus-plugin-sass",
[
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
from: "/docs",
to: "/docs/v2",
},
],
},
],
],

presets: [
[
Expand All @@ -48,15 +61,15 @@ const config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: `https://github.com/${organizationName}/${projectName}/tree/main`,
lastVersion: 'current',
lastVersion: "current",
versions: {
current: {
label: 'v2',
path: 'v2',
banner: 'unreleased',
label: "v2",
path: "v2",
banner: "unreleased",
},
v1: {
banner: 'unmaintained',
banner: "unmaintained",
},
},
},
Expand Down Expand Up @@ -112,7 +125,7 @@ const config = {
},
{ to: "/blog", label: "Tech Blog", position: "left" },
{
type: 'docsVersionDropdown',
type: "docsVersionDropdown",
position: "right",
},
{
Expand Down Expand Up @@ -150,7 +163,7 @@ const config = {
{
label: "Integrations",
to: "integrations",
}
},
],
},
{
Expand Down
Loading

0 comments on commit fc10a12

Please sign in to comment.