Skip to content

hopezh/oat_garden_v01

Repository files navigation

oat_garden_v01

A static GitHub Pages site that hosts a growing collection of standalone HTML pages, presented as a searchable, filterable, tag-grouped card grid.

  • Index UI — React + Vite, with fuzzy search (Fuse.js), multi-select tag filtering, a "group by tag" view, and a dark/light theme toggle.
  • Content — raw .html files live in public/pages/ and are copied into the build untouched (never bundled).
  • Indexerbuild_index.py reads each file's <title> and <meta> tags and regenerates public/posts.json.
  • Deploy — pushing to main triggers GitHub Actions, which re-indexes, builds, and publishes to Pages.

Live site (after first deploy): https://hopezh.github.io/oat_garden_v01/

Local development

npm install
npm run dev        # predev re-runs build_index.py, then starts Vite

The base in vite.config.js is /oat_garden_v01/ so assets resolve under the repo subpath. All fetches/links use import.meta.env.BASE_URL.

Adding a page

  1. Drop a self-contained .html file into public/pages/. Give it a <title> and these <meta> tags so it indexes well:

    <title>My Page Title</title>
    <meta name="description" content="One-sentence summary.">
    <meta name="keywords" content="tag-one, tag-two, tag-three">
    <meta name="date" content="2026-06-01">

    (No date → the file's modification time is used. No title → the filename.)

  2. (Optional) npm run dev to preview — re-indexing happens automatically.

  3. Commit public/pages/<file>.html and public/posts.json, then git push.

The push triggers the workflow; the new card appears on the live site within a minute or two.

Enriching pages with /enrich-pages all

If you'd rather not hand-write the <meta> tags, run the /enrich-pages slash command in Claude Code from the project root:

/enrich-pages all

It scans every .html file in public/pages/, and for any page missing a description, keywords, or date <meta> tag, it reads the page content, generates sensible values, and inserts the tags in place. The all argument processes the whole folder; omit it to enrich only pages added or changed since the last run. When it finishes, it re-runs build_index.py so public/posts.json reflects the new metadata. Review the edits, then commit and push as usual.

Project layout

.github/workflows/deploy.yml   # CI: re-index, build, deploy to Pages
public/
  pages/                       # standalone .html files
  posts.json                   # generated by build_index.py
src/
  App.jsx                      # fetch + search + filter + theme state
  components/                  # SearchBar, TagFilter, PostCard, CardGrid, ThemeToggle
  hooks/useTheme.js            # data-theme on <html>, persisted to localStorage
  theme.css                    # Fraunces + teal design tokens (light/dark)
build_index.py                 # the indexer (stdlib only)
vite.config.js                 # base: '/oat_garden_v01/'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors