Quick Recipe Vault is a static website that reads recipes from Markdown files in this repository (/recipes).
This makes the recipe collection publicly visible and collaboratively editable through GitHub commits/PRs.
Tags are sourced from recipes/metadata.json so filtering and editor tagging only use known tags.
- Public recipe storage in repo files instead of browser-local storage.
- Recipe format based on Markdown + frontmatter (
title,calories,tags,citation,images). - Horizontal sliding gallery with search + tag filter + calorie cap filter.
- Smart ingredient search with synonym expansion (e.g. 牛肉 ⇒ 牛肋条 / 和牛 / beef variants).
- "🎲 I'm Feeling Hungry" button to jump to a random recipe from current filtered results.
- Language switcher (English / 中文) and light/dark mode toggle.
- Adaptive image rendering (no hard-cropping in modal/gallery previews).
- Modal-based upload/recipe editor with three rich editors: Ingredients, Instructions, and 成品演示.
- Supports multiple pasted images per editor, attachment previews, and removing images with sync between editor and attachment list.
Each recipe is a Markdown file under /recipes, for example recipes/my-recipe.md:
---
title: My Recipe
calories: 780
tags: hosting-event, dinner
images:
- recipes/images/my-recipe/photo1.jpg
- recipes/images/my-recipe/photo2.jpg
---
## Ingredients
- item 1
- item 2
## Instructions
1. Step one
2. Step two- Open the website and click Create Recipe (or edit an existing one via the card edit button).
- Fill the form; tags must come from known tags in
recipes/metadata.json, and optionally add a citation link to the original recipe. - Click GitHub Login once and save your token in browser-local settings (owner/repo are fixed to this repo).
- You can create a token here: https://github.com/settings/tokens
- Click Create Pull Request to create/update markdown in
/recipesand updaterecipes/index.jsonon a new branch with an auto-created PR.
Serve files from the repo root (required so fetch("recipes/index.json") works):
python -m http.server 8000Then open: http://localhost:8000
- Push this repository to GitHub.
- Open Settings → Pages.
- Set Source to Deploy from a branch.
- Select branch main (or default) and folder / (root).
- Save and wait for deployment.
- Use the site URL shown by Pages (
https://<user>.github.io/<repo>/).
- Hard refresh the page (
Ctrl+Shift+R/Cmd+Shift+R). - This project appends a version query string to
styles.cssandapp.jsinindex.htmlto reduce stale-cache issues after deploys.
Yes, this can happen if conflicts were resolved by keeping older index.html references or older asset files.
Checklist:
- Confirm
index.htmlcontains the latest query-string versions for CSS/JS (for example?v=20260403e). - Confirm
app.jsshows the latestBUILD_VERSIONin the page footer. - Hard refresh (
Ctrl+Shift+R/Cmd+Shift+R). - In GitHub Pages settings, verify branch/folder still points to your intended source.
If you see 404 for markdown recipe files on GitHub Pages, keep a .nojekyll file in repo root so Pages serves markdown files as static assets.
This repo includes .github/workflows/auto-approve-recipes.yml to auto-approve and auto-merge PRs that only modify recipes/*.md.
Workflow now uses default github.token with repository contents:write and pull-requests:write permissions. Optional bot token is no longer required.