Quick Start: Data-Driven Content Management
π― Goal
Add or modify research projects and themes without touching any code.
β Whatβs Been Set Up
Your website now has a fully data-driven architecture:
- β¨ All projects defined in
_data/projects.yml - π¨ All themes defined in
_data/research_themes.yml - π Stats auto-calculate from project data
- π Jekyll auto-generates JSON API
- π± JavaScript dynamically loads content
π Common Tasks
Add a New Project
- Open
_data/projects.yml - Add entry:
- id: my-new-project # Unique ID (kebab-case)
title: My New Project # Display name
description: Brief description of what this project does
url: /projects/my-project # Link to project page (or null)
image: /path/to/image.png # Thumbnail image (or null)
status: completed # completed | ongoing | potential
themes: # Which themes this belongs to
- superconducting
- qec
- Save file
- Build:
bundle exec jekyll build - Done! Stats automatically update.
Update Project Status
Change the status field:
ongoingβcompletedwhen work finishespotentialβongoingwhen starting workcompletedβ stays completed
Stats update automatically on next build.
Add a New Theme
-
Create SVG icon:
/assets/icons/themes/my-theme.svg - Add to
_data/research_themes.yml:- id: my-theme title: My New Theme description: One-sentence description icon: /assets/icons/themes/my-theme.svg -
Tag projects with
my-themein theirthemesarray - (Optional) Add custom colors in
/assets/css/home.css: ```css .theme-block[data-theme=βmy-themeβ]:hover { background: linear-gradient(135deg, rgba(255, 100, 150, 0.28) 0%, rgba(137, 207, 240, 0.15) 50%, rgba(46, 46, 46, 0.18) 100%); }
.theme-block[data-theme=βmy-themeβ] .theme-icon { color: #ff6496; }
### Change Theme Description
Edit `_data/research_themes.yml` - changes apply immediately on next build.
### Remove a Project
Delete or comment out its entry in `_data/projects.yml`. Stats auto-update.
## π File Structure
_data/ βββ projects.yml β All project data (edit this!) βββ research_themes.yml β Theme metadata (edit this!)
_plugins/ βββ theme_stats_generator.rb β Auto-calculates stats (donβt edit)
assets/ βββ icons/themes/ β SVG icons for themes βββ js/home.js β Loads projects from JSON βββ css/home.css β Styling (optional edits)
projects-data.json β Auto-generated API (donβt edit)
## π How It Works
1. **Edit YAML** β You update `projects.yml` or `research_themes.yml`
2. **Jekyll Build** β Plugin calculates stats, generates JSON
3. **Page Load** β JavaScript fetches JSON, renders dynamically
4. **Stats Update** β Counts are always accurate automatically
## π Current Stats (Auto-Calculated)
Based on your current `projects.yml`:
- **Superconducting**: 2 completed, 1 ongoing, 1 potential
- **QEC**: 2 completed, 1 ongoing, 3 potential
- **Tensor Networks**: 0 completed, 0 ongoing, 2 potential
- **Neural Networks**: 0 completed, 1 ongoing, 2 potential
## β¨ Benefits
### Before (Hardcoded)
```javascript
// Had to edit JavaScript file
scTheme.addProject(new Project(
'Fluxonium Erasure',
'Description...',
'/projects/fluxonium_erasure',
'/projects/fluxonium_erasure/images/lvl_diagram.png',
'completed'
));
// Stats manually updated in YAML
After (Data-Driven)
# Just edit YAML file
- id: fluxonium-erasure
title: Fluxonium Erasure
description: Description...
url: /projects/fluxonium_erasure
image: /projects/fluxonium_erasure/images/lvl_diagram.png
status: completed
themes:
- superconducting
# Stats automatically calculated!
π Workflow
Standard Update
- Edit
_data/projects.yml - Run
bundle exec jekyll build - Refresh browser
- Done!
With Live Reload
- Run
bundle exec jekyll serve - Edit YAML files
- Page auto-refreshes
- See changes immediately
π Troubleshooting
Stats not updating?
- Rebuild:
bundle exec jekyll build - Check browser console for errors
- Verify
projects-data.jsonwas generated
Project not showing?
- Check YAML syntax (use YAML validator)
- Verify
themesarray is not empty - Ensure
statusis valid:completed,ongoing, orpotential
Theme not appearing?
- Check icon file exists
- Verify at least one project has this theme
- Rebuild site
π Full Documentation
- DATA_DRIVEN_ARCHITECTURE.md - Complete guide
- _data/README.md - Data files overview
- MODULAR_THEMES.md - Theme structure
π‘ Pro Tips
- Multi-theme projects: Projects can belong to multiple themes
- No page needed: Use
url: nullfor potential projects - No image: Use
image: nullif no thumbnail available - Consistent IDs: Use kebab-case for IDs (e.g.,
my-project) - Short descriptions: Keep under 200 characters for best display
π Youβre Done!
You now have a fully data-driven website. Add projects by editing YAML files - no code changes needed!