Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up sitemap.xml and robots.txt implementation #1355

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 0 additions & 142 deletions app/entry.server.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions app/otherRootRoutes.server.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/routes/$.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { LoaderFunction } from '@remix-run/node'

import type { BreadcrumbHandle } from '~/root/Title'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/_auth.post_logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import { type LoaderFunctionArgs, redirect } from '@remix-run/node'
import { Form, Link, useLoaderData } from '@remix-run/react'
import {
Expand Down
17 changes: 17 additions & 0 deletions app/routes/_seo.robots[.]txt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*!
* Copyright © 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
import { generateRobotsTxt } from '@nasa-gcn/remix-seo'

import { origin } from '~/lib/env.server'

export function loader() {
return generateRobotsTxt([
{ type: 'sitemap', value: `${origin}/sitemap.xml` },
{ type: 'disallow', value: '/user' },
])
}
21 changes: 21 additions & 0 deletions app/routes/_seo.sitemap[.]xml.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*!
* Copyright © 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
import { generateSitemap } from '@nasa-gcn/remix-seo'
import { routes } from '@remix-run/dev/server-build'
import type { LoaderFunctionArgs } from '@remix-run/node'

import { origin } from '~/lib/env.server'

export function loader({ request }: LoaderFunctionArgs) {
return generateSitemap(request, routes, {
siteUrl: origin,
headers: {
'Cache-Control': `public, max-age=${60 * 5}`,
},
})
}
2 changes: 1 addition & 1 deletion app/routes/quickstart.alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import { Form, Link, useSearchParams } from '@remix-run/react'
import { Button, ButtonGroup, FormGroup, Label } from '@trussworks/react-uswds'
import { useState } from 'react'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/quickstart.code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { Form, Link, useLoaderData } from '@remix-run/react'
import { Button, ButtonGroup, FormGroup } from '@trussworks/react-uswds'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/quickstart.credentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { useLoaderData } from '@remix-run/react'

Expand Down
2 changes: 1 addition & 1 deletion app/routes/unsubscribe.$jwt/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import {
Form,
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { UpdateUserAttributesCommand } from '@aws-sdk/client-cognito-identity-provider'
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { useFetcher, useLoaderData } from '@remix-run/react'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.credentials._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { Link, useLoaderData } from '@remix-run/react'

Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.credentials.edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'

import {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.credentials/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'

import type { BreadcrumbHandle } from '~/root/Title'

Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.email._index/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { Link, useFetcher, useLoaderData } from '@remix-run/react'
import { Button, ButtonGroup, Grid, Icon } from '@trussworks/react-uswds'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.email.edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'
import { Form, Link, useLoaderData } from '@remix-run/react'
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.email/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'

import type { BreadcrumbHandle } from '~/root/Title'

Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.endorsements/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { Link, useFetcher, useLoaderData } from '@remix-run/react'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.password/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { DataFunctionArgs } from '@remix-run/node'
import { useFetcher } from '@remix-run/react'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@balavishnuvj/remix-seo'
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import { NavLink, Outlet } from '@remix-run/react'
import { GridContainer } from '@trussworks/react-uswds'

Expand Down
Loading