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> = ({
282282 footer = { footer }
283283 />
284284
285- < GitHubShareButton />
285+ { config . isGithubShareButtonEnabled && < GitHubShareButton /> }
286286 </ DarkModeContext . Provider >
287287 </ >
288288 )
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ export const navigationLinks: Array<NavigationLink | null> = getSiteConfig(
112112// Optional site search
113113export const isSearchEnabled : boolean = getSiteConfig ( 'isSearchEnabled' , true )
114114
115+ // Optional github share button
116+ export const isGithubShareButtonEnabled : boolean = getSiteConfig ( 'isGithubShareButtonEnabled' , true )
117+
115118// ----------------------------------------------------------------------------
116119
117120// Optional redis instance for persisting preview images
@@ -163,8 +166,8 @@ export const site: Site = {
163166export const fathomId = isDev ? null : process . env . NEXT_PUBLIC_FATHOM_ID
164167export const fathomConfig = fathomId
165168 ? {
166- excludedDomains : [ 'localhost' , 'localhost:3000' ]
167- }
169+ excludedDomains : [ 'localhost' , 'localhost:3000' ]
170+ }
168171 : undefined
169172
170173export 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 {
2626 isTweetEmbedSupportEnabled ?: boolean
2727 isRedisEnabled ?: boolean
2828 isSearchEnabled ?: boolean
29+ isGithubShareButtonEnabled ?: boolean
2930
3031 includeNotionIdInUrls ?: boolean
3132 pageUrlOverrides ?: types . PageUrlOverridesMap
Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ export default siteConfig({
4242 // this requires support from Notion.
4343 isSearchEnabled : true ,
4444
45+ // whether or not to show the GitHub share button on the top-right.
46+ isGithubShareButtonEnabled : true ,
47+
4548 // map of notion page IDs to URL paths (optional)
4649 // any pages defined here will override their default URL paths
4750 // example:
You can’t perform that action at this time.
0 commit comments