Skip to content

Unify recipe source of truth instead of hand-maintaining JSON-LD and HTML separately #23

@aefhm

Description

@aefhm

Problem

Each recipe file stores the same recipe twice.

One copy is the JSON-LD schema for search engines.
The other copy is the HTML shown on the page.

Because both copies are written by hand, they can drift apart.
This makes recipe edits slower and makes mistakes more likely.

Desired result

A recipe should be written once.
The build should generate both the page HTML and the JSON-LD from that one source.

Done when

  • each recipe has one source of truth
  • generated HTML and generated JSON-LD stay in sync
  • existing recipe URLs do not change
  • the local build stays simple to run

Not in scope

This issue is about content generation, not a recipe page redesign.

Current context

The current build in Makefile extracts a hand-written <main> block and a hand-written JSON-LD block from each recipe source file and inserts both into template.html.

Example recipe:

  • src/recipes/kung-pao-chicken.html

Relevant build file:

  • Makefile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions