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
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:
@@ -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({
|
||||
<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 */}
|
||||
<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">
|
||||
{summary.title}
|
||||
</h1>
|
||||
<div className="text-xs text-slate-600 font-mono flex flex-wrap gap-x-4 gap-y-1">
|
||||
<span><strong>Scope:</strong> {summary.scope}</span>
|
||||
<span><strong>Total Challenges:</strong> {filteredAndSortedDocs.length}</span>
|
||||
<div className="text-xs text-slate-500 font-mono flex flex-wrap items-center gap-x-2 gap-y-1">
|
||||
<span>{filteredAndSortedDocs.length} Challenges</span>
|
||||
{currentTotalPoints > 0 && (
|
||||
<span><strong>Total Points:</strong> {currentTotalPoints.toLocaleString()} pts</span>
|
||||
<span>· {currentTotalPoints.toLocaleString()} Total Points</span>
|
||||
)}
|
||||
{authorsList.length > 0 && (
|
||||
<span><strong>Author(s):</strong> {authorsList.map((a) => `@${a}`).join(", ")}</span>
|
||||
)}
|
||||
<span><strong>Date:</strong> {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })}</span>
|
||||
<span>· {new Date(summary.generatedAt).toLocaleDateString(undefined, { dateStyle: "long" })}</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -357,10 +352,8 @@ export default function PdfExportView({
|
||||
<span><strong>Category:</strong> {cat}</span>
|
||||
{pts > 0 && <span><strong>Points:</strong> {pts} pts</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]) => {
|
||||
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 ||
|
||||
|
||||
@@ -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(" · "));
|
||||
|
||||
Reference in New Issue
Block a user