diff --git a/src/admin/insights/AdminAppInsightsClient.tsx b/src/admin/insights/AdminAppInsightsClient.tsx index fb7b7ce3..dba002dc 100644 --- a/src/admin/insights/AdminAppInsightsClient.tsx +++ b/src/admin/insights/AdminAppInsightsClient.tsx @@ -36,15 +36,21 @@ const DEBUG_COMMIT_MESSAGE = 'Long commit message for debugging purposes'; const DEBUG_BEHIND_BY = 9; const DEBUG_PHOTOS_COUNT_OUTDATED = 7; -const readmeAnchor = (anchor: string, text: string) => +const renderLink = (text: string, href = '') => {text} ; +const readmeAnchor = (anchor: string) => + renderLink( + `README/${anchor}`, + `${TEMPLATE_REPO_URL_README}#${anchor}`, + ); + const renderLabeledEnvVar = (label: string, envVar: string, value = '1') =>
@@ -106,19 +112,13 @@ export default function AdminAppInsightsClient({ />} content="This template is not forked" expandContent={<> - - Fork - + {renderLink('Fork original template', TEMPLATE_REPO_URL_FORK)} {' '} - original template to receive the latest fixes and features. + to receive the latest fixes and features. {' '} - {readmeAnchor('receiving-updates', 'Additional instructions')} + Additional instructions in {' '} - in README. + {readmeAnchor('receiving-updates')}. } />} {(forkBehind || debug) && } expandContent={<> - - Sync your fork - + {renderLink('Sync your fork', codeMeta?.urlRepo)} {' '} - to receive the latest fixes and features + to receive the latest fixes and features. } />} } content="AI enabled without rate limiting" - // eslint-disable-next-line max-len - expandContent="Create Vercel KV store and link to this project in order prevent abuse by to enabling rate limiting." + expandContent={<> + Create Vercel KV store and link to this project + in order prevent abuse by to enabling rate limiting. + } />} {(noAi || debug) && } content="Improve SEO + accessibility with AI" expandContent={<> -
- Enable automatic AI text generation - {' '} - by setting environment variable - {' '} - . -
-
- Further instruction in - {' '} - {readmeAnchor('ai-text-generation', 'README')}. -
+ Enable automatic AI text generation + {' '} + by setting . + {' '} + Further instruction and cost considerations in + {' '} + {readmeAnchor('ai-text-generation')}. } />} {(photoMatting || debug) && } + icon={} content="Vertical photos may benefit from matting" expandContent={<> - {/* eslint-disable-next-line max-len */} - Enable photo matting to make portrait and landscape photos appear more consistent + Enable photo matting to make + {' '} + portrait and landscape photos appear more consistent + {' '} } />} @@ -251,7 +246,7 @@ export default function AdminAppInsightsClient({ expandContent={<> Now that you have a sufficient amount of photos, you can {' '} - enable grid homepage by setting environment variable + enable grid homepage by setting {' '} } @@ -263,8 +258,9 @@ export default function AdminAppInsightsClient({ />} content="Static optimization" expandContent={<> - {/* eslint-disable-next-line max-len */} - Enable static optimization by setting any of the following environment variables: + Enable static optimization + {' '} + by setting any of the following:
{renderLabeledEnvVar( 'Pre-render photo pages', @@ -282,6 +278,9 @@ export default function AdminAppInsightsClient({ 'Pre-render OG image for each category page', 'NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_CATEGORY_OG_IMAGES', )} + + See {readmeAnchor('performance')} for cost considerations. +
} />}