diff --git a/web/components/NoSEO.tsx b/web/components/NoSEO.tsx new file mode 100644 index 00000000..f72907c8 --- /dev/null +++ b/web/components/NoSEO.tsx @@ -0,0 +1,10 @@ +import Head from "next/head"; + +/** Exclude page from search results */ +export function NoSEO() { + return ( + + + + ) +} \ No newline at end of file diff --git a/web/pages/date-docs/[username].tsx b/web/pages/date-docs/[username].tsx index 350e79b7..dd7d5d73 100644 --- a/web/pages/date-docs/[username].tsx +++ b/web/pages/date-docs/[username].tsx @@ -22,6 +22,7 @@ import { PostCommentsActivity, RichEditPost } from '../post/[...slugs]' import { usePost } from 'web/hooks/use-post' import { useTipTxns } from 'web/hooks/use-tip-txns' import { useCommentsOnPost } from 'web/hooks/use-comments' +import { NoSEO } from 'web/components/NoSEO' export async function getStaticProps(props: { params: { username: string } }) { const { username } = props.params @@ -62,6 +63,7 @@ function DateDocPage(props: { creator: User; post: DateDoc }) { return ( + diff --git a/web/pages/date-docs/create.tsx b/web/pages/date-docs/create.tsx index 08442cc1..ed1df677 100644 --- a/web/pages/date-docs/create.tsx +++ b/web/pages/date-docs/create.tsx @@ -14,6 +14,7 @@ import dayjs from 'dayjs' import { MINUTE_MS } from 'common/util/time' import { Col } from 'web/components/layout/col' import { MAX_QUESTION_LENGTH } from 'common/contract' +import { NoSEO } from 'web/components/NoSEO' export default function CreateDateDocPage() { const user = useUser() @@ -64,6 +65,7 @@ export default function CreateDateDocPage() { return ( +
diff --git a/web/pages/date-docs/index.tsx b/web/pages/date-docs/index.tsx index 9ddeb57f..48e0bb13 100644 --- a/web/pages/date-docs/index.tsx +++ b/web/pages/date-docs/index.tsx @@ -12,6 +12,7 @@ import { Button } from 'web/components/button' import { SiteLink } from 'web/components/site-link' import { getUser, User } from 'web/lib/firebase/users' import { DateDocPost } from './[username]' +import { NoSEO } from 'web/components/NoSEO' export async function getStaticProps() { const dateDocs = await getDateDocs() @@ -40,6 +41,7 @@ export default function DatePage(props: { return ( +