pl-fe: noindex for remote content, no idea if this works for client-side rendering

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-09-09 23:40:54 +02:00
parent 13cf4c0a45
commit 06ee19d168
4 changed files with 20 additions and 5 deletions

View File

@ -2,6 +2,7 @@ import { createSelector } from '@reduxjs/toolkit';
import clsx from 'clsx';
import { List as ImmutableList, OrderedSet as ImmutableOrderedSet } from 'immutable';
import React, { useEffect, useRef } from 'react';
import { Helmet } from 'react-helmet';
import { useIntl } from 'react-intl';
import { useHistory } from 'react-router-dom';
@ -381,6 +382,12 @@ const Thread: React.FC<IThread> = ({
})
}
>
{status.account.local === false && (
<Helmet>
<meta content='noindex, noarchive' name='robots' />
</Helmet>
)}
<div
ref={node}
className={

View File

@ -1,4 +1,5 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { useHistory } from 'react-router-dom';
@ -61,6 +62,11 @@ const EventLayout: React.FC<IEventLayout> = ({ params, children }) => {
return (
<>
{status?.account.local === false && (
<Helmet>
<meta content='noindex, noarchive' name='robots' />
</Helmet>
)}
<Layout.Main>
<Column label={event?.name} withHeader={false}>
<div className='space-y-4'>

View File

@ -1,4 +1,5 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { Redirect, useHistory } from 'react-router-dom';
@ -86,6 +87,11 @@ const ProfileLayout: React.FC<IProfileLayout> = ({ params, children }) => {
return (
<>
{account?.local === false && (
<Helmet>
<meta content='noindex, noarchive' name='robots' />
</Helmet>
)}
<Layout.Main>
<Column size='lg' label={account ? `@${getAcct(account, displayFqn)}` : ''} withHeader={false}>
<div className='space-y-4'>

View File

@ -1,11 +1,7 @@
import React from 'react';
import LinkFooter from 'pl-fe/features/ui/components/link-footer';
import {
WhoToFollowPanel,
TrendsPanel,
SignUpPanel,
} from 'pl-fe/features/ui/util/async-components';
import { WhoToFollowPanel, TrendsPanel, SignUpPanel } from 'pl-fe/features/ui/util/async-components';
import { useAppSelector, useFeatures } from 'pl-fe/hooks';
import { Layout } from '../components/ui';