diff --git a/app/routes/robots[.]txt.tsx b/app/routes/robots[.]txt.tsx deleted file mode 100644 index 40e8634..0000000 --- a/app/routes/robots[.]txt.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { LoaderFunction } from "@remix-run/node"; -import dedent from "dedent"; -import { BASE_PROD_URL } from "~/hooks/useCanonicalUrl"; - -export const loader: LoaderFunction = async () => { - const robotsText = dedent` - User-Agent: * - - Host: ${BASE_PROD_URL} - Sitemap: ${BASE_PROD_URL}/sitemap.xml - `; - - return new Response(robotsText, { - status: 200, - headers: { - "Content-Type": "text/plain", - "x-content-type-options": "nosniff", - "Cache-Control": `public, max-age=${60 * 10}, s-maxage=${60 * 60 * 24}`, - }, - }); -}; diff --git a/docs/definition-of-done.md b/docs/definition-of-done.md index 3f27648..d21b59f 100644 --- a/docs/definition-of-done.md +++ b/docs/definition-of-done.md @@ -32,9 +32,10 @@ - Animation - [x] Page Transitions + - [ ] Disable Animations on Reduced Motion - Deployment - - [x] CI/CD - - [x] Cloud Provider (Vercel, Netlify, etc.) - - [ ] Redirects + - [x] CI/CD: Github Actions + - [x] Deploy Provider: Vercel + - [x] Redirects: `vercel.json` diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..4e32f41 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-Agent: * + +Host: http://rcrd.space +Sitemap: http://rcrd.space/sitemap.xml \ No newline at end of file diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..c019692 --- /dev/null +++ b/vercel.json @@ -0,0 +1,22 @@ +{ + "headers": [ + { + "source": "/fonts/ibm-plex-sans-var.woff2", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + }, + { + "source": "/robots.txt", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=600, s-maxage=864000" + } + ] + } + ] +}