Skip to content

Commit

Permalink
Merge pull request #25 from tommyasai/seo
Browse files Browse the repository at this point in the history
Resolve the dependency conflict by replacing the remix-seo module
  • Loading branch information
tommyasai authored Sep 21, 2023
2 parents 95226a8 + 0e66668 commit 854f10a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 99 deletions.
5 changes: 0 additions & 5 deletions app/entry.server.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { EntryContext, HandleDataRequestFunction } from "@remix-run/node";
import { RemixServer } from "@remix-run/react";
import { renderToString } from "react-dom/server";
import { otherRootRouteHandlers } from "./utils/otherRouteRoutes.server";
import { getEnv } from "./env.server";

global.ENV = getEnv();
Expand All @@ -12,10 +11,6 @@ export default async function handleRequest(
responseHeaders: Headers,
remixContext: EntryContext,
) {
for (const handler of otherRootRouteHandlers) {
const otherRouteResponse = await handler(request, remixContext);
if (otherRouteResponse) return otherRouteResponse;
}
const markup = renderToString(
<RemixServer context={remixContext} url={request.url} />,
);
Expand Down
2 changes: 1 addition & 1 deletion app/routes/posts.$slug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import invariant from "tiny-invariant";
import { getPost, getPostListings } from "~/models/post.server";
import ReactMarkdown from "react-markdown";
import { siteMetadata } from "~/siteMetadata";
import type { SEOHandle } from "@balavishnuvj/remix-seo";
import type { SEOHandle } from "@nasa-gcn/remix-seo";
import twitterLogo from "../assets/x.png";
import { useEffect, useState } from "react";
import { useOptionalAdminUser } from "~/utils";
Expand Down
10 changes: 10 additions & 0 deletions app/routes/sitemap[.]xml.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { routes } from "@remix-run/dev/server-build";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { generateSitemap } from "@nasa-gcn/remix-seo";
import { siteMetadata } from "~/siteMetadata";

export function loader({ request }: LoaderFunctionArgs) {
return generateSitemap(request, routes, {
siteUrl: siteMetadata.url,
});
}
30 changes: 0 additions & 30 deletions app/utils/otherRouteRoutes.server.ts

This file was deleted.

118 changes: 57 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"/seeds/seed.js"
],
"dependencies": {
"@balavishnuvj/remix-seo": "^1.0.2",
"@nasa-gcn/remix-seo": "^2.0.0",
"@prisma/client": "^5.1.1",
"@remix-run/css-bundle": "^2.0.0",
"@remix-run/node": "^2.0.0",
Expand Down Expand Up @@ -59,4 +59,4 @@
"prisma": {
"seed": "ts-node prisma/seed.ts"
}
}
}

1 comment on commit 854f10a

@vercel
Copy link

@vercel vercel bot commented on 854f10a Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tommyasai – ./

tommyasai.vercel.app
tommyasai-tommyasai.vercel.app
tommyasai-git-main-tommyasai.vercel.app

Please sign in to comment.