diff --git a/packages/site/src/seo/meta.ts b/packages/site/src/seo/meta.ts index c4465f3bc..a2804d4c5 100644 --- a/packages/site/src/seo/meta.ts +++ b/packages/site/src/seo/meta.ts @@ -1,4 +1,4 @@ -import type { V2_MetaDescriptor } from '@remix-run/react'; +import type { MetaDescriptor } from '@remix-run/react'; type SocialSite = { title: string; @@ -17,15 +17,15 @@ type SocialArticle = { keywords?: string[]; }; -function allDefined(meta: Record): V2_MetaDescriptor { - return Object.fromEntries(Object.entries(meta).filter(([, v]) => v)) as V2_MetaDescriptor; +function allDefined(meta: Record): MetaDescriptor { + return Object.fromEntries(Object.entries(meta).filter(([, v]) => v)) as MetaDescriptor; } export function getMetaTagsForSite_V1({ title, description, twitter, -}: SocialSite): V2_MetaDescriptor { +}: SocialSite): MetaDescriptor { const meta = { title, description, @@ -38,8 +38,8 @@ export function getMetaTagsForSite({ title, description, twitter, -}: SocialSite): V2_MetaDescriptor[] { - const meta: V2_MetaDescriptor[] = [ +}: SocialSite): MetaDescriptor[] { + const meta: MetaDescriptor[] = [ { title }, { property: 'og:title', content: title }, { name: 'generator', content: 'mystmd' }, @@ -60,7 +60,7 @@ export function getMetaTagsForArticle_V1({ image, twitter, keywords, -}: SocialArticle): V2_MetaDescriptor { +}: SocialArticle): MetaDescriptor { const meta = { title, description, @@ -88,8 +88,8 @@ export function getMetaTagsForArticle({ image, twitter, keywords, -}: SocialArticle): V2_MetaDescriptor[] { - const meta: V2_MetaDescriptor[] = [ +}: SocialArticle): MetaDescriptor[] { + const meta: MetaDescriptor[] = [ { title }, { property: 'og:title', content: title }, { name: 'generator', content: 'mystmd' }, diff --git a/themes/article/app/root.tsx b/themes/article/app/root.tsx index a42782438..68f5c9b43 100644 --- a/themes/article/app/root.tsx +++ b/themes/article/app/root.tsx @@ -1,4 +1,4 @@ -import type { LinksFunction, LoaderFunction, V2_MetaFunction } from '@remix-run/node'; +import type { LinksFunction, LoaderFunction, MetaFunction } from '@remix-run/node'; import tailwind from '~/styles/app.css'; import thebeCoreCss from 'thebe-core/dist/lib/thebe-core.css'; import { getConfig } from '~/utils/loaders.server'; @@ -14,7 +14,7 @@ import { export { AppErrorBoundary as ErrorBoundary } from '@myst-theme/site'; import { Outlet, useLoaderData } from '@remix-run/react'; -export const meta: V2_MetaFunction = ({ data }) => { +export const meta: MetaFunction = ({ data }) => { return getMetaTagsForSite({ title: data?.config?.title, description: data?.config?.description, diff --git a/themes/article/app/routes/$.tsx b/themes/article/app/routes/$.tsx index 50b2bd20f..19d4e4dfc 100644 --- a/themes/article/app/routes/$.tsx +++ b/themes/article/app/routes/$.tsx @@ -3,7 +3,7 @@ import { json, type LinksFunction, type LoaderFunction, - type V2_MetaFunction, + type MetaFunction, } from '@remix-run/node'; import { getMetaTagsForArticle, @@ -23,7 +23,7 @@ import { useRouteError, isRouteErrorResponse } from '@remix-run/react'; type ManifestProject = Required['projects'][0]; -export const meta: V2_MetaFunction = ({ data, matches, location }) => { +export const meta: MetaFunction = ({ data, matches, location }) => { if (!data) return []; const config: SiteManifest = data.config; diff --git a/themes/article/app/routes/_index.tsx b/themes/article/app/routes/_index.tsx index 614435b20..4bae4f1e1 100644 --- a/themes/article/app/routes/_index.tsx +++ b/themes/article/app/routes/_index.tsx @@ -8,7 +8,7 @@ import { import Page from './$'; import { ArticlePageAndNavigation } from '../components/ArticlePageAndNavigation'; import { getConfig, getPage } from '../utils/loaders.server'; -import type { LoaderFunction, V2_MetaFunction } from '@remix-run/node'; +import type { LoaderFunction, MetaFunction } from '@remix-run/node'; import { redirect } from '@remix-run/node'; import { SiteManifest } from 'myst-config'; import { getProject } from '@myst-theme/common'; @@ -17,7 +17,7 @@ import { useRouteError, isRouteErrorResponse } from '@remix-run/react'; type ManifestProject = Required['projects'][0]; -export const meta: V2_MetaFunction = ({ data, location }) => { +export const meta: MetaFunction = ({ data, location }) => { if (!data) return []; const config: SiteManifest = data.config; diff --git a/themes/book/app/root.tsx b/themes/book/app/root.tsx index 92aa7011a..ff444863d 100644 --- a/themes/book/app/root.tsx +++ b/themes/book/app/root.tsx @@ -1,4 +1,4 @@ -import type { LinksFunction, V2_MetaFunction, LoaderFunction } from '@remix-run/node'; +import type { LinksFunction, MetaFunction, LoaderFunction } from '@remix-run/node'; import tailwind from '~/styles/app.css'; import thebeCoreCss from 'thebe-core/dist/lib/thebe-core.css'; import { getConfig } from '~/utils/loaders.server'; @@ -14,7 +14,7 @@ import { export { AppErrorBoundary as ErrorBoundary } from '@myst-theme/site'; import { Outlet, useLoaderData } from '@remix-run/react'; -export const meta: V2_MetaFunction = ({ data }) => { +export const meta: MetaFunction = ({ data }) => { return getMetaTagsForSite({ title: data?.config?.title, description: data?.config?.description, diff --git a/themes/book/app/routes/$.tsx b/themes/book/app/routes/$.tsx index 09d586a29..67c6953e1 100644 --- a/themes/book/app/routes/$.tsx +++ b/themes/book/app/routes/$.tsx @@ -1,6 +1,6 @@ import { json, - type V2_MetaFunction, + type MetaFunction, type LinksFunction, type LoaderFunction, } from '@remix-run/node'; @@ -33,7 +33,7 @@ import type { TemplateOptions } from '../types.js'; import { useRouteError, isRouteErrorResponse } from '@remix-run/react'; type ManifestProject = Required['projects'][0]; -export const meta: V2_MetaFunction = ({ data, matches, location }) => { +export const meta: MetaFunction = ({ data, matches, location }) => { if (!data) return []; const config: SiteManifest = data.config; diff --git a/themes/book/app/routes/_index.tsx b/themes/book/app/routes/_index.tsx index 00c5428da..ffffea266 100644 --- a/themes/book/app/routes/_index.tsx +++ b/themes/book/app/routes/_index.tsx @@ -4,7 +4,7 @@ import { responseNoArticle, responseNoSite, } from '@myst-theme/site'; -import type { LinksFunction, LoaderFunction, V2_MetaFunction } from '@remix-run/node'; +import type { LinksFunction, LoaderFunction, MetaFunction } from '@remix-run/node'; import { json, redirect } from '@remix-run/node'; import { getConfig, getPage } from '~/utils/loaders.server'; import Page from './$'; @@ -13,7 +13,7 @@ import { getProject } from '@myst-theme/common'; type ManifestProject = Required['projects'][0]; -export const meta: V2_MetaFunction = ({ data, location }) => { +export const meta: MetaFunction = ({ data, location }) => { if (!data) return []; const config: SiteManifest = data.config;