This document explains how the publications list is displayed and how to add new publications to the codebase.
The publications list is displayed using the Publications component located in Publications.tsx. This component creates a list layout to showcase the publications.
- Styling: The component uses inline styles to manage the appearance of publication metadata.
- List Layout: The publications are displayed in a responsive list layout using Material-UI's
StackandTypographycomponents. - Publication Cards: Each publication is displayed as a card with a title, the authors joined by commas, a metadata line joining DOI, journal, and date with a pipe separator, and the abstract. Data is imported from publications.ts.
- Truncated Abstracts: The card shows the first 550 characters of the abstract followed by an ellipsis, unconditionally. A shorter abstract still receives the ellipsis, so the card is not a faithful reproduction of the source text; the DOI link is.
- Clickable Cards: Each card is an
articlewhose title is a Next.jsLinktohttps://doi.org/<doi>, opening in a new tab (target='_blank',rel='noopener noreferrer'). The link's::afterpseudo-element covers the whole card, so a click anywhere on it opens the paper, without the card itself being a link: links cannot nest, and the DOI needs a link of its own. - DOI Link: The DOI in the metadata line is a separate link to the same page, marked with a
LinkIconand raised above the card's covering link so it stays clickable. Either link triggers thelogAnalyticsEventcall.
flowchart LR
accTitle: Publications List Data Flow
accDescr: Publications component imports static publication data, maps to list items, and displays each publication as a card showing title, authors, metadata, and abstract. The card's title link covers the card and the DOI is a link of its own; both open the publication's DOI page in a new tab and log an analytics event on click
A[Publications Component] -->|Imports| B[Publications Data]
B --> C[Maps Publications to List Items]
C --> D[Displays Publication Cards]
D --> E[Publication Title]
D --> F[Publication Authors]
D --> G[Publication Metadata]
D --> H[Publication Abstract]
D -->|Click| I[Opens DOI page in new tab and logs analytics]
To add new publications, update the publications array in src/data/publications.ts.
-
Open the publications.ts file.
-
Add a new object to the publications array with the following structure:
{ "title": "Publication Title", "authors": [ "Author 1", "Author 2" // more authors ], "abstract": "Abstract of the publication.", "doi": "10.1234/doi", "journal": "Journal Name", "date": "YYYY-MM-DD", "related-project": "project-id" // optional }
By following these steps, you can successfully add new publications to the publications list.