update darkmode config
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-env node */
|
/* eslint-env node */
|
||||||
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
|
import { Footer, Layout, Navbar, useThemeConfig } from 'nextra-theme-docs'
|
||||||
import { Banner, Head } from 'nextra/components'
|
import { Banner, Head } from 'nextra/components'
|
||||||
import { getPageMap } from 'nextra/page-map'
|
import { getPageMap } from 'nextra/page-map'
|
||||||
import 'nextra-theme-docs/style.css'
|
import 'nextra-theme-docs/style.css'
|
||||||
@@ -31,6 +31,7 @@ export const metadata = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function RootLayout({ children }) {
|
export default async function RootLayout({ children }) {
|
||||||
|
const { darkMode } = useThemeConfig()
|
||||||
const navbar = (
|
const navbar = (
|
||||||
<Navbar
|
<Navbar
|
||||||
logo={
|
logo={
|
||||||
@@ -82,7 +83,7 @@ export default async function RootLayout({ children }) {
|
|||||||
sidebar={{ defaultMenuCollapseLevel: 1 }}
|
sidebar={{ defaultMenuCollapseLevel: 1 }}
|
||||||
pageMap={pageMap}
|
pageMap={pageMap}
|
||||||
// TODO: fix algolia search
|
// TODO: fix algolia search
|
||||||
search={<AlgoliaSearch />}
|
search={<AlgoliaSearch darkMode={darkMode} />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
{/* SpeedInsights in vercel */}
|
{/* SpeedInsights in vercel */}
|
||||||
|
|||||||
@@ -2,17 +2,16 @@
|
|||||||
// sample code from https://docsearch.algolia.com/docs/docsearch
|
// sample code from https://docsearch.algolia.com/docs/docsearch
|
||||||
|
|
||||||
import { DocSearch } from '@docsearch/react';
|
import { DocSearch } from '@docsearch/react';
|
||||||
import { useThemeConfig } from 'nextra-theme-docs'
|
|
||||||
|
|
||||||
import '@docsearch/css';
|
import '@docsearch/css';
|
||||||
|
|
||||||
function AlgoliaSearch() {
|
function AlgoliaSearch({ darkMode }: { darkMode: boolean }) {
|
||||||
return (
|
return (
|
||||||
<DocSearch
|
<DocSearch
|
||||||
appId={process.env.NEXT_SEARCH_ALGOLIA_APP_ID || 'NKGLZZZUBC'}
|
appId={process.env.NEXT_SEARCH_ALGOLIA_APP_ID || 'NKGLZZZUBC'}
|
||||||
indexName={process.env.NEXT_SEARCH_ALGOLIA_INDEX_NAME || 'notenextra_trance_0'}
|
indexName={process.env.NEXT_SEARCH_ALGOLIA_INDEX_NAME || 'notenextra_trance_0'}
|
||||||
apiKey={process.env.NEXT_SEARCH_ALGOLIA_API_KEY || '727b389a61e862e590dfab9ce9df31a2'}
|
apiKey={process.env.NEXT_SEARCH_ALGOLIA_API_KEY || '727b389a61e862e590dfab9ce9df31a2'}
|
||||||
theme={useThemeConfig().darkMode ? 'dark' : 'light'}
|
theme={darkMode ? 'dark' : 'light'}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,7 +171,6 @@ $$
|
|||||||
|
|
||||||
This is a contradiction, so Bell's inequality is violated.
|
This is a contradiction, so Bell's inequality is violated.
|
||||||
|
|
||||||
QED
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Other revised experiments (eg. Aspect's experiment, Calcium entangled photon experiment) are also conducted and the inequality is still violated.
|
Other revised experiments (eg. Aspect's experiment, Calcium entangled photon experiment) are also conducted and the inequality is still violated.
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ export default bundleAnalyzer(withNextra({
|
|||||||
eslint: {
|
eslint: {
|
||||||
ignoreDuringBuilds: true,
|
ignoreDuringBuilds: true,
|
||||||
},
|
},
|
||||||
|
compiler: {
|
||||||
|
// enable console log in production
|
||||||
|
removeConsole: false,
|
||||||
|
},
|
||||||
// experimental: {
|
// experimental: {
|
||||||
// webpackMemoryOptimizations: true,
|
// webpackMemoryOptimizations: true,
|
||||||
// staticGenerationMaxConcurrency: 2, // try 1–3, default is 8
|
// staticGenerationMaxConcurrency: 2, // try 1–3, default is 8
|
||||||
|
|||||||
Reference in New Issue
Block a user