next-forgenext-forge
Mask

SEO

How we optimize your site for search engines.

Metadata

next-forge has a relatively simple SEO setup. We rely on Next.js's built-in Metadata functionality to handle most of our SEO needs. Specifically, the @repo/design-system package provides a createMetadata function that you can use to generate metadata for your pages. For example:

page.tsx
import { createMetadata } from '@repo/design-system/lib/metadata';
 
export const metadata = createMetadata({
  title: 'My Page',
  description: 'My page description',
});

While this looks similar to just exporting a metadata object from your page, the createMetadata function deep merges your metadata with our default metadata, allowing you to customize only the metadata that you need to. It's also much easier to specify a cover photo for the page, for example:

page.tsx
import { createMetadata } from '@repo/design-system/lib/metadata';
 
export const metadata = createMetadata({
  title: 'My Page',
  description: 'My page description',
  image: '/my-page-image.png', 
});

JSON-LD

We rely on next-seo's ArticleJsonLd component to generate JSON-LD for blog posts. It's currently wired up to convey the title, description, author, date published, and tags. This is fully validated Google structured data validated JSON-LD markup for the ARTICLE schema markup type and should make your blog posts more likely to be featured in Google Search results.

On this page