Static JSON API for quotes, hosted on GitHub Pages. It ships pagination, tag browsing, and a lightweight client-side search index. Build artifacts are generated daily via GitHub Actions and deployed automatically.
- Static JSON endpoints (fast, free, and cache-friendly).
- Daily deterministic quote (same quote for everyone each day).
- Pagination with stable page sizing.
- Tags with per-tag JSON endpoints.
- Search index for fast client-side filtering.
- Clean docs site generated on build.
GET /api/quotes.json- full datasetGET /api/quotes/index.json- pages indexGET /api/quotes/page-1.json- paginated quotesGET /api/daily.json- deterministic daily quoteGET /api/tags.json- tags listGET /api/tags/{tag}.json- quotes by tagGET /api/search-index.json- token search indexGET /api/health.json- build health info
npm install
npm run buildBuild output goes to docs/. Open docs/index.html or serve it with any static server.
const base = "https://<user>.github.io/<repo>";
const daily = await fetch(`${base}/api/daily.json`).then(r => r.json());
console.log(daily.quote);
const all = await fetch(`${base}/api/quotes.json`).then(r => r.json());
const results = all.quotes.filter(q => q.quote.toLowerCase().includes("focus"));
console.log(results.slice(0, 5));- Push this repo to GitHub.
- In repo settings, go to Pages and set Source to GitHub Actions.
- The workflow in
.github/workflows/pages.ymlbuilds and deploys on every push and daily schedule.
Quotes live in data/quotes.json:
{
"id": "q-001",
"quote": "Small steps, done daily, create big change.",
"author": "Unknown",
"tags": ["consistency", "growth"]
}MIT (add if needed).
