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

feat: add favicon and og image #155

Merged
merged 3 commits into from
Jun 7, 2024
Merged

feat: add favicon and og image #155

merged 3 commits into from
Jun 7, 2024

Conversation

jeromeandrewong
Copy link
Contributor

@jeromeandrewong jeromeandrewong commented Jun 3, 2024

added og image (fil- based) and favicon
cant seem to test og image on preview branches but the meta tags are there when we inspect the page

Copy link

vercel bot commented Jun 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
afterclass-io-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 3:15am

@jeromeandrewong jeromeandrewong changed the title feat: add favicon and og iamge feat: add favicon and og image Jun 3, 2024
@jeromeandrewong jeromeandrewong requested a review from davidlhw June 3, 2024 17:20
@davidlhw
Copy link
Contributor

davidlhw commented Jun 4, 2024

seems like we're not able to see ogimage previews on these links because nextauth demand that visitors to the ogimage url be authenticated (favicon works for me, likely cause it was excluded in nextauth)

after digging a little deeper, it seems we might not need a configuration pattern like "auth for all pages except xyz", but should instead go for "auth required for pages abc"

let's update middleware to only require auth for the path /submit for now. the other pages can handle auth sessions individually, either by allowing partial content, or by appending the route to the middleware matched

cc @Jaylin0312

Copy link
Contributor

@davidlhw davidlhw left a comment

Choose a reason for hiding this comment

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

thanks for the PR!

seems good aside from the auth middleware

we might want to think of using dynamically generated ogimages in the future alongside introduction of #127

maybe with the use of vercel/og

@davidlhw davidlhw added the enhancement New user-facing feature or request. This Label is used as a category on release notes. label Jun 4, 2024
@jeromeandrewong
Copy link
Contributor Author

seems like we're not able to see ogimage previews on these links because nextauth demand that visitors to the ogimage url be authenticated (favicon works for me, likely cause it was excluded in nextauth)

after digging a little deeper, it seems we might not need a configuration pattern like "auth for all pages except xyz", but should instead go for "auth required for pages abc"

let's update middleware to only require auth for the path /submit for now. the other pages can handle auth sessions individually, either by allowing partial content, or by appending the route to the middleware matched

cc @Jaylin0312

thanks for investigating, made the change to our middleware and checked that og image is working using linkedin post inspector
CleanShot 2024-06-07 at 11 12 23@2x

Copy link
Contributor

@davidlhw davidlhw left a comment

Choose a reason for hiding this comment

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

CLGTM @ f48074e!

@davidlhw davidlhw merged commit b5a9073 into main Jun 7, 2024
5 checks passed
@davidlhw davidlhw deleted the feat/favicon-and-og branch June 7, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New user-facing feature or request. This Label is used as a category on release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Auth] reconfigure middleware [Feat] load favicon and generic page metadata
2 participants