mirror of
https://github.com/netbirdio/docs.git
synced 2026-08-26 09:41:26 +02:00
Fixing Edit on GitHub Links (#627)
This commit is contained in:
@@ -17,6 +17,7 @@ import { faGithub } from '@fortawesome/free-brands-svg-icons';
|
||||
import {toast} from "react-toastify";
|
||||
import {AnnouncementBanner} from "@/components/announcement-banner/AnnouncementBanner";
|
||||
import {useAnnouncements} from "@/components/announcement-banner/AnnouncementBannerProvider";
|
||||
import { EDIT_ON_GITHUB_INDEX_ROUTES } from '@/lib/edit-on-github-routes'
|
||||
|
||||
const navigation = [
|
||||
{
|
||||
@@ -228,7 +229,7 @@ export function Layout({ children, title, tableOfContents }) {
|
||||
</li>
|
||||
<li key="edit-on-github">
|
||||
<Link
|
||||
href={"https://github.com/netbirdio/docs/tree/main/src/pages" + router.pathname + ".mdx"}
|
||||
href={"https://github.com/netbirdio/docs/tree/main/src/pages" + (EDIT_ON_GITHUB_INDEX_ROUTES.has(router.pathname) ? router.pathname + "/index.mdx" : router.pathname + ".mdx")}
|
||||
className="dark:hover:text-slate-300 dark:text-slate-400 text-slate-500 hover:text-slate-700 font-normal'"
|
||||
style={{display: "flex", alignItems: 'center'}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user