Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 3.26 KB

publications.md

File metadata and controls

61 lines (47 loc) · 3.26 KB

Publications Documentation

Overview

This document explains how the publications list is displayed and how to add new publications to the codebase.

Publications List Display

The publications list is displayed using the Publications component located in Publications.tsx. This component creates a list layout to showcase the publications.

Key Elements

  • 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 Stack and Typography components.
  • 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 article whose title is a Next.js Link to https://doi.org/<doi>, opening in a new tab (target='_blank', rel='noopener noreferrer'). The link's ::after pseudo-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 LinkIcon and raised above the card's covering link so it stays clickable. Either link triggers the logAnalyticsEvent call.

Flowchart

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]
Loading

Adding New Publications

To add new publications, update the publications array in src/data/publications.ts.

Steps to Add a New Publication

  1. Open the publications.ts file.

  2. 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.