Files
open-saas/template/blog/public/banner-images
vincanger 54b4141820 update astro starlight & blog plugin (#334)
* update astro starlight & blog plugin

* Delete logo.png

* fix twitter preview image & add readme

* improve banner image assignments & docs perf

* change default banner

* change image name

* keep tabs on the tabs
2024-12-04 10:34:07 +01:00
..

OG Images & Banner Images

When images are stored in this directory, they are automatically used as Open Graph (social media preview) Images and Cover/Banner Images for each blog post.

Images stored here must follow the naming convention <post-slug>.webp and must always be .webp files, e.g. 2023-11-21-coverlettergpt.webp.

This is because OG Image URLs and Banner Images are automatically generated for each blog post based on the logic in the custom Title and Head components, e.g. src/components/HeadWithOGImage.astro:

const ogImageUrl = new URL(
  `/banner-images/${Astro.props.id.replace(/blog\//, '').replace(/\.\w+$/, '.webp')}`,
  Astro.site,
)