1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-29 12:10:22 +02:00
This commit is contained in:
Arik Chakma
2025-08-18 19:17:36 +06:00
parent 2b8d64a80d
commit 2e162b710a
3 changed files with 16 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ export function GuideContent(props: GuideContentProps) {
<h1 className="mb-3 text-4xl font-bold text-balance">
{guide.title}
</h1>
<p className="my-0 flex items-center justify-start text-sm text-gray-400">
<p className="my-0 mb-6 flex items-center justify-start text-sm text-gray-400">
<a
href={`/authors/${guide.author?.slug}`}
className="inline-flex items-center font-medium underline-offset-2 hover:text-gray-600 hover:underline"

View File

@@ -226,7 +226,17 @@ export class GuideRenderer {
}
private paragraph(node: JSONContent): JSX.Element {
return <p>{node.content ? this.content(node) : <>&nbsp;</>}</p>;
const isEmpty =
!node.content ||
node.content?.every(
(child) => child.type === 'text' && child.text === '',
);
if (isEmpty) {
return <></>;
}
return <p>{this.content(node)}</p>;
}
private text(node: JSONContent): JSX.Element {

View File

@@ -21,6 +21,10 @@ export interface OfficialGuideDocument {
keywords?: string[];
};
tags?: string[];
questionCount?: number;
questionTopicCount?: number;
viewCount?: number;
createdAt: Date;
updatedAt: Date;