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

fix: Missing Title and Metadata #2770

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

This restores the recipe tab title (again) and fixes the open graph metadata by using Beautiful Soup to parse the HTML before serving it.

Which issue(s) this PR fixes:

(REQUIRED)

N/A, discussed in Discord

Testing

Pytest. I can't get a local prod instance running to verify this actually works, though I think the tests are comprehensive. If whoever reviews this PR can build a prod instance and verify the metadata appears as it should, that'd be great. My goal with the metadata fixes is to restore the social share previews (e.g. sharing a link on Discord).

@michael-genson michael-genson marked this pull request as draft December 4, 2023 15:53
@michael-genson
Copy link
Collaborator Author

Kuchenpirat was able to build it locally and test the social preview and it's still seeing the old tags, so I'm guessing adding them server side isn't enough. Will investigate

@michael-genson michael-genson marked this pull request as ready for review December 5, 2023 14:46
@michael-genson
Copy link
Collaborator Author

Made some tweaks to fix the recipe share link and Kuchenpirat confirmed everything's working now. Images are only showing up on some social apps (e.g. Discord), but I think that has something to do with the image size. I'll investigate and try to open another PR, but this PR successfully restores the busted metadata.

@Kuchenpirat
Copy link
Collaborator

Kuchenpirat commented Dec 5, 2023

just to add some screenshots:

left side: Discord: where the image of the recipe works
right side: Signal wich apparently needs to have a smaller image size provided

image

update:
just tried a few additional message services. Also works on WhatsApp, Instagram and Telegram so signal seems to be an outlier

@Kuchenpirat
Copy link
Collaborator

only think that should be noted is that the browser does currently not recieve the updated metadata so here the meta tags will show the default mealie metadata.

But this is also the current behaviour for mealie.

Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some more testing and had a good look through the code. LGTM

Besides Signal every platform i tested it on worked flawlessly.

@Kuchenpirat Kuchenpirat merged commit 1d1d61d into mealie-recipes:mealie-next Dec 6, 2023
6 checks passed
@michael-genson michael-genson deleted the fix/missing-tab-title-and-meta branch December 6, 2023 15:07
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.

2 participants