Authoring Workflow
This is the standard workflow for creating a story in scrollytale-starter.
1. Clone the Starter
bash
git clone https://github.com/SonghaiFan/scrollytale-starter.git
cd scrollytale-starter2. Add Data
Place your CSV files in public/data/.
Example:
text
public/data/housing-gap.csvUse simple filenames and keep them stable once referenced in story.md.
3. Edit story.md
story.md is the source of truth for the page.
You will usually change:
- story title
- data names and paths
- section frontmatter
- section order
- section copy
- chart fields such as
chart,data,x, andy - section layout choices
4. Run the Project
bash
npm install
npm run devThen open the local Vite URL, usually:
http://localhost:5173http://localhost:5173/authoringfor the authoring UI
5. Validate Before Sharing
bash
npm run buildIf the build passes, the story is structurally valid enough for the current starter runtime.
Recommended Story Shape
For v0, prefer:
- one
heroopening - two to four analytical sections
- one closing section
Good default section count:
- 4 to 6 sections
Recommended Chart Choices
- Use
barfor ranking or category comparison - Use
linefor change over time - Use
unitfor row-level presence or categorical grouping - Use
htmlwhen you want a placeholder container or custom embedded content
What to Change First
If you are making a new story, start in this order:
- update the top frontmatter in
story.md - define or revise section frontmatter blocks
- replace section copy and headings
- update
chart,data,x,y,series, orcolor - update
::stepblocks for scrolly sections - optionally refine
src/styles/custom.css
What Not to Change by Default
Do not change runtime files unless you need a new feature:
src/runtime/*src/layouts/*src/visualizations/*
For many stories, editing only story.md and adding a CSV is enough.