Skip to content

Commit

Permalink
doc: new structure (still WIP) (#159)
Browse files Browse the repository at this point in the history
* updated page structure

* added DocLink

* fixed component import

* rpc-methods: fixed order

* cleanup

* deps upgrade

* fix

* added 404

* updated rpc-section

* disable underlined links

* updated rpc-section

* style tweaks

* updated link

* deps upgrade

* update

* updated package godoc

* updated nextra

* updated rpc methods

#178

* fixed example

* fixed example test

* rpc-extension: improved doc

* added two vm sections

* added lock file

* added sections that are coming soon

* updated index

* .

---------

Co-authored-by: lmittmann <[email protected]>
  • Loading branch information
lmittmann and lmittmann authored Aug 23, 2024
1 parent b758ea1 commit 0afaee3
Show file tree
Hide file tree
Showing 25 changed files with 7,758 additions and 284 deletions.
7 changes: 5 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/*
Package w3 implements a blazing fast and modular Ethereum JSON RPC client with
first-class ABI support.
Package w3 is your toolbelt for integrating with Ethereum in Go. Closely linked
to [go-ethereum], it provides an ergonomic wrapper for working with RPC, ABI's,
and the EVM.
[go-ethereum]: https://github.com/ethereum/go-ethereum
*/
package w3

Expand Down
23 changes: 23 additions & 0 deletions docs/components/DocLink.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Link } from 'nextra-theme-docs'
import { Code } from 'nextra/components'

const pkgNameToPath = {
'w3': 'github.com/lmittmann/w3',
'module': 'github.com/lmittmann/w3/module',
'debug': 'github.com/lmittmann/w3/module/debug',
'eth': 'github.com/lmittmann/w3/module/eth',
'txpool': 'github.com/lmittmann/w3/module/txpool',
'web3': 'github.com/lmittmann/w3/module/web3',
'w3types': 'github.com/lmittmann/w3/w3types',
'w3vm': 'github.com/lmittmann/w3/w3vm',
}

export const DocLink = ({ title }) => {
let [pkg, comp] = title.split('.', 2)
let url = `https://pkg.go.dev/${pkgNameToPath[pkg]}#${comp}`
return (
<Link href={url}>
<Code>{title}</Code>
</Link>
)
}
Loading

0 comments on commit 0afaee3

Please sign in to comment.