File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ export const NotionPage: React.FC<types.PageProps> = ({
282
282
footer = { footer }
283
283
/>
284
284
285
- < GitHubShareButton />
285
+ { config . isGithubShareButtonEnabled && < GitHubShareButton /> }
286
286
</ DarkModeContext . Provider >
287
287
</ >
288
288
)
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ export const navigationLinks: Array<NavigationLink | null> = getSiteConfig(
112
112
// Optional site search
113
113
export const isSearchEnabled : boolean = getSiteConfig ( 'isSearchEnabled' , true )
114
114
115
+ // Optional github share button
116
+ export const isGithubShareButtonEnabled : boolean = getSiteConfig ( 'isGithubShareButtonEnabled' , true )
117
+
115
118
// ----------------------------------------------------------------------------
116
119
117
120
// Optional redis instance for persisting preview images
@@ -163,8 +166,8 @@ export const site: Site = {
163
166
export const fathomId = isDev ? null : process . env . NEXT_PUBLIC_FATHOM_ID
164
167
export const fathomConfig = fathomId
165
168
? {
166
- excludedDomains : [ 'localhost' , 'localhost:3000' ]
167
- }
169
+ excludedDomains : [ 'localhost' , 'localhost:3000' ]
170
+ }
168
171
: undefined
169
172
170
173
export const posthogId = process . env . NEXT_PUBLIC_POSTHOG_ID
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export interface SiteConfig {
26
26
isTweetEmbedSupportEnabled ?: boolean
27
27
isRedisEnabled ?: boolean
28
28
isSearchEnabled ?: boolean
29
+ isGithubShareButtonEnabled ?: boolean
29
30
30
31
includeNotionIdInUrls ?: boolean
31
32
pageUrlOverrides ?: types . PageUrlOverridesMap
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ export default siteConfig({
42
42
// this requires support from Notion.
43
43
isSearchEnabled : true ,
44
44
45
+ // whether or not to show the GitHub share button on the top-right.
46
+ isGithubShareButtonEnabled : true ,
47
+
45
48
// map of notion page IDs to URL paths (optional)
46
49
// any pages defined here will override their default URL paths
47
50
// example:
You can’t perform that action at this time.
0 commit comments