feat(nx-dev): Add No_NEXT_PUBLIC_NO_INDEX environment variable (#26330)
Add no index env var Preview / Dev now will have the `noindex` while the main / production will be indexed 
This commit is contained in:
parent
fbc88f2e6d
commit
8525bba7c6
@ -1,3 +1,4 @@
|
|||||||
NEXT_PUBLIC_SEARCH_INDEX=nx-canary-production
|
NEXT_PUBLIC_SEARCH_INDEX=nx-canary-production
|
||||||
NEXT_PUBLIC_SEARCH_API_KEY=07340b85db83fd49c1f904f883cc3ef8
|
NEXT_PUBLIC_SEARCH_API_KEY=07340b85db83fd49c1f904f883cc3ef8
|
||||||
NEXT_PUBLIC_SEARCH_APP_ID=PCTGM1JTQL
|
NEXT_PUBLIC_SEARCH_APP_ID=PCTGM1JTQL
|
||||||
|
NEXT_PUBLIC_NO_INDEX=false
|
||||||
@ -46,6 +46,9 @@ export default function CustomApp({
|
|||||||
site: '@nxdevtools',
|
site: '@nxdevtools',
|
||||||
cardType: 'summary_large_image',
|
cardType: 'summary_large_image',
|
||||||
}}
|
}}
|
||||||
|
dangerouslySetAllPagesToNoIndex={
|
||||||
|
process.env.NEXT_PUBLIC_NO_INDEX === 'true'
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<Head>
|
<Head>
|
||||||
<meta name="apple-mobile-web-app-title" content="Nx" />
|
<meta name="apple-mobile-web-app-title" content="Nx" />
|
||||||
@ -71,7 +74,7 @@ export default function CustomApp({
|
|||||||
id="skip-to-content-link"
|
id="skip-to-content-link"
|
||||||
href="#main"
|
href="#main"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="absolute top-3 left-8 -translate-y-24 rounded-md bg-green-400 px-4 py-2 text-white transition focus:translate-y-0"
|
className="absolute left-8 top-3 -translate-y-24 rounded-md bg-green-400 px-4 py-2 text-white transition focus:translate-y-0"
|
||||||
>
|
>
|
||||||
Skip to content
|
Skip to content
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user