Skip to content

diagram-chasing/starter

Repository files navigation

Diagram Chasing — Story Template

Starter template for Diagram Chasing data stories.

Setup

pnpm install
pnpm run dev

Story metadata

Edit src/lib/story.config.ts — the single place for all per-story config:

export const story: StoryConfig = {
  canonicalUrl: 'https://diagramchasing.fun/YYYY/story-slug',
  seoTitle: 'Story Title — Diagram Chasing',
  seoDescription: '...',
  shareTitle: 'Story Title',
  shareDescription: '...',
  shareImgPath: 'https://diagramchasing.fun/YYYY/story-slug/sharecard.jpg',
  publishTime: '2025-01-01T00:00:00.000Z',
  contributors: [
    { name: 'Name', link: 'https://diagramchasing.fun/authors/name', role: 'Reporting' }
  ],
  keywords: ['india', 'data', '...']
};

Footer RSS feed

Pull the latest posts from diagramchasing.fun before building:

pnpm run fetch-rss

Deployment

Deploys to Netlify via GitHub Actions. Two workflows:

Workflow Trigger Target
netlify-pages-preview.yaml Push to main Preview deploy (alias: preview)
netlify-pages-publish.yaml Manual (workflow_dispatch) Production deploy

GitHub Secrets required

Set under Settings → Secrets and variables → Actions:

Secret Where to find it
NETLIFY_AUTH_TOKEN Netlify → User settings → Personal access tokens
NETLIFY_SITE_ID Netlify → Site → Site configuration → Site ID

Environment variables

Set under Netlify → Site → Environment variables:

Variable Example Purpose
ANALYTICS_ID story-slug Plausible analytics domain
BASE_URL https://story-slug.netlify.app/ Base href for static asset paths

Bibliography

References live in src/lib/data/references.json as a CSL-JSON array. Minimum shape:

{
  "id": "unique-key",
  "type": "report",
  "title": "Source Title",
  "author": [{ "family": "Last", "given": "First" }],
  "issued": { "date-parts": [[2024]] },
  "publisher": "Publisher Name"
}

Cite inline in .md files with [@unique-key]. The <Bibliography /> component renders the full reference list.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors