Skip to content

Commit

Permalink
Split contracts API doc into multiple files (#640)
Browse files Browse the repository at this point in the history
Having all the contracts documented in one common file turned out to be
hard to render by the GitBook. We're switching to documenting each
contract file in a separate Markdown file.
As the generated files will be much smaller now and GitBook has its own
file `ON THIS PAGE` section, we don't need to generate Table of
Contents. The one thing that we also change as part of this PR is
`rsyncDelete` setting - we'll have it set to `true`, in order to delete
documentation of contracts which get removed from the repo. As we're not
working directly on a `main` branch, this isn't dangerous (we'll see all
the deletions in the PR diff).
  • Loading branch information
pdyraga committed Jun 29, 2023
2 parents 22acd71 + 8682e64 commit 94c78ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/contracts-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
# newline and does this in a loop.
preProcessingCommand: sed -i ':a;N;$!ba;s_///\n//\n_///\n_g' ./contracts/bridge/BitcoinTx.sol
publish: false
addTOC: false
commentPR: true
exportAsGHArtifacts: true

Expand All @@ -74,12 +75,14 @@ jobs:
# newline and does this in a loop.
preProcessingCommand: sed -i ':a;N;$!ba;s_///\n//\n_///\n_g' ./contracts/bridge/BitcoinTx.sol
publish: true
addTOC: false
verifyCommits: true
destinationRepo: threshold-network/threshold
destinationFolder: ./docs/app-development/tbtc-v2/tbtc-v2-api
destinationBaseBranch: main
userEmail: 38324465+thesis-valkyrie@users.noreply.github.com
userName: Valkyrie
rsyncDelete: true
secrets:
githubToken: ${{ secrets.THRESHOLD_DOCS_GITHUB_TOKEN }}
gpgPrivateKey: ${{ secrets.THRESHOLD_DOCS_GPG_PRIVATE_KEY_BASE64 }}
Expand Down
2 changes: 1 addition & 1 deletion solidity/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const config: HardhatUserConfig = {
docgen: {
outputDir: "generated-docs",
templates: "docgen-templates",
pages: "single", // `single`, `items` or `files`
pages: "files", // `single`, `items` or `files`
exclude: ["./test"],
},
}
Expand Down

0 comments on commit 94c78ce

Please sign in to comment.