mirror of https://github.com/ethereum/go-ethereum
commit
95e3b7cf1d
@ -1,18 +1,12 @@ |
||||
/** @type {import('next').NextConfig} */ |
||||
const { redirects: redirectsList } = require('./redirects'); |
||||
|
||||
const withMDX = require('@next/mdx')({ |
||||
extension: /\.mdx?$/, |
||||
options: { |
||||
remarkPlugins: [], |
||||
rehypePlugins: [] |
||||
// If you use `MDXProvider`, uncomment the following line.
|
||||
// providerImportSource: "@mdx-js/react",
|
||||
} |
||||
}); |
||||
|
||||
module.exports = withMDX({ |
||||
module.exports = { |
||||
reactStrictMode: true, |
||||
swcMinify: true, |
||||
// Append the default value with md extensions
|
||||
pageExtensions: ['ts', 'tsx', 'md', 'mdx'] |
||||
}); |
||||
pageExtensions: ['ts', 'tsx', 'md'], |
||||
async redirects() { |
||||
return redirectsList; |
||||
} |
||||
}; |
||||
|
@ -0,0 +1,246 @@ |
||||
const redirects = [ |
||||
{ |
||||
source: '/docs/getting-started/dev-mode', |
||||
destination: '/docs/developers/geth-developer/dev-mode', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/install-and-build/installing-geth', |
||||
destination: '/docs/getting-started/installing-geth', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/install-and-build/backup-restore', |
||||
destination: '/docs/getting-started/backup-restore', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/command-line-options', |
||||
destination: '/docs/fundamentals/command-line-options', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/pruning', |
||||
destination: '/docs/fundamentals/pruning', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/consensus-clients', |
||||
destination: '/docs/getting-started/consensus-client', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/peer-to-peer', |
||||
destination: '/docs/fundamentals/peer-to-peer', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/les', |
||||
destination: '/docs/fundamentals/les', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/managing-your-accounts', |
||||
destination: '/docs/fundamentals/account-management', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/javascript-console', |
||||
destination: '/docs/interacting-with-geth/javascript-console', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/private-network', |
||||
destination: '/docs/developers/geth-developer/private-network', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/mining', |
||||
destination: '/docs/fundamentals/mining', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/metrics', |
||||
destination: '/docs/monitoring/metrics', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/native', |
||||
destination: '/docs/developers/dapp-developer/native', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/tracing', |
||||
destination: '/docs/developers/evm-tracing', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/custom-tracer', |
||||
destination: '/docs/developers/evm-tracing/custom-tracer', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/builtin-tracers', |
||||
destination: '/docs/developers/evm-tracing/built-in-tracers', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/native-accounts', |
||||
destination: '/docs/developers/dapp-developer/native-accounts', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/native-bindings', |
||||
destination: '/docs/developers/dapp-developer/native-bindings', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/mobile', |
||||
destination: '/docs/developers/dapp-developer/mobile', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/dapp/mobile-accounts', |
||||
destination: '/docs/developers/dapp-developer/mobile', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/server', |
||||
destination: '/docs/interacting-with-geth/rpc', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/pubsub', |
||||
destination: '/docs/interacting-with-geth/rpc/pubsub', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/batch', |
||||
destination: '/docs/interacting-with-geth/batch', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/graphql', |
||||
destination: '/docs/interacting-with-geth/rpc/graphql', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-admin', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-admin', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-clique', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-clique', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-debug', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-debug', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-eth', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-eth', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-les', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-les', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-miner', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-miner', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-net', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-net', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-personal', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-personal', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/ns-txpool', |
||||
destination: '/docs/interacting-with-geth/rpc/ns-txpool', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/rpc/objects', |
||||
destination: '/docs/interacting-with-geth/rpc/objects', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/developers/dev-guide', |
||||
destination: '/docs/developers/geth-developer/dev-guide', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/developers/code-review-guidelines', |
||||
destination: '/docs/developers/geth-developer/code-review-guidelines', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/developers/issue-handling-workflow', |
||||
destination: '/docs/developers/geth-developer/issue-handling-workflow', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/developers/dns-discovery-setup', |
||||
destination: '/docs/developers/geth-developer/dns-discovery-setup', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/introduction', |
||||
destination: '/docs/tools/clef/introduction', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/tutorial', |
||||
destination: '/docs/tools/clef/tutorial', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/cliquesigning', |
||||
destination: '/docs/tools/clef/clique-signing', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/rules', |
||||
destination: '/docs/tools/clef/rules', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/setup', |
||||
destination: '/docs/tools/clef/setup', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/apis', |
||||
destination: '/docs/tools/clef/apis', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/clef/datatypes', |
||||
destination: '/docs/tools/clef/datatypes', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/sync-mode', |
||||
destination: '/docs/fundamentals/sync-modes', |
||||
permanent: true |
||||
}, |
||||
{ |
||||
source: '/docs/interface/hardware', |
||||
destination: '/docs/getting-started/hardware-requirements', |
||||
permanent: true |
||||
} |
||||
]; |
||||
|
||||
module.exports = { |
||||
redirects |
||||
}; |
@ -1,30 +1,59 @@ |
||||
import { FC } from 'react'; |
||||
import { Input, InputGroup, Stack } from '@chakra-ui/react'; |
||||
import { FC, useState } from 'react'; |
||||
import { Button, Input, InputGroup, Stack } from '@chakra-ui/react'; |
||||
|
||||
import { BORDER_WIDTH } from '../../../constants'; |
||||
import { LensIcon } from '../icons'; |
||||
|
||||
export const Search: FC = () => { |
||||
const [query, setQuery] = useState<string>(''); |
||||
|
||||
// Handlers
|
||||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => { |
||||
setQuery(e.target.value); |
||||
}; |
||||
|
||||
return ( |
||||
<Stack |
||||
borderBottom={{ base: BORDER_WIDTH, md: 'none' }} |
||||
borderRight={{ base: 'none', md: BORDER_WIDTH }} |
||||
borderColor={{ base: 'bg', md: 'primary' }} |
||||
px={4} |
||||
py={{ base: 8, md: 4 }} |
||||
_hover={{ base: { bg: 'primary' }, md: { bg: 'none' } }} |
||||
> |
||||
<InputGroup> |
||||
<Input |
||||
variant='unstyled' |
||||
placeholder='search' |
||||
size='md' |
||||
_placeholder={{ color: { base: 'bg', md: 'primary' }, fontStyle: 'italic' }} |
||||
/> |
||||
<Stack pl={4} justifyContent='center' alignItems='center'> |
||||
<LensIcon color={{ base: 'bg', md: 'primary' }} fontSize={{ base: '3xl', md: 'md' }} /> |
||||
</Stack> |
||||
</InputGroup> |
||||
<form method='get' action='https://duckduckgo.com/' role='search' target='blank'> |
||||
<InputGroup alignItems='center'> |
||||
<Input type="hidden" name="sites" value="geth.ethereum.org" /> |
||||
<Input |
||||
type="text" |
||||
name="q" |
||||
py={{ base: 8, md: 4 }} |
||||
px={4} |
||||
variant='unstyled' |
||||
placeholder='search' |
||||
size='md' |
||||
_placeholder={{ color: { base: 'bg', md: 'primary' }, fontStyle: 'italic' }} |
||||
value={query} |
||||
onChange={handleChange} |
||||
outlineOffset={4} |
||||
/> |
||||
<Button |
||||
type="submit" |
||||
px={4} |
||||
me={2} |
||||
borderRadius='0' |
||||
bg='none' |
||||
_focusVisible={{ |
||||
outline: '2px solid var(--chakra-colors-primary)', |
||||
outlineOffset: -2 |
||||
}} |
||||
_hover={{ |
||||
bg: 'primary', |
||||
svg: { color: 'bg' } |
||||
}} |
||||
> |
||||
<LensIcon color={{ base: 'bg', md: 'primary' }} fontSize={{ base: '3xl', md: 'xl' }} /> |
||||
</Button> |
||||
</InputGroup> |
||||
</form> |
||||
</Stack> |
||||
); |
||||
}; |
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,22 +1,17 @@ |
||||
import { ChakraProvider } from '@chakra-ui/react'; |
||||
import { AppProps } from 'next/app'; |
||||
import { MDXProvider } from '@mdx-js/react'; |
||||
|
||||
import { Layout } from '../components/layouts'; |
||||
|
||||
import MDComponents from '../components/UI/docs'; |
||||
|
||||
import 'focus-visible/dist/focus-visible'; |
||||
import theme from '../theme'; |
||||
|
||||
export default function App({ Component, pageProps }: AppProps) { |
||||
return ( |
||||
<ChakraProvider theme={theme}> |
||||
<MDXProvider components={MDComponents}> |
||||
<Layout> |
||||
<Component {...pageProps} /> |
||||
</Layout> |
||||
</MDXProvider> |
||||
<Layout> |
||||
<Component {...pageProps} /> |
||||
</Layout> |
||||
</ChakraProvider> |
||||
); |
||||
} |
||||
|
|
Loading…
Reference in new issue