Skip to content

feat: add og images for blog articles#228

Merged
Barbapapazes merged 14 commits intounjs:mainfrom
aksharahegde:blog-article-og-image
Jan 10, 2024
Merged

feat: add og images for blog articles#228
Barbapapazes merged 14 commits intounjs:mainfrom
aksharahegde:blog-article-og-image

Conversation

@aksharahegde
Copy link
Contributor

@aksharahegde aksharahegde commented Jan 9, 2024

🔗 Linked issue

fix #220

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 📰 Content (a new article or a change in the content folder)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Dynamically generate the OG image for blog article with title and description of article.

Sample
Screenshot_2024-01-09-23-42-07_1920x1080

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@aksharahegde aksharahegde changed the title Dynamic OG Image for blog articles using nuxt-seo feat: Dynamic OG Image for blog articles using nuxt-seo Jan 9, 2024
@nuxt-studio
Copy link
Contributor

nuxt-studio bot commented Jan 9, 2024

Live Preview ready!

Name Edit Preview Latest Commit
unjs-website Edit on Studio ↗︎ View Live Preview cd3c204

@Barbapapazes Barbapapazes changed the title feat: Dynamic OG Image for blog articles using nuxt-seo feat: add og images for blog articles Jan 10, 2024
@Barbapapazes
Copy link
Member

Thanks @aksharahegde to have started the work on it! 💛

I will need to try it on Cloudflare because the _route.json could be too long

`_route.json`

{
"version": 1,
"include": [
"/"
],
"exclude": [
"/_nuxt/
",
"/__studio.json",
"/_payload.json",
"/200.html",
"/404.html",
"/favicon.svg",
"/index.html",
"/robots.txt",
"/rss.xml",
"/sitemap.xml",
"/sitemap/style.xsl",
"/api/search.txt",
"/blog/_payload.json",
"/blog/index.html",
"/blog/rss.xml",
"/build/rss.xml",
"/categories/_payload.json",
"/categories/index.html",
"/css/nuxt-google-fonts.css",
"/design-kit/_payload.json",
"/design-kit/index.html",
"/explore/rss.xml",
"/fonts/Nunito-300-1.woff2",
"/fonts/Nunito-300-2.woff2",
"/fonts/Nunito-300-3.woff2",
"/fonts/Nunito-300-4.woff2",
"/fonts/Nunito-300-5.woff2",
"/learn/rss.xml",
"/og/blog.jpg",
"/og/design-kit.jpg",
"/og/home.jpg",
"/og/search.jpg",
"/packages/_payload.json",
"/packages/index.html",
"/rss/_payload.json",
"/rss/index.html",
"/search/_payload.json",
"/search/index.html",
"/api/_content/cache.1704896336903.json",
"/api/content/packages.json",
"/assets/header/ellipse.png",
"/assets/header/ellipse.svg",
"/assets/logos/bundle-runner.svg",
"/assets/logos/c12.svg",
"/assets/logos/changelogen.svg",
"/assets/logos/citty.svg",
"/assets/logos/consola.svg",
"/assets/logos/cookie-es.svg",
"/assets/logos/defu.svg",
"/assets/logos/destr.svg",
"/assets/logos/fontaine.svg",
"/assets/logos/fs-memo.svg",
"/assets/logos/get-port-please.svg",
"/assets/logos/giget.svg",
"/assets/logos/h3.svg",
"/assets/logos/hookable.svg",
"/assets/logos/httpxy.svg",
"/assets/logos/image-meta.svg",
"/assets/logos/ipx.svg",
"/assets/logos/jimp-compact.svg",
"/assets/logos/jiti.svg",
"/assets/logos/knitwork.svg",
"/assets/logos/listhen.svg",
"/assets/logos/magic-regexp.svg",
"/assets/logos/magicast.svg",
"/assets/logos/mkdist.svg",
"/assets/logos/mlly.svg",
"/assets/logos/mongoz.svg",
"/assets/logos/nanotar.svg",
"/assets/logos/nitro.svg",
"/assets/logos/node-fetch-native.svg",
"/assets/logos/nypm.svg",
"/assets/logos/ofetch.svg",
"/assets/logos/ohash.svg",
"/assets/logos/pathe.svg",
"/assets/logos/perfect-debounce.svg",
"/assets/logos/pkg-types.svg",
"/assets/logos/radix3.svg",
"/assets/logos/rc9.svg",
"/assets/logos/scule.svg",
"/assets/logos/serve-placeholder.svg",
"/assets/logos/std-env.svg",
"/assets/logos/theme-colors.svg",
"/assets/logos/ufo.svg",
"/assets/logos/unbuild.svg",
"/assets/logos/uncrypto.svg",
"/assets/logos/unctx.svg",
"/assets/logos/unenv.svg",
"/assets/logos/ungh.svg",
"/assets/logos/unhead.svg",
"/assets/logos/unimport.svg",
"/assets/logos/unpdf.svg",
"/assets/logos/unplugin.svg",
"/assets/logos/unstorage.svg",
"/assets/logos/untun.svg",
"/assets/logos/untyped.svg",
"/assets/logos/uqr.svg",
"/assets/logos/webpackbar.svg",
"/blog/2023-08-15-h3-towards-the-edge-of-the-web/_payload.json"
]
}

@Barbapapazes
Copy link
Member

@Barbapapazes Barbapapazes merged commit a5b3c19 into unjs:main Jan 10, 2024
@aksharahegde
Copy link
Contributor Author

Thanks @aksharahegde to have started the work on it! 💛

I will need to try it on Cloudflare because the _route.json could be too long

_route.json

Thank you @Barbapapazes for your feedback and also optimizing my PR. 💛

I will have to read about cloudflare deployment. Haven't deployed any SSR there till date. 😃

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.

Add og for blog

2 participants