@exile-watch/seo

Search Optimization Engine tooling that powers exile.watch

exile.watch logo

This package contains SEO meta configs, Next SEO dependency and a script to generate sitemap.xml that powers exile.watch SEO.

About Next SEO

Next SEO is a plugin that makes managing your SEO easier in Next.js projects.

Usage

  1. Install the package as a dependency:

npm i @exile-watch/seo

  1. Example of Next SEO usage with metaEncountersCategories configuration:

// EncountersCategory.page.tsx
import { metaEncountersCategories } from "@exile-watch/seo";
import { startCase } from "lodash";
import { NextSeo } from "next-seo";
import { useRouter } from "next/router";
import React from "react";
import { Layout } from "#components";
import ListEncounterCategories from "./_components/ListEncounterCategories/ListEncounterCategories";

const EncountersCategoryPage = () => {
  const {
    query: { directory, category },
  } = useRouter();

  return (
    <>
      {directory && category && (
        <NextSeo {...metaEncountersCategories({ directory, category })} />
      )}

      <Layout label={startCase(category as string)}>
        <ListEncounterCategories />
      </Layout>
    </>
  );
};

export { EncountersCategoryPage };

Last updated

Was this helpful?