{"id":25420199,"url":"https://github.com/dl-solarity/hardhat-markup","last_synced_at":"2025-09-16T12:24:56.697Z","repository":{"id":65486273,"uuid":"585190438","full_name":"dl-solarity/hardhat-markup","owner":"dl-solarity","description":"Hardhat plugin to generate customizable smart contracts documentation","archived":false,"fork":false,"pushed_at":"2025-09-02T13:30:46.000Z","size":367,"stargazers_count":21,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-02T14:43:10.535Z","etag":null,"topics":["documentation","hardhat","hardhat-plugin","markdown","solarity"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@solarity/hardhat-markup","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dl-solarity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-04T14:47:48.000Z","updated_at":"2025-05-24T21:56:33.000Z","dependencies_parsed_at":"2023-12-18T17:44:29.868Z","dependency_job_id":"c5d78782-f830-4cf2-8940-94acc7efe153","html_url":"https://github.com/dl-solarity/hardhat-markup","commit_stats":null,"previous_names":["dl-solarity/hardhat-markup","dl-solidity-library/hardhat-markup"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dl-solarity/hardhat-markup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dl-solarity%2Fhardhat-markup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dl-solarity%2Fhardhat-markup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dl-solarity%2Fhardhat-markup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dl-solarity%2Fhardhat-markup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dl-solarity","download_url":"https://codeload.github.com/dl-solarity/hardhat-markup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dl-solarity%2Fhardhat-markup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275416249,"owners_count":25460913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","hardhat","hardhat-plugin","markdown","solarity"],"created_at":"2025-02-16T19:36:25.274Z","updated_at":"2025-09-16T12:24:56.685Z","avatar_url":"https://github.com/dl-solarity.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/@solarity/hardhat-markup.svg)](https://www.npmjs.com/package/@solarity/hardhat-markup) [![hardhat](https://hardhat.org/buidler-plugin-badge.svg?1)](https://hardhat.org)\n\n# Hardhat Markup\n\n[Hardhat 3](https://hardhat.org) plugin to generate customizable smart contracts documentation.\n\n## What\n\nThis plugin generates markdown documentation of the contracts present in the project. Leveraging the `natspec` and `solc` capabilities, it is able to output beautiful uniswap-like `.md` files.\n\n## Installation\n\n```bash\nnpm install --save-dev @solarity/hardhat-markup\n```\n\nIn your `hardhat.config.ts`, import the plugin and add it to the `plugins` array:\n\n```ts\nimport hardhatMarkup from \"@solarity/hardhat-markup\";\n\nexport default {\n  plugins: [hardhatMarkup],\n};\n```\n\n## Tasks\n\nThe documentation generation can be run either with built-in `compile` or the provided `markup` task.\n\nTo view the available options, run these help commands:\n\n```bash\nnpx hardhat help compile\nnpx hardhat help markup\n```\n\n## Environment extensions\n\nThis plugin does not extend the environment.\n\n## Usage\n\nThe `npx hardhat markup` command will compile and generate documentation for all the contracts used in the project into the default folder.\n\nClean old artifacts via `npx hardhat clean` command.\n\n### Configuration\n\nThe default configuration looks as follows. You may customize all fields in your *hardhat config* file.\n\n```ts\nexport default {\n  markup: {\n    outdir: \"./generated-markups\",\n    onlyFiles: [],\n    skipFiles: [],\n    noCompile: false,\n    verbose: false,\n  },\n};\n```\n\n- `outdir`: The directory where to store the generated documentation\n- `onlyFiles`: If specified, documentation will be generated **only for matching** sources, other will be ignored\n- `skipFiles`: Documentation will not be generated for **any matching** sources, also if those match `onlyFiles`\n- `noCompile`: Skips project recompilation before the documentation generation\n- `verbose`: Detailed logging on generation\n\n### Compilation and build profiles\n\nWhen invoked, `markup` compiles the project (unless `noCompile` is set) using the `production` build profile and ensures `userdoc` and `devdoc` are included in the compiler output.\n\n### Including/excluding files\n\n- Path stands for relative path from project root to either `.sol` file or directory.\n- If path is a directory, all its files and sub-directories are considered matching.\n- If source is a node module, `node_modules` must not be present in the path.\n\n## Example\n\n\u003ctable style=\"width:100%\"\u003e\n\u003ctr\u003e\n\u003cth\u003eGenerated markdown\u003c/th\u003e\n\u003cth\u003eExample Solidity code\u003c/th\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n  \n# Example\n\n## Overview\n\n#### License: MIT\n\n```solidity\ncontract Example\n```\n\nAuthor: Solidity lover\n\nThe example contract\n\nThis contract is meant to work as the example of how `hardhat-markup` plugin works.\n\nIn a nutshell, the plugin parses natspec documentation and presents it in a beautiful,\nUniswap-like style, leveraging MD format.\n\nYou can also have code blocks inside the comments!\n\n```solidity\ncontract Example {\n    function foo() external {\n        . . .\n    }\n}\n```\n## Events info\n\n### Random\n\n```solidity\nevent Random(uint256 value)\n```\n\nThe event that emits a random value\n\n\nParameters:\n\n| Name  | Type    | Description      |\n| :---- | :------ | :--------------- |\n| value | uint256 | the random value |\n\n## Errors info\n\n### Oops\n\n```solidity\nerror Oops(string reason)\n```\n\nThe error, occurs from time to time\n\n\nParameters:\n\n| Name   | Type   | Description |\n| :----- | :----- | :---------- |\n| reason | string | the reason  |\n\n## Functions info\n\n### foo (0xbd0d639f)\n\n```solidity\nfunction foo(address user, uint256 entropy) external returns (uint256)\n```\n\nThe very important function that computes the answer to the Universe\n\n\nParameters:\n\n| Name    | Type    | Description                        |\n| :------ | :------ | :--------------------------------- |\n| user    | address | the user who created the Universe  |\n| entropy | uint256 | the entropy                        |\n\n\nReturn values:\n\n| Name | Type    | Description     |\n| :--- | :------ | :-------------- |\n| [0]  | uint256 | the answer (42) |\n\n  \n\u003c/td\u003e\n\u003ctd\u003e\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\n/**\n * @author Solidity lover\n * @notice The example contract\n *\n * This contract is meant to work as the example of how `hardhat-markup` plugin works.\n *\n * In a nutshell, the plugin parses natspec documentation and presents it in a beautiful,\n * Uniswap-like style, leveraging MD format.\n *\n * You can also have code blocks inside the comments!\n *\n * ```solidity\n * contract Example {\n *     function foo() external {\n *         . . .\n *     }\n * }\n * ```\n */\ncontract Example {\n    /**\n     * @notice The event that emits a random value\n     * @param value the random value\n     */\n    event Random(uint256 value);\n\n    /**\n     * @notice The error, occurs from time to time\n     * @param reason the reason\n     */\n    error Oops(string reason);\n\n    /**\n     * @notice The very important function that computes the answer to the Universe\n     * @param user the user who created the Universe\n     * @param entropy the entropy\n     * @return the answer (42)\n     */\n    function foo(address user, uint256 entropy) external returns (uint256) {\n        emit Random(uint256(uint160(user)) + entropy);\n\n        return 42;\n    }\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Known limitations\n\n- `Vyper` is currently not supported.\n- `inheritdoc` parsing is ignored for state variable declarations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdl-solarity%2Fhardhat-markup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdl-solarity%2Fhardhat-markup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdl-solarity%2Fhardhat-markup/lists"}