How callaginn/menu-schema-generator works
This is a small browser-side library: a host page calls build(), which reads the live DOM menu, constructs schema.org menu data, and attaches it to an existing or new JSON-LD script. The README documents price-to-Offer conversion, bar departments, merge behavior, and completion callbacks. Internal stages are shown at a high level; the excerpt is partial, so finer call relationships are not inferred.
Main entry points: MenuSchemaGenerator.js Build workflow
Components 7
Other components
- Host page
- Live menu DOM
- Build workflow
MenuSchemaGenerator.js - Menu parsing
MenuSchemaGenerator.js - Schema assembly
MenuSchemaGenerator.js - JSON-LD attachment
MenuSchemaGenerator.js - Completion callback
MenuSchemaGenerator.js
Connections 6
- Host page → Build workflow: calls build
README.md - Build workflow → Live menu DOM: reads menu
README.md - Build workflow → Menu parsing: parses page
README.md - Menu parsing → Schema assembly: emits menu data
README.md - Schema assembly → JSON-LD attachment: attaches schema
README.md - Build workflow → Completion callback: fires callback
README.md