1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

add noindex nofollow tags to docs

This commit is contained in:
thatmattlove
2022-12-19 15:11:39 -05:00
parent f37eb9abf7
commit f4a7d128e2
4 changed files with 22 additions and 0 deletions

8
docs/global.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
declare global {
namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production';
CF_PAGES_BRANCH: string;
}
}
}

View File

@@ -16,5 +16,8 @@
"nextra-theme-docs": "^2.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^18.11.17"
}
}

8
docs/pnpm-lock.yaml generated
View File

@@ -1,6 +1,7 @@
lockfileVersion: 5.4
specifiers:
'@types/node': ^18.11.17
next: ^13.0.6
nextra: ^2.0.1
nextra-theme-docs: ^2.0.1
@@ -14,6 +15,9 @@ dependencies:
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
devDependencies:
'@types/node': 18.11.17
packages:
/@babel/runtime/7.20.6:
@@ -382,6 +386,10 @@ packages:
resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==}
dev: false
/@types/node/18.11.17:
resolution: {integrity: sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==}
dev: true
/@types/prop-types/15.7.5:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
dev: false

View File

@@ -1,6 +1,8 @@
import styles from './global.module.css';
import { DocsThemeConfig } from 'nextra-theme-docs';
const NO_INDEX_FOLLOW = process.env.CF_PAGES_BRANCH !== 'main';
const config: DocsThemeConfig = {
logo: (
<span className={styles.logo}>
@@ -69,6 +71,7 @@ const config: DocsThemeConfig = {
project: {
link: 'https://github.com/thatmattlove/hyperglass',
},
useNextSeoProps: () => ({ noindex: NO_INDEX_FOLLOW, nofollow: NO_INDEX_FOLLOW }),
};
export default config;