Dev env check for description length
This commit is contained in:
parent
043d3f7d76
commit
77b1916df1
1 changed files with 11 additions and 0 deletions
|
|
@ -98,6 +98,17 @@ export default async function Post({ params }: { params: Promise<{ slug: string
|
|||
<span>{meta.readingTimeText}</span>
|
||||
</div>
|
||||
<p className="text-fg text-lg mb-4">{meta.description}</p>
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<span className="text-fg-dim text-sm mb-4 block">
|
||||
Description has {meta.description.length} characters, which is{' '}
|
||||
{meta.description.length < 120
|
||||
? 'too short'
|
||||
: meta.description.length > 160
|
||||
? 'too long'
|
||||
: 'just right'}{' '}
|
||||
for SEO.
|
||||
</span>
|
||||
)}
|
||||
{meta.coverImage && <ImageWrapper src={meta.coverImage} alt={meta.coverImageAlt} />}
|
||||
<div className="prose">{content}</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue