A single GitHub Pages site that links out to every Cheatsheet from this repository. Add a subfolder with an index.html, update projects.json, and it appears on the hub automatically.
https://nilayb12.github.io/Cheatsheet/
Cheatsheet/
├── index.html # Hub page (structure only)
├── style.css # All styles and design tokens
├── main.js # Fetch, validate, render, search/filter
├── projects.json # Project list — edit this to add entries
├── projects.schema.json # JSON Schema for editor validation
├── 404.html # Custom not-found page
├── README.md # This file
├── .github/
│ └── workflows/
│ └── update-projects.yml # Auto-discovers new subfolders on push
└── my-project/
└── index.html # Each project lives in its own subfolder
Option 1 — manually (instant):
- Create a subfolder with your project's
index.html. - Add an entry to
projects.json:
{
"name": "My Project",
"path": "my-project",
"desc": "A short description.",
"icon": "✨",
"tags": ["tool"],
"status": "live"
}- Push. GitHub Pages deploys both the hub and the subfolder.
Option 2 — automatically (via GitHub Actions):
- Push a subfolder containing an
index.html. - The
update-projects.ymlworkflow detects it, adds a placeholder entry toprojects.json, validates the file, and commits it. - Fill in the
name,desc, andiconfields in the committedprojects.jsonafterwards.
| Field | Required | Type | Description |
|---|---|---|---|
name |
✅ | string | Display name on the card |
path |
✅ | string | Subfolder name — letters, numbers, hyphens, underscores only |
desc |
string | Short description shown below the name | |
icon |
string (emoji) | Card icon — defaults to 📁 | |
status |
live | wip | archived |
Badge shown on the card — defaults to live |
|
tags |
string[] | Category labels — appear as filterable chips on the hub |
projects.json references projects.schema.json via its $schema field. Editors that support JSON Schema (VS Code, JetBrains, etc.) will validate fields and autocomplete values automatically with no plugin required.
All visual tokens (colours, fonts) are CSS variables at the top of style.css:
:root {
--bg: #0e0e0f;
--accent: #c8f060; /* ← change this to re-theme the whole hub */
/* … */
}Update the <p class="eyebrow"> in index.html and the Open Graph <meta> tags to match your actual repo URL.
The update-projects.yml workflow runs on every push to main that touches an index.html or projects.json. It:
- Scans all subfolders for an
index.html - Adds placeholder entries for new subfolders
- Removes entries whose folder has been deleted
- Validates the result against
projects.schema.jsonusing ajv — the push fails if validation errors are found - Commits the updated
projects.jsonwith[skip ci]to avoid a loop
The workflow can also be triggered manually from the Actions tab via "Run workflow".