Launch Express comes with built-in SEO capabilities, leveraging Next.js powerful metadata API. This guide will help you understand and utilize the SEO features in your Launch Express project.
The SEO functionality is centralized in the src/lib/seo.ts
file. This file provides a set of utilities to generate consistent and customizable metadata for your pages and blog posts.
You can configure the default metadata in the src/config/config.ts
file:
To generate metadata for a page, use the generateMetadata
function:
For blog posts, use the generateBlogMetadata
function:
At least don’t forget to add an custom image for the opengraph and twitter cards. You can do this by replacing the existing files in the src/app
folder:
src/app/opengraph-image.jpg
src/app/twitter-image.jpg