Skip to content

Comments

Add Recipe and Recipe Collection Lexicons#28

Open
jhuckabee wants to merge 1 commit intolexicon-community:mainfrom
recipe-exchange:recipes
Open

Add Recipe and Recipe Collection Lexicons#28
jhuckabee wants to merge 1 commit intolexicon-community:mainfrom
recipe-exchange:recipes

Conversation

@jhuckabee
Copy link

This PR introduces two new lexicons for sharing recipes on the AT Protocol:

  • community.lexicon.recipes.recipe: A schema for individual recipes
  • community.lexicon.recipes.collection: A schema for organizing recipes into collections

A version of these lexicons is currently in production use at recipe.exchange.

The recipe schema is heavily inspired by Schema.org's Recipe type with two notable distinctions:

  1. Custom attribution properties to clearly denote recipe authorship and licensing
  2. Multi-image support using the same pattern as app.bsky.feed.post

The recipe lexicon currently reuses app.bsky.embed.defs#aspectRatio for image handling. However, I suspect this may warrant redefinition within the community lexicon. I’m eager to hear others’ thoughts on this.

Examples of usage are provided in the README.

License and Assignment

  • I assign all rights of this contribution to Lexicon Community as an open source contribution under the MIT license.

@ebwinters
Copy link
Contributor

This is great to see! Also interesting to read through having used recipe exchange.

Personally I don't see a reason to re-define aspect ratio in this repo. The events lexicon uses a com.atproto.strongRef, but we don't re-define that. Might make more sense if we were defining it within the context of a community image lexicon. There might be another limitation or design considering I'm not thinking of

@verdverm
Copy link

verdverm commented Feb 9, 2025

Some initial thoughts from a brief look:

  1. each step or instruction as a rich text would be helpful, so one could show media (image,video) during the process
  2. string fields should include a maxGraphemes to support international languages
  3. I'm still unclear about tokens being in a def vs separate lexicon. I've seen both, the theory for the latter is that tokens can be add/del without changes to the primary lexicon that uses or references them

A more general comment, are recipes a lexicon that even belongs in a shared repository / namespace? This seems very application specific. What sorts of guidelines do we have around they types or content of lexicon that belong here?

@snarfed
Copy link
Member

snarfed commented Feb 10, 2025

Microformats2's h-recipe (and its predecessor hRecipe) are also prior art here.

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.

4 participants