@@ -14,6 +14,7 @@ import UpcomingEventsList from "@/components/UpcomingEventsList"
14
14
15
15
import { isLangRightToLeft } from "@/lib/utils/translations"
16
16
import { getLocaleTimestamp } from "@/lib/utils/time"
17
+ import { CONTENT_DIR } from "@/lib/constants"
17
18
18
19
import type { ChildOnlyProp , Lang } from "@/lib/types"
19
20
import type { MdPageContent , StaticFrontmatter } from "@/lib/interfaces"
@@ -71,6 +72,12 @@ export const StaticLayout: React.FC<IProps> = ({
71
72
const { locale } = useRouter ( )
72
73
const isRightToLeft = isLangRightToLeft ( frontmatter . lang as Lang )
73
74
75
+ const repo =
76
+ process . env . NEXT_PUBLIC_GITHUB_REPO ||
77
+ "ethereum/ethereum-org-website"
78
+ const baseEditPath = `https://github.com/${ repo } /tree/dev/${ CONTENT_DIR } /`
79
+ const absoluteEditPath = baseEditPath + slug + "index.md"
80
+
74
81
return (
75
82
< Box w = "full" ml = { 2 } >
76
83
< Flex
@@ -114,7 +121,6 @@ export const StaticLayout: React.FC<IProps> = ({
114
121
< TableOfContents
115
122
position = "relative"
116
123
zIndex = { 2 }
117
- // editPath={absoluteEditPath}
118
124
items = { tocItems }
119
125
isMobile
120
126
maxDepth = { frontmatter . sidebarDepth || 2 }
@@ -125,7 +131,7 @@ export const StaticLayout: React.FC<IProps> = ({
125
131
< FeedbackCard isArticle />
126
132
</ Box >
127
133
< TableOfContents
128
- // editPath={absoluteEditPath}
134
+ editPath = { absoluteEditPath }
129
135
items = { tocItems }
130
136
maxDepth = { frontmatter . sidebarDepth || 2 }
131
137
hideEditButton = { ! ! frontmatter . hideEditButton }
0 commit comments