Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can aliased ingredients display their original name in the ingredient list? #18

Open
librarianmage opened this issue Sep 2, 2024 · 3 comments

Comments

@librarianmage
Copy link

I expected the first use of @whole wheat tortillas|tortillas{} to display as "tortillas" in the instructions and "whole wheat tortillas" in the ingredients list, but it displays as "tortillas" for both.

@Zheoni
Copy link
Contributor

Zheoni commented Sep 2, 2024

The way it's implemented now this is what it's supposed to happen. When you give a component an alias you change how it's displayed while keeping the original name to use for references. I think it would be (more) confusing if now the alias only works in the steps but not in the list.

In the ingredients list only the ingredient definitions appear. To do what you want you can use the modes and references extensions to put the definition of the tortillas out of the steps. Here is a full example:

-- automatic references
>> [duplicate]: ref

-- create the 'tortillas' definition and add an alias to show in the list
>> [define]: ingredients
@tortillas|whole wheat tortillas{}

-- go back to the default mode and write the recipe
>> [define]: default
Use the @tortillas

I think this is consistent with how the aliases work, but I'm open to ideas on how it can be improved.

@bthomaslake
Copy link

bthomaslake commented Sep 2, 2024

I've started to do this using component notes.

@tortillas{}(whole wheat)

The note seems to take a lot of room in the rendered output (it breaks up the ingredient list and can look messy when many ingredients have these notes), but it's close enough to what I am looking for for me to start using it regularly.

Published recipes also frequently seem to merge basic preparation details into the ingredient definition list, and I've been using component notes to match that notation style as well.

-- Instead of writing the preparation detail separately, it is just appended to the ingredient itself
@carrot{2}(finely chopped)

I've started to like putting more detail into the initial ingredient list since it seems to make the directions easier to skim and digest. I think either adding a toggle to aliases or adding a feature for compactly cramming details in the ingredient list could be very useful.

@T045T
Copy link

T045T commented Jan 23, 2025

+1 on this.

I also expected aliases to work like this. I can see how it might be confusing static text output, but the rendered web pages highlight ingredients in the list on hover, so I think it's fine.

Not sure how much weight this carries, but this is the recipe I was transcribing when I ran into this problem: https://www.thekitchn.com/recipe-spicy-peanut-tempeh-bowl-240233
Particularly, short-grain brown rice -> rice and low-sodium soy sauce -> soy sauce

Also, thanks for sharing the workaround!

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

No branches or pull requests

4 participants