AfterClass-io / afterclass.io-v2

[alpha] v2 of https://afterclass.io!
https://afterclass-io.vercel.app
MIT License
4 stars 2 forks source link

feat: add favicon and og image #155

Closed jeromeandrewong closed 1 month ago

jeromeandrewong commented 1 month ago

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

vercel[bot] commented 1 month ago

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
davidlhw commented 1 month ago

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

jeromeandrewong commented 1 month ago

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