chore: moving more config into site.config.js

This commit is contained in:
Travis Fischer
2021-01-19 21:01:35 -05:00
parent 6707fc8d56
commit 76a04062a5
3 changed files with 24 additions and 12 deletions

View File

@@ -97,15 +97,16 @@ export const NotionPage: React.FC<types.PageProps> = ({
// only display comments on blog post pages
if (isBlogPost) {
comments = (
<ReactUtterances
repo='transitive-bullshit/transitivebullsh.it'
issueMap='issue-term'
issueTerm='title'
label='blog post'
theme='preferred-color-scheme'
/>
)
if (config.utterancesGitHubRepo) {
comments = (
<ReactUtterances
repo={config.utterancesGitHubRepo}
issueMap='issue-term'
issueTerm='title'
theme='preferred-color-scheme'
/>
)
}
}
return (

View File

@@ -41,10 +41,16 @@ export const defaultPageCoverPosition: number = getSiteConfig(
0.5
)
// image CDN host to proxy all image requests through
// Optional utteranc.es comments via GitHub issue comments
export const utterancesGitHubRepo: string | null = getSiteConfig(
'utterancesGitHubRepo',
null
)
// Optional image CDN host to proxy all image requests through
export const imageCDNHost: string | null = getSiteConfig('imageCDNHost', null)
// whether or not to enable support for LQIP preview images
// Optional whether or not to enable support for LQIP preview images
// (requires a Google Firebase collection)
export const isPreviewImageSupportEnabled: boolean = getSiteConfig(
'isPreviewImageSupportEnabled',

View File

@@ -21,7 +21,7 @@ module.exports = {
github: 'transitive-bullshit',
linkedin: 'fisch2',
// default notion values for site-wide consistency
// default notion icon and cover images for site-wide consistency
// page-specific values will override these site-wide defaults
// optional
defaultPageIcon:
@@ -31,9 +31,14 @@ module.exports = {
defaultPageCoverPosition: 0.1862,
// image CDN host to proxy all image requests through
// NOTE: this requires you to set up an external image proxy
// optional
imageCDNHost: 'https://ssfy.io',
// Utteranc.es comments via GitHub issue comments
// optional
utterancesGitHubRepo: 'transitive-bullshit/transitivebullsh.it',
// whether or not to enable support for LQIP preview images
// NOTE: this requires you to set up Google Firebase and add the environment
// variables specified in .env.example