The Articles app presents blog posts the way a file manager presents documents — each post is a largeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/dev-os/llms.txt
Use this file to discover all available pages before exploring further.
FileText icon with a title and date underneath. Clicking any icon swaps the grid for a focused, paper-white reader view. A single piece of useState — the selected article’s id, or null — drives the entire two-view toggle with no router required.
Data Structure
All articles live in a static array defined at the top ofArticlesApp.js:
| Field | Type | Purpose |
|---|---|---|
id | number | Unique key; stored in selectedId state on click |
title | string | Displayed below the icon in the grid and as <h1> in the reader |
date | string | ISO date string shown in the grid tile and reader subtitle |
content | string | Full article text rendered in the reader body |
Grid View
The grid view is the default state (selectedId === null). It renders when no article is selected.
Menu bar — a thin bg-gray-100 border-b border-gray-300 strip at the top of the app contains two <span> elements: File and View. They have hover styles (hover:bg-gray-200) but are not wired to any actions in the current implementation.
Icon grid — a CSS grid inside the scrollable body:
bg-os-teal/10) and a matching border that appears on hover. On mobile the grid is 2 columns; from sm: breakpoint upward it expands to 3 columns.
Reader View
Clicking a file icon setsselectedId to the article’s id. The component uses articles.find(a => a.id === selectedId) to resolve the full article object, then renders the reader:
Back bar — bg-gray-100 border-b border-gray-300 font-ui; contains a ← Back to list button that calls setSelectedId(null), returning to the grid.
Article body — bg-[#FDFBF7] font-serif, centred with max-w-2xl mx-auto and padded with p-8:
#FDFBF7) and font-serif body text give the reader a book-like feel distinct from the rest of the OS chrome.
Customising the Articles App
Add a new article — append an object to thearticles array. Use a template literal for content if you want line breaks:
FileText is imported from lucide-react. Swap it for any other Lucide icon (e.g. BookOpen, FileCode) to match your content type.
The reader renders
content as a plain string using a text node — whitespace characters like \n are collapsed by the browser. To support Markdown formatting or rich HTML, replace the content <div> with a lightweight parser such as react-markdown or marked: