From e4236b071d3aaf1212fa56f5436157c1a08245d9 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Sun, 17 Jan 2021 21:30:11 -0500 Subject: [PATCH] fixing twitter social --- components/NotionPage.tsx | 28 ++++++++++++++++++++++++++-- components/PageHead.tsx | 2 ++ lib/config.ts | 1 + 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 7b24e99..1ac2449 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -20,6 +20,7 @@ import { isDev, api, siteDescription, + siteAuthorTwitter, defaultPageCover, defaultPageCoverPosition, defaultPageIcon @@ -125,16 +126,39 @@ export const NotionPage: React.FC = ({ + + + + + {siteAuthorTwitter && ( + + )} + {socialDescription && ( <> + )} - {socialImage && } + {socialImage ? ( + <> + + + + + ) : ( + + )} - {canonicalPageUrl && } + {canonicalPageUrl && ( + <> + + + + + )} {title} diff --git a/components/PageHead.tsx b/components/PageHead.tsx index 6f6e9f9..f18e3d2 100644 --- a/components/PageHead.tsx +++ b/components/PageHead.tsx @@ -3,6 +3,8 @@ import * as React from 'react' import * as types from 'lib/types' import { mapImageUrl } from 'lib/map-image-url' +// TODO: remove duplication between PageHead and NotionPage Head + export const PageHead: React.FC = ({ site }) => { return ( diff --git a/lib/config.ts b/lib/config.ts index 392a5ce..737ea4d 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -12,6 +12,7 @@ export const rootNotionPageId = '78fc5a4b88d74b0e824e29407e9f1ec1' // general site config export const siteName = 'Transitive Bullshit' export const siteAuthor = 'Travis Fischer' +export const siteAuthorTwitter = 'transitive_bs' export const siteDomain = 'transitivebullsh.it' export const siteDescription = 'Personal site of Travis Fischer aka Transitive Bullshit'