unindex date-docs from search engines
This commit is contained in:
parent
4162cca3ff
commit
bc5af50b0c
10
web/components/NoSEO.tsx
Normal file
10
web/components/NoSEO.tsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import Head from "next/head";
|
||||
|
||||
/** Exclude page from search results */
|
||||
export function NoSEO() {
|
||||
return (
|
||||
<Head>
|
||||
<meta name="robots" content="noindex,follow"/>
|
||||
</Head>
|
||||
)
|
||||
}
|
|
@ -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 (
|
||||
<Page>
|
||||
<NoSEO />
|
||||
<Col className="mx-auto w-full max-w-xl gap-6 sm:mb-6">
|
||||
<SiteLink href="/date-docs">
|
||||
<Row className="items-center gap-2">
|
||||
|
|
|
@ -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 (
|
||||
<Page>
|
||||
<NoSEO />
|
||||
<div className="mx-auto w-full max-w-3xl">
|
||||
<div className="rounded-lg px-6 py-4 pb-4 sm:py-0">
|
||||
<Row className="mb-8 items-center justify-between">
|
||||
|
|
|
@ -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 (
|
||||
<Page>
|
||||
<NoSEO />
|
||||
<div className="mx-auto w-full max-w-xl">
|
||||
<Row className="items-center justify-between p-4 sm:p-0">
|
||||
<Title className="!my-0 px-2 text-blue-500" text="Date docs" />
|
||||
|
|
Loading…
Reference in New Issue
Block a user