feat(export): remove author, scope, and slug metadata for cleaner minimal writeup look
CI / typecheck + tests (push) Canceled after 0s
CI / build + deploy (Nix) — api (push) Canceled after 0s
CI / build + deploy (Nix) — mcp (push) Canceled after 0s
CI / build + deploy (Nix) — worker (push) Canceled after 0s
CI / build + deploy (web) (push) Canceled after 0s

This commit is contained in:
asepharyana
2026-08-22 14:06:36 +07:00
parent d65c5613d3
commit 9591c67478
2 changed files with 10 additions and 15 deletions
+10 -13
View File
@@ -48,7 +48,6 @@ export default function PdfExportView({
const [copiedMd, setCopiedMd] = useState(false); const [copiedMd, setCopiedMd] = useState(false);
const sectionMeta = getSectionMeta(summary.section); const sectionMeta = getSectionMeta(summary.section);
const authorsList = summary.authors || [];
// Available categories for filtering // Available categories for filtering
const allCategories = useMemo(() => { const allCategories = useMemo(() => {
@@ -285,20 +284,16 @@ export default function PdfExportView({
<main className="print-container bg-white text-slate-900 max-w-4xl mx-auto px-4 sm:px-8 py-6 print:p-0 print:max-w-none"> <main className="print-container bg-white text-slate-900 max-w-4xl mx-auto px-4 sm:px-8 py-6 print:p-0 print:max-w-none">
{/* Document Header */} {/* Document Header */}
<header className="mb-8 pb-4 border-b border-slate-300"> <header className="mb-8 pb-3 border-b border-slate-300">
<h1 className="text-3xl sm:text-4xl font-bold text-slate-950 tracking-tight mb-2"> <h1 className="text-3xl sm:text-4xl font-bold text-slate-950 tracking-tight mb-2">
{summary.title} {summary.title}
</h1> </h1>
<div className="text-xs text-slate-600 font-mono flex flex-wrap gap-x-4 gap-y-1"> <div className="text-xs text-slate-500 font-mono flex flex-wrap items-center gap-x-2 gap-y-1">
<span><strong>Scope:</strong> {summary.scope}</span> <span>{filteredAndSortedDocs.length} Challenges</span>
<span><strong>Total Challenges:</strong> {filteredAndSortedDocs.length}</span>
{currentTotalPoints > 0 && ( {currentTotalPoints > 0 && (
<span><strong>Total Points:</strong> {currentTotalPoints.toLocaleString()} pts</span> <span>· {currentTotalPoints.toLocaleString()} Total Points</span>
)} )}
{authorsList.length > 0 && ( <span>· {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })}</span>
<span><strong>Author(s):</strong> {authorsList.map((a) => `@${a}`).join(", ")}</span>
)}
<span><strong>Date:</strong> {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })}</span>
</div> </div>
</header> </header>
@@ -357,10 +352,8 @@ export default function PdfExportView({
<span><strong>Category:</strong> {cat}</span> <span><strong>Category:</strong> {cat}</span>
{pts > 0 && <span><strong>Points:</strong> {pts} pts</span>} {pts > 0 && <span><strong>Points:</strong> {pts} pts</span>}
{diff && <span><strong>Difficulty:</strong> {diff}</span>} {diff && <span><strong>Difficulty:</strong> {diff}</span>}
{doc.author && <span><strong>Author:</strong> @{doc.author}</span>}
{doc.slug && <span><strong>Slug:</strong> {doc.slug}</span>}
{/* Extra fields */} {/* Extra fields (excluding author, slug, scope, etc.) */}
{Object.entries(extra).map(([k, v]) => { {Object.entries(extra).map(([k, v]) => {
const lowerKey = k.toLowerCase(); const lowerKey = k.toLowerCase();
if ( if (
@@ -372,8 +365,12 @@ export default function PdfExportView({
"difficulty", "difficulty",
"solved", "solved",
"author", "author",
"authors",
"scope",
"slug",
"event", "event",
"challenge", "challenge",
"path",
].includes(lowerKey) || ].includes(lowerKey) ||
v === null || v === null ||
v === undefined || v === undefined ||
-2
View File
@@ -416,8 +416,6 @@ export function compileExportMarkdown(exportData: ExportData): string {
if (cat) badges.push(`**Category:** \`${cat}\``); if (cat) badges.push(`**Category:** \`${cat}\``);
if (pts > 0) badges.push(`**Points:** \`${pts} pts\``); if (pts > 0) badges.push(`**Points:** \`${pts} pts\``);
if (diff) badges.push(`**Difficulty:** \`${diff}\``); 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) { if (badges.length > 0) {
lines.push(badges.join(" · ")); lines.push(badges.join(" · "));