Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/OpenZeppelin/solidity-docgen
Documentation generator for Solidity projects
https://github.com/OpenZeppelin/solidity-docgen
Last synced: about 6 hours ago
JSON representation
Documentation generator for Solidity projects
- Host: GitHub
- URL: https://github.com/OpenZeppelin/solidity-docgen
- Owner: OpenZeppelin
- License: mit
- Created: 2018-01-08T01:13:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T06:44:49.000Z (5 months ago)
- Last Synced: 2024-10-30T09:37:11.528Z (9 days ago)
- Language: TypeScript
- Homepage:
- Size: 3.65 MB
- Stars: 452
- Watchers: 10
- Forks: 118
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solidity - solidity-docgen - Documentation generator for Solidity projects. (Tools)
- awesome-solidity - solidity-docgen - Documentation generator for Solidity projects. (Tools)
- awesome-web3-tools-and-dapps - Solidity Documentation Generator - This tool can automatically create markdown documentation for Solidity projects. (dApps directory / Solidity Developer Tools)
- awesome-solidity - solidity-docgen - Documentation generator for Solidity projects. (Tools)
- best-of-crypto - GitHub - 22% open · ⏱️ 14.09.2023): (Smart Contract Platforms)
README
# `solidity-docgen`
*solidity-docgen is a program that extracts documentation for a Solidity project.*
The output is fully configurable through Handlebars templates, but the default templates should do a good job of displaying all of the information in the source code in Markdown format. The generated Markdown files can be used with a static site generator such as Vuepress, MkDocs, Jekyll (GitHub Pages), etc., in order to publish a documentation website.
This is a newer version of the tool that has been rewritten and redesigned. Some more work is pending to ease the transition from the previous version and to help with usage and configuration.
## Usage
Install `solidity-docgen` from npm.
### Hardhat
Include the plugin in your Hardhat configuration.
```diff
// hardhat.config.ts
+import 'solidity-docgen';export default {
+ docgen: { ... }, // if necessary to customize config
};
```Then run with `hardhat docgen`.
### As a library
```typescript
import { docgen } from 'solidity-docgen';await docgen([{ output: solcOutput }], config);
````solcOutput` must be the standard JSON output of the compiler, with at least the `ast` output. There can be more than one.
`config` is an optional object with the values as specified below.
## Config
See [`config.ts`](./src/config.ts) for the list of options and their documentation.