From 9591c67478fdce5612aebdbbe1b0979f7c8bd150 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sat, 22 Aug 2026 14:06:36 +0700 Subject: [PATCH] feat(export): remove author, scope, and slug metadata for cleaner minimal writeup look --- apps/web/app/components/PdfExportView.tsx | 23 ++++++++++------------- packages/core/src/export.helpers.ts | 2 -- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/apps/web/app/components/PdfExportView.tsx b/apps/web/app/components/PdfExportView.tsx index 5a34324..1ba45b3 100644 --- a/apps/web/app/components/PdfExportView.tsx +++ b/apps/web/app/components/PdfExportView.tsx @@ -48,7 +48,6 @@ export default function PdfExportView({ const [copiedMd, setCopiedMd] = useState(false); const sectionMeta = getSectionMeta(summary.section); - const authorsList = summary.authors || []; // Available categories for filtering const allCategories = useMemo(() => { @@ -285,20 +284,16 @@ export default function PdfExportView({
{/* Document Header */} -
+

{summary.title}

-
- Scope: {summary.scope} - Total Challenges: {filteredAndSortedDocs.length} +
+ {filteredAndSortedDocs.length} Challenges {currentTotalPoints > 0 && ( - Total Points: {currentTotalPoints.toLocaleString()} pts + · {currentTotalPoints.toLocaleString()} Total Points )} - {authorsList.length > 0 && ( - Author(s): {authorsList.map((a) => `@${a}`).join(", ")} - )} - Date: {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })} + · {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })}
@@ -357,10 +352,8 @@ export default function PdfExportView({ Category: {cat} {pts > 0 && Points: {pts} pts} {diff && Difficulty: {diff}} - {doc.author && Author: @{doc.author}} - {doc.slug && Slug: {doc.slug}} - {/* Extra fields */} + {/* Extra fields (excluding author, slug, scope, etc.) */} {Object.entries(extra).map(([k, v]) => { const lowerKey = k.toLowerCase(); if ( @@ -372,8 +365,12 @@ export default function PdfExportView({ "difficulty", "solved", "author", + "authors", + "scope", + "slug", "event", "challenge", + "path", ].includes(lowerKey) || v === null || v === undefined || diff --git a/packages/core/src/export.helpers.ts b/packages/core/src/export.helpers.ts index 33bf3ce..cdaed68 100644 --- a/packages/core/src/export.helpers.ts +++ b/packages/core/src/export.helpers.ts @@ -416,8 +416,6 @@ export function compileExportMarkdown(exportData: ExportData): string { if (cat) badges.push(`**Category:** \`${cat}\``); if (pts > 0) badges.push(`**Points:** \`${pts} pts\``); if (diff) badges.push(`**Difficulty:** \`${diff}\``); - if (doc.author) badges.push(`**Author:** @${doc.author}`); - if (doc.slug) badges.push(`**Slug:** \`${doc.slug}\``); if (badges.length > 0) { lines.push(badges.join(" · "));