kopia lustrzana https://github.com/Stopka/fedisearch
Added optout page
rodzic
2dda770993
commit
48620b6961
|
@ -3,7 +3,8 @@ import React from 'react'
|
||||||
const Footer: React.FC = () => {
|
const Footer: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<footer className={'text-center mt-5'}>
|
<footer className={'text-center mt-5'}>
|
||||||
©{(new Date()).getFullYear()} <a href={'https://skorpil.cz'}>Štěpán Škorpil</a>
|
<p><a href={'/optout'}>How to opt-out</a></p>
|
||||||
|
<p>©{(new Date()).getFullYear()} <a href={'https://skorpil.cz'}>Štěpán Škorpil</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
import Head from 'next/head'
|
||||||
|
import Layout, { siteTitle } from '../components/Layout'
|
||||||
|
import { matomoConfig } from '../lib/matomoConfig'
|
||||||
|
import { GetServerSideProps, InferGetServerSidePropsType } from 'next'
|
||||||
|
import React, { useEffect } from 'react'
|
||||||
|
import getMatomo from '../lib/getMatomo'
|
||||||
|
|
||||||
|
const OptOut: React.FC<InferGetServerSidePropsType<typeof getServerSideProps>> = ({ matomoConfig }) => {
|
||||||
|
useEffect(() => {
|
||||||
|
getMatomo(matomoConfig).trackEvent({
|
||||||
|
category: 'optout',
|
||||||
|
action: 'view'
|
||||||
|
})
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Layout matomoConfig={matomoConfig}>
|
||||||
|
<Head>
|
||||||
|
<title>{'Opt out | ' + siteTitle}</title>
|
||||||
|
</Head>
|
||||||
|
<h1>Opt out</h1>
|
||||||
|
<p>You don't want to be listed here? There are several ways to opt-out from our index:</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
On Mastodon you can set noindex option in your profile.
|
||||||
|
Head to <em>Preferences</em>➡<em>Other</em> and check the option labeled as <em>Opt-out of search engine indexing</em>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
On Mastodon you can remove yourself from data offered by your instance's API.
|
||||||
|
Head to <em>Preferences</em>➡<em>Preferences</em> and uncheck the option labeled as <em>Suggest account to others</em>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
You can add <strong>#noindex</strong> tag to your profile description
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
If you are a server maintainer, you can disable crawling of your instance using <em>robots.txt</em>.
|
||||||
|
Just expose a textfile on your instance's domain, on path <em>https://<your instace's domain>/robots.txt</em><br/><br/>
|
||||||
|
<pre><code>
|
||||||
|
User-agent: FediCrawl/1.0<br/>
|
||||||
|
Disallow: /
|
||||||
|
</code></pre>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</Layout>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getServerSideProps: GetServerSideProps = async () => {
|
||||||
|
console.info('Loading matomo config', matomoConfig)
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
matomoConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default OptOut
|
Ładowanie…
Reference in New Issue