Skip to content

Add section headers to ingredient and direction lists - #89

Open
edinel wants to merge 1 commit into
clarklab:gh-pagesfrom
edinel:section-headers
Open

Add section headers to ingredient and direction lists#89
edinel wants to merge 1 commit into
clarklab:gh-pagesfrom
edinel:section-headers

Conversation

@edinel

@edinel edinel commented Sep 1, 2026

Copy link
Copy Markdown

What

Lets a recipe group its ingredients and directions under section headers
(e.g. "For the sofrito", "For the paella") for recipes with distinct
sub-preparations.

An ingredients or directions entry whose text begins with # renders
as a styled heading instead of a list item:

ingredients:
  - "# For the sofrito"
  - "1/4 cup extra-virgin olive oil"
  - "# For the paella"
  - "3/4 cup Bomba rice"

Details

  • Purely additive: flat string lists are untouched, so existing recipes
    render exactly as before.
  • Header <li>s carry no itemprop, so they're excluded from the
    schema.org recipeIngredient / recipeInstructions data.
  • Header <li>s are skipped by the click-to-check script (no checkbox,
    no scroll toggle).
  • Not applied to the component-recipe loops in this PR; the same
    three-line guard could be added there too.

🤖 Generated with Claude Code

An ingredient or direction entry beginning with "# " renders as a
section header (styled heading, no checkbox, no schema.org itemprop)
instead of a list item. Flat string lists are unchanged, so existing
recipes are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant