Skip to content

Commit

Permalink
Support for redirects other than the old site ones.
Browse files Browse the repository at this point in the history
Uses this to provide redirects required by
pantsbuild/pants#20544
  • Loading branch information
benjyw committed Feb 17, 2024
1 parent 7a10b38 commit 96f2723
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import versions from "./versions.json";
import redirects from "./old_site_redirects.js";
import redirects from "./redirects.js";
import old_site_redirects from "./old_site_redirects.js";
import captionedCode from "./src/remark/captioned-code.js";
import tabBlocks from "docusaurus-remark-plugin-tab-blocks";
import fs from "fs";
Expand Down Expand Up @@ -369,7 +370,7 @@ const config = {
[
"@docusaurus/plugin-client-redirects",
{
redirects,
redirects: old_site_redirects.concat(redirects),
},
],
],
Expand Down
10 changes: 10 additions & 0 deletions redirects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default [
{
from: "/2.19/docs/java-and-scala",
to: "/2.19/docs/jvm/java-and-scala",
},
{
from: "/2.19/docs/java-and-scala/kotlin",
to: "/2.19/docs/jvm/kotlin",
},
];

0 comments on commit 96f2723

Please sign in to comment.