refined design
Some checks failed
Next.js App CI / docker (push) Failing after 3m19s

This commit is contained in:
2025-09-14 22:49:23 +02:00
parent 78de337446
commit 0444067c2d
89 changed files with 1117 additions and 594 deletions

View File

@@ -2,10 +2,8 @@ import { parse } from "@retorquere/bibtex-parser";
import fs from "fs";
import path from "path";
// Your existing path is correct.
const bibliographyPath = path.join(process.cwd(), "content", "_bibliography.bib");
// --- FIX: Add `pdfAvailable` to the Publication interface ---
export interface Publication {
key: string;
title: string;
@@ -14,8 +12,8 @@ export interface Publication {
year: string;
bibtex: string;
pdfUrl: string;
url?: string; // Also make url optional to be safe
pdfAvailable?: boolean; // This will hold the result of our check
url?: string;
pdfAvailable?: boolean;
}
export function getPublicationsData(): Publication[] {
@@ -59,7 +57,7 @@ export function getPublicationsData(): Publication[] {
url: Array.isArray(entry.fields.url) ? entry.fields.url.join(" ") : entry.fields.url,
bibtex: bibtexEntryString,
pdfUrl: `/publications/${entry.key}.pdf`,
pdfAvailable: pdfExists, // <-- Add the result here
pdfAvailable: pdfExists,
};
});
}