{"id":29089626,"url":"https://github.com/openzeppelin/docs-utils","last_synced_at":"2025-06-28T04:04:16.835Z","repository":{"id":42964330,"uuid":"225099457","full_name":"OpenZeppelin/docs-utils","owner":"OpenZeppelin","description":"Scripts used for docs previews in pull requests across OpenZeppelin projects","archived":false,"fork":false,"pushed_at":"2025-06-05T19:33:16.000Z","size":33,"stargazers_count":6,"open_issues_count":2,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-06-05T20:27:33.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenZeppelin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-01T03:05:33.000Z","updated_at":"2025-06-05T19:28:24.000Z","dependencies_parsed_at":"2025-06-05T20:32:49.766Z","dependency_job_id":null,"html_url":"https://github.com/OpenZeppelin/docs-utils","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/OpenZeppelin/docs-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fdocs-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fdocs-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fdocs-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fdocs-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenZeppelin","download_url":"https://codeload.github.com/OpenZeppelin/docs-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fdocs-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262371684,"owners_count":23300595,"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","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":[],"created_at":"2025-06-28T04:04:16.131Z","updated_at":"2025-06-28T04:04:16.821Z","avatar_url":"https://github.com/OpenZeppelin.png","language":"JavaScript","readme":"Utilities for setting up and previewing documentation across OpenZeppelin\nprojects.\n\n\u003e **This is an internal tool for OpenZeppelin projects.**\n\u003e\n\u003e If you are looking to generate documentation for your Solidity project, check\n\u003e out [`solidity-docgen`](https://github.com/OpenZeppelin/solidity-docgen).\n\n### Initial setup (`oz-docs init`)\n\nThe `oz-docs init` command will create the necessary directories and files to\ninclude a repo in the docs site, and to preview it with the steps in the next\nsection.\n\n### Previewing the site locally (`oz-docs build`, `oz-docs watch`)\n\nAdd a dev dependency on this repo.\n\n```\nnpm install --save-dev github:OpenZeppelin/docs-utils\n# or yarn add --dev github:OpenZeppelin/docs-utils\n```\n\nUse the `oz-docs` executable in the package's scripts. You need to provide the\n`-c` option with a path to the Antora component that you want to render (this\nis the directory that contains the `antora.yml` file).\n\nYou should add two commands: `docs` and `docs:watch`. The latter should use the\n`oz-docs watch [PATTERN...]` command. If some of the docs are generated by a\n`prepare-docs` command, e.g., extracting them from Solidity or JavaScript\nfiles, you should specifiy glob patterns that match the source files so that\nthe docs are regenerated automatically.\n\n```diff\n   \"scripts\": {\n+    \"docs\": \"oz-docs -c docs\",\n+    \"docs:watch\": \"npm run docs watch contracts\",\n     \"prepare-docs\": \"solidity-docgen -i contracts -o docs\"\n   },\n```\n\n### Setting up docs previews on pull requests\n\nThe above should enable local previews of the docs. It's also useful to set up\ndocs previews on pull requests. This is done using Netlify Deploy Previews.\n\nCreate a `netlify.toml` file at the root of the repo with the following contents.\n(The command and the path may be slightly different for monorepos or repos using\nyarn.)\n\n```toml\n[build]\ncommand = \"npm run docs\"\npublish = \"build/site\"\n```\n\nThen create a Netlify site connected to the repository. Deploy Previews for the\n`master` branch are enabled by default.\n\nYou will want to disable the Netlify's checks on pull requests, since they are\nonly useful for production sites. In the site settings on Netlify, go to \"Build\n\u0026 Deploy\", and at the bottom of the page go to \"Deploy notifications\". Delete\nthe three notifications that say \"rich details\".\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzeppelin%2Fdocs-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenzeppelin%2Fdocs-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzeppelin%2Fdocs-utils/lists"}