diff --git a/docs/faq.md b/docs/faq.md index d8c2d7a1d0..af2a98e339 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -5,7 +5,7 @@ description: Frequently asked questions related to Geth ## Where can I get more information? {#where-can-i-get-more-information} -This page contains answers to common questions about Geth. Source code and README documentation can be found on the Geth [GitHub](https://github.com/ethereum/go-ethereum). You can also ask questions on Geth's [Discord channel](https://discord.gg/WHNkYDsAKU) or keep up to date with Geth on [Twitter](https://twitter.com/go_ethereum). Information about Ethereum in general can be found at [ethereum.org](https://ethereum.org). +This page contains answers to common questions about Geth. Source code and README documentation can be found on the Geth [GitHub](https://github.com/ethereum/go-ethereum). You can also ask questions on Geth's [Discord server](https://discord.gg/WHNkYDsAKU) or keep up to date with Geth on [Twitter](https://twitter.com/go_ethereum). Information about Ethereum in general can be found at [ethereum.org](https://ethereum.org). The Geth team have also recently started to run AMA's on Reddit: diff --git a/docs/fundamentals/peer-to-peer.md b/docs/fundamentals/peer-to-peer.md index 7784007454..28c71225eb 100644 --- a/docs/fundamentals/peer-to-peer.md +++ b/docs/fundamentals/peer-to-peer.md @@ -3,7 +3,7 @@ title: Connecting To The Network description: Guide to connecting Geth to a peer-to-peer network --- -The default behaviour for Geth is to connect to Ethereum Mainnet. However, Geth can also connect to public testnets, [private networks](/docs/developers/geth-developer/private-network.md) and [local testnets](/docs/developers/geth-developer/dev-mode). For convenience, the two public testnets with long term support, Goerli and Sepolia, have their own command line flag. Geth can connect to these testnets simpyl by passing: +The default behaviour for Geth is to connect to Ethereum Mainnet. However, Geth can also connect to public testnets, [private networks](/docs/developers/geth-developer/private-network) and [local testnets](/docs/developers/geth-developer/dev-mode). For convenience, the two public testnets with long term support, Goerli and Sepolia, have their own command line flag. Geth can connect to these testnets simpyl by passing: - `--goerli`, Goerli proof-of-authority test network - `--sepolia` Sepolia proof-of-work test network diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 74a0d1c04b..a046f5f16b 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -5,7 +5,7 @@ description: Guide to getting up and running with Geth using Clef. This page explains how to set up Geth and execute some basic tasks using the command line tools. In order to use Geth, the software must first be installed. There are several ways Geth can be installed depending on the operating system and the user's choice of installation method, for example using a package manager, container or building from source. Instructions for installing Geth can be found on the ["Install and Build"](/docs/getting_started/Installing-Geth) pages. -Geth also needs to be connected to a [consensus client](docs/getting-started/consensus-clients.md) in order to function as an Ethereum node. The tutorial on this page assumes Geth and a consensus client have been installed successfully and that a firewall has been configured to block external traffic to the JSON-RPC port `8545` see [Security](/docs/fundamentals/security). +Geth also needs to be connected to a [consensus client](docs/getting-started/consensus-clients) in order to function as an Ethereum node. The tutorial on this page assumes Geth and a consensus client have been installed successfully and that a firewall has been configured to block external traffic to the JSON-RPC port `8545` see [Security](/docs/fundamentals/security). This page provides step-by-step instructions covering the fundamentals of using Geth. This includes generating accounts, joining an Ethereum network, syncing the blockchain and sending ether between accounts. This tutorial uses [Clef](/docs/tools/Clef/Tutorial). Clef is an account management tool external to Geth itself that allows users to sign transactions. It is developed and maintained by the Geth team. @@ -33,7 +33,7 @@ Read more about Ethereum accounts [here](https://ethereum.org/en/developers/docs ## Step 1: Generating accounts {#generating-accounts} -There are several methods for generating accounts in Geth. This tutorial demonstrates how to generate accounts using Clef, as this is considered best practice, largely because it decouples the users' key management from Geth, making it more modular and flexible. It can also be run from secure USB sticks or virtual machines, offering security benefits. For convenience, this tutorial will execute Clef on the same computer that will also run Geth, although more secure options are available (see [here](https://github.com/ethereum/go-ethereum/blob/master/cmd/clef/docs/setup.md)). +There are several methods for generating accounts in Geth. This tutorial demonstrates how to generate accounts using Clef, as this is considered best practice, largely because it decouples the users' key management from Geth, making it more modular and flexible. It can also be run from secure USB sticks or virtual machines, offering security benefits. For convenience, this tutorial will execute Clef on the same computer that will also run Geth, although more secure options are available (see [here](/docs/tools/clef/setup)). An account is a pair of keys (public and private). Clef needs to know where to save these keys to so that they can be retrieved later. This information is passed to Clef as an argument. This is achieved using the following command: @@ -121,7 +121,7 @@ geth --sepolia --datadir geth-tutorial --authrpc.addr localhost --authrpc.port 8 Running the above command starts Geth. Geth will not sync the blockchain correctly unless there is also a consensus client that can pass Geth a valid head to sync up to. In a separate terminal, start a consensus client. Once the consensus client gets in sync, Geth will start to sync too. -The terminal should rapidly fill with status updates that look similar to those below. To check the meaning of the logs, refer to the [logs page](docs/fundamentals/logs.md). +The terminal should rapidly fill with status updates that look similar to those below. To check the meaning of the logs, refer to the [logs page](/docs/fundamentals/logs). ```terminal INFO [02-10|13:59:06.649] Starting Geth on sepolia testnet... diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 7ad993fd0e..18cac9ca19 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -29,7 +29,7 @@ export const Header: FC = () => { > - go-ethereum + go-ethereum diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index 14beb534ed..ab77e803ae 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -9,8 +9,9 @@ import { Stack, Text } from '@chakra-ui/react'; -import { AddIcon, MinusIcon } from '@chakra-ui/icons'; +import { AddIcon, MinusIcon } from '../svgs/' import NextLink from 'next/link'; +import { useRouter } from 'next/router'; import { LinksList } from './'; @@ -20,62 +21,83 @@ interface Props { navLinks: NavLink[]; } -export const DocsLinks: FC = ({ navLinks }) => ( - - {navLinks.map(({ id, to, items }, idx) => { - return ( - - - {({ isExpanded }) => ( - <> - - = ({ navLinks }) => { + const router = useRouter(); + const { slug } = router.query; + return ( + + {navLinks.map(({ id, to, items }, idx) => { + const split = to?.split('/') + const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; + return ( + + + {({ isExpanded }) => ( + <> + - {to ? ( - - - {id} - - - ) : ( - {id} - )} - - - {items && ( - -
- {isExpanded ? ( - - ) : ( - - )} -
+ + {to ? ( + + + + {id} + + + + ) : ( + {id} + )} + + {items && ( + +
+ {isExpanded ? ( + + ) : ( + + )} +
+
+ )} +
+ {items && ( + + + )} - - {items && ( - - - - )} - - )} -
-
- ); - })} -
-); + + )} + + + ); + })} + + ); +} diff --git a/src/components/UI/docs/LinkList.tsx b/src/components/UI/docs/LinkList.tsx deleted file mode 100644 index d8c84c72d5..0000000000 --- a/src/components/UI/docs/LinkList.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { FC } from 'react'; -import { Link, Stack, Text } from '@chakra-ui/react'; -import NextLink from 'next/link'; - -import { NavLink } from '../../../types'; - -interface LinksListProps { - links: NavLink[]; -} - -export const LinksList: FC = ({ links }) => ( - - {links.map(({ id, to, items }) => { - return to ? ( - - - - - {id} - - - - {items && } - - ) : ( - - - {id} - - {items && } - - ); - })} - -); diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx new file mode 100644 index 0000000000..6c9d838e1d --- /dev/null +++ b/src/components/UI/docs/LinksList.tsx @@ -0,0 +1,57 @@ +import { FC } from 'react'; +import { Link, Stack, Text } from '@chakra-ui/react'; +import NextLink from 'next/link'; +import { useRouter } from 'next/router'; + +import { NavLink } from '../../../types'; + +interface LinksListProps { + links: NavLink[]; +} + +export const LinksList: FC = ({ links }) => { + const router = useRouter(); + const { slug } = router.query; + return ( + + {links.map(({ id, to, items }) => { + const split = to?.split('/') + const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; + return to ? ( + + + + + {id} + + + + {items && } + + ) : ( + + + {id} + + {items && } + + ); + })} + + ); +}; diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 09f8b2b71f..ff1217b126 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -143,7 +143,7 @@ const MDComponents = { ); }, li: ({ children }: any) => { - return {children}; + return {children}; }, note: ({ children }: any) => { return {children}; diff --git a/src/components/UI/docs/index.ts b/src/components/UI/docs/index.ts index 9214774f4c..56eadcff2b 100644 --- a/src/components/UI/docs/index.ts +++ b/src/components/UI/docs/index.ts @@ -3,6 +3,6 @@ export * from './Code'; export * from './DocsLinks'; export * from './DocsNav'; export * from './DocumentNav'; -export * from './LinkList'; +export * from './LinksList'; export * from './Note'; export { default } from './MDComponents'; diff --git a/src/components/UI/downloads/DownloadsHero.tsx b/src/components/UI/downloads/DownloadsHero.tsx index 8a00452cc2..3792864f71 100644 --- a/src/components/UI/downloads/DownloadsHero.tsx +++ b/src/components/UI/downloads/DownloadsHero.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Center, Grid, HStack, Image, Link, Stack, Text } from '@chakra-ui/react'; +import { Box, Button, Center, Grid, HStack, Link, Stack, Text } from '@chakra-ui/react'; import { FC } from 'react'; import NextLink from 'next/link'; @@ -32,7 +32,7 @@ export const DownloadsHero: FC = ({ return ( = ({ androidData.length ]; + const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12; + return ( setTotalReleases(totalReleases[idx])}> @@ -61,7 +63,7 @@ export const DownloadsTable: FC = ({ diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx new file mode 100644 index 0000000000..fe8f3016c9 --- /dev/null +++ b/src/components/UI/svgs/AddIcon.tsx @@ -0,0 +1,21 @@ +import { IconProps } from '@chakra-ui/react'; +import { createIcon } from '@chakra-ui/icons'; + +const [w, h] = [24, 24]; + +const Icon = createIcon({ + displayName: 'AddIcon', + viewBox: `0 0 ${w} ${h}`, + path: ( + + + + + + + ) +}); + +export const AddIcon: React.FC = props => ( + +); diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx new file mode 100644 index 0000000000..689f611370 --- /dev/null +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -0,0 +1,20 @@ +import { IconProps } from '@chakra-ui/react'; +import { createIcon } from '@chakra-ui/icons'; + +const [w, h] = [24, 24]; + +const Icon = createIcon({ + displayName: 'MinusIcon', + viewBox: `0 0 ${w} ${h}`, + path: ( + + + + + + ) +}); + +export const MinusIcon: React.FC = props => ( + +); diff --git a/src/components/UI/svgs/index.ts b/src/components/UI/svgs/index.ts index c1a85f7e2c..91312334c8 100644 --- a/src/components/UI/svgs/index.ts +++ b/src/components/UI/svgs/index.ts @@ -1,5 +1,7 @@ +export * from './AddIcon'; export * from './GlyphHome'; export * from './GopherDownloads'; export * from './GopherHomeFront'; export * from './GopherHomeLinks'; export * from './GopherHomeNodes'; +export * from './MinusIcon'; diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index 14db5fddfe..cd9802ca11 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -12,6 +12,12 @@ import { import { DiscordIcon, GitHubIcon, TwitterIcon } from '../UI/icons'; +const hoverStyles = { + textDecoration: 'none', + bg: 'primary', + color: 'bg !important' +}; + export const Footer: FC = () => { return ( @@ -32,11 +38,7 @@ export const Footer: FC = () => {
{
{ lg: 'none' }} borderColor='primary !important' - _hover={{ - bg: 'primary' - }} + _hover={hoverStyles} p={4} > @@ -96,9 +92,7 @@ export const Footer: FC = () => {
{
diff --git a/src/components/layouts/Layout.tsx b/src/components/layouts/Layout.tsx index 46e8bed8ab..16a3534084 100644 --- a/src/components/layouts/Layout.tsx +++ b/src/components/layouts/Layout.tsx @@ -12,7 +12,7 @@ interface Props { export const Layout: FC = ({ children }) => { return ( - +
{children} diff --git a/src/constants.ts b/src/constants.ts index 3e282e0b85..58c0354042 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -20,7 +20,7 @@ export const GETH_DISCORD_URL = 'https://discord.com/invite/nthXNEv'; export const GO_URL = 'https://go.dev/'; // Downloads -export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 10; +export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 12; export const DOWNLOAD_HEADER_BUTTONS: { [index: string]: { name: string; diff --git a/src/data/documentation-links.yaml b/src/data/documentation-links.yaml index 137b4574d2..f889d4cc6f 100644 --- a/src/data/documentation-links.yaml +++ b/src/data/documentation-links.yaml @@ -1,6 +1,7 @@ - id: Getting started - to: /docs/getting-started items: + - id: Introduction + to: /docs/getting-started - id: Hardware requirements to: /docs/getting-started/hardware-requirements - id: Installing Geth @@ -8,8 +9,9 @@ - id: Consensus clients to: /docs/getting-started/consensus-clients - id: Fundamentals - to: /docs/fundamentals items: + - id: Introduction + to: /docs/fundamentals - id: Node architecture to: /docs/fundamentals/node-architecture - id: Command-line options @@ -35,8 +37,9 @@ - id: Interacting with Geth items: - id: JSON-RPC Server - to: /docs/interacting-with-geth/rpc items: + - id: Introduction + to: /docs/interacting-with-geth/rpc - id: Batch requests to: /docs/interacting-with-geth/rpc/batch - id: GraphQL server @@ -70,8 +73,9 @@ - id: 'JavaScript Console 2: Contracts' to: /docs/interacting-with-geth/javascript-console-contracts - id: Developers - to: /docs/developers items: + - id: Introduction + to: /docs/developers - id: Dapp developers items: - id: Go API @@ -83,8 +87,9 @@ - id: Geth for Mobile to: /docs/developers/dapp-developer/mobile - id: EVM tracing - to: /docs/developers/evm-tracing items: + - id: Introduction + to: /docs/developers/evm-tracing - id: Basic traces to: /docs/developers/evm-tracing/basic-traces - id: Built-in tracers diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index f16e3fa1dc..3c5166e91b 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -115,8 +115,8 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - - + + = ({ frontmatter, content, navLinks, lastModified - + diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 3afa2c6005..06f546df22 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -287,11 +287,11 @@ const DownloadsPage: NextPage = ({ data }) => { const [totalDevBuilds, setTotalDevBuilds] = useState(ALL_LINUX_DEV_BUILDS.length); const showMoreStableReleases = () => { - setAmountStableReleases(amountStableReleases + 10); + setAmountStableReleases(amountStableReleases + 12); }; const showMoreDevBuilds = () => { - setAmountDevBuilds(amountDevBuilds + 10); + setAmountDevBuilds(amountDevBuilds + 12); }; return ( @@ -374,25 +374,14 @@ const DownloadsPage: NextPage = ({ data }) => { - - - {totalStableReleases > 0 - ? `Showing ${Math.min( - amountStableReleases, - totalStableReleases - )} latest releases of - a total ${totalStableReleases} releases` - : `No releases`} - - - {totalStableReleases > amountStableReleases && ( = ({ data }) => { - - - {totalDevBuilds > 0 - ? `Showing ${Math.min(amountDevBuilds, totalDevBuilds)} latest releases of - a total ${totalDevBuilds} releases` - : `No releases`} - - - {totalDevBuilds > amountDevBuilds && ( = ({ data }) => { borderColor='primary' gap={4} flexDirection={{ base: 'column', md: 'row' }} + alignItems='center' > @@ -512,7 +494,7 @@ const DownloadsPage: NextPage = ({ data }) => { - + gpg --recv-keys F9585DE6 C2FF8BBF 9BA28146 7B9E2481 D2A67EAC @@ -525,6 +507,8 @@ const DownloadsPage: NextPage = ({ data }) => { borderColor='primary' gap={4} flexDirection={{ base: 'column', md: 'row' }} + alignItems='center' + sx={{ mt: '0 !important' }} > @@ -533,7 +517,7 @@ const DownloadsPage: NextPage = ({ data }) => { - + gpg --recv-keys E058A81C 05A5DDF0 1CCB7DD2 @@ -542,10 +526,11 @@ const DownloadsPage: NextPage = ({ data }) => { diff --git a/src/theme/components/Link.ts b/src/theme/components/Link.ts index ca8aaf93c1..0c09c4ecc7 100644 --- a/src/theme/components/Link.ts +++ b/src/theme/components/Link.ts @@ -15,13 +15,13 @@ export const Link = { light: { textDecoration: 'underline', color: 'primary', - _hover: { color: 'body', textDecorationColor: 'body' }, + _hover: { color: 'body', textDecorationColor: 'secondary' }, _focus: { color: 'primary', - boxShadow: '0 0 0 1px var(--chakra-colors-primary)', + boxShadow: '0 0 0 1px var(--chakra-colors-primary) !important', textDecoration: 'none' }, - _pressed: { + _active: { color: 'secondary', textDecorationColor: 'secondary' } diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index df2c9e9d70..4ce02a0caa 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -137,7 +137,7 @@ export const textStyles = { fontWeight: 700, textTransform: 'uppercase', textAlign: 'center', - fontSize: 'sm' + fontSize: { base: 'xs', sm: 'sm' } }, 'docs-nav-dropdown': { fontFamily: 'heading',