Skip to content

SEO Configuration

Fresh

Source: shipfa.st/docs/features/seo

Setup

  1. Open config.js and set appName, appDescription, and domainName. These become default SEO tags.

  2. The helper /libs/seo.js adds all important SEO tags to all pages via the main /app/layout.js.

Per-Page SEO Tags

javascript
import { getSEOTags } from "@/libs/seo";

export const metadata = getSEOTags({
  title: "Terms and Conditions | ShipFast",
  canonicalUrlRelative: "/tos",
});

export default async function TermsAndConditions() {
  // ...
}

TIP

Set title and canonicalUrlRelative for each page.

Structured Data (Schema Markup)

javascript
import { renderSchemaTags } from "@/libs/seo";

export default function Page() {
  return (
    <>
      {renderSchemaTags()}
      <main className="flex min-h-screen flex-col items-center justify-center">
        <h1 className="text-3xl font-extrabold">Ship Fast</h1>
      </main>
    </>
  );
}

Sitemap & Robots

Add your root URL to siteUrl in next-sitemap.config.js. This generates sitemap.xml and robots.txt at build time.

Claim domain ownership on Google Search Console for faster indexing.

Blog for SEO

In /app/blog/_assets/content.js, add your blog content. ShipFast auto-generates a full blog. See the Blog component.

See Also