update darkmode config
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* 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 { getPageMap } from 'nextra/page-map'
|
||||
import 'nextra-theme-docs/style.css'
|
||||
@@ -31,6 +31,7 @@ export const metadata = {
|
||||
}
|
||||
|
||||
export default async function RootLayout({ children }) {
|
||||
const { darkMode } = useThemeConfig()
|
||||
const navbar = (
|
||||
<Navbar
|
||||
logo={
|
||||
@@ -82,7 +83,7 @@ export default async function RootLayout({ children }) {
|
||||
sidebar={{ defaultMenuCollapseLevel: 1 }}
|
||||
pageMap={pageMap}
|
||||
// TODO: fix algolia search
|
||||
search={<AlgoliaSearch />}
|
||||
search={<AlgoliaSearch darkMode={darkMode} />}
|
||||
>
|
||||
{children}
|
||||
{/* SpeedInsights in vercel */}
|
||||
|
||||
@@ -2,17 +2,16 @@
|
||||
// sample code from https://docsearch.algolia.com/docs/docsearch
|
||||
|
||||
import { DocSearch } from '@docsearch/react';
|
||||
import { useThemeConfig } from 'nextra-theme-docs'
|
||||
|
||||
import '@docsearch/css';
|
||||
|
||||
function AlgoliaSearch() {
|
||||
function AlgoliaSearch({ darkMode }: { darkMode: boolean }) {
|
||||
return (
|
||||
<DocSearch
|
||||
appId={process.env.NEXT_SEARCH_ALGOLIA_APP_ID || 'NKGLZZZUBC'}
|
||||
indexName={process.env.NEXT_SEARCH_ALGOLIA_INDEX_NAME || 'notenextra_trance_0'}
|
||||
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.
|
||||
|
||||
QED
|
||||
</details>
|
||||
|
||||
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: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
compiler: {
|
||||
// enable console log in production
|
||||
removeConsole: false,
|
||||
},
|
||||
// experimental: {
|
||||
// webpackMemoryOptimizations: true,
|
||||
// staticGenerationMaxConcurrency: 2, // try 1–3, default is 8
|
||||
|
||||
Reference in New Issue
Block a user