Skip to content

Commit

Permalink
Disable edit link on the docs index (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik authored Sep 20, 2023
1 parent 9615d82 commit 7144a70
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,15 @@ const config = {
docs: {
sidebarPath: require.resolve("./sidebars.js"),
routeBasePath: "/docs",
editUrl: "https://github.com/opentofu/opentofu/edit/main/website",
editUrl: ({ docPath }) => {
// Remove the edit link from the documentation index page
// TODO: remove after moving the page to the main OpenTofu repo
if (docPath === "index.mdx") {
return undefined;
}

return `https://github.com/opentofu/opentofu/edit/main/website/docs/${docPath}`;
},
},
blog: false,
gtag: {
Expand Down

0 comments on commit 7144a70

Please sign in to comment.