-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(contracts): setup solidity docgen and configure it to work on docusaurus #870
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Looks good overall but added some change requests.
72084da
to
626fd2d
Compare
2a1fc22
to
c3450b3
Compare
95319c4
to
c3450b3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
✅ Deploy Preview for maci-typedoc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
d2ea1f2
to
9bd1e45
Compare
@kittybest For v0.x vs v1.x - we will continue to host v0.x docs (legacy) but do not intend to update them or touch them at all. These are just a reference of how MACI v.0x works (though we do not support it anymore). Moving forward, all new content will only be inside v.1x or newer versions. TLDR no typedoc nor natspec docs for v.0x Sure we can put them in the documents folder as highlighted by that image, though we will not be making typedoc related changes on this PR, but please feel free to open one yourself to move them. While I agree that the natspec could have been moved to a separate one (which is also coming today), some of the tags were broken and were preventing docgen to complete. Would it be ok to keep it like this for now, just change the folder where the docs are hosted? Not sure what you mean by not displaying the correct website? what is wrong about it? |
88bfae9
to
91c915a
Compare
@ctrlc03 FYI looks like builds are failing in Netlify:
Is Netlify able to access that script? 🤔 |
91c915a
to
04586fb
Compare
there was a name mismatch, fixed now on our side. |
04586fb
to
5700f1f
Compare
let fileContent = fs.readFileSync(absolutePath, "utf8"); | ||
|
||
// Remove the "# Solidity API" line | ||
fileContent = fileContent.replace("# Solidity API\n", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
import fs from "fs"; | ||
import path from "path"; | ||
|
||
const solidityDocDir = path.resolve(__dirname, "../../versioned_docs/version-v1.x/natspec-docs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest maybe solidity-api
or contracts-api
or solidity-docs
instead of natspec-docs
. Subjective take but I suspect many folks don't know what NatSpec is & may get confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can accomplish that with a custom sidebar, can do that in a later PR if you want - we can directly specify order and name there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can accomplish that with a custom sidebar, can do that in a later PR if you want - we can directly specify order and name there
Sweet, love that idea!
import path from "path"; | ||
|
||
const solidityDocDir = path.resolve(__dirname, "../../versioned_docs/version-v1.x/natspec-docs"); | ||
const sourceDir = path.resolve(__dirname, "../../../contracts/docs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment that we pull generated docs from the contracts package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A couple comments but no blockers.
I didn't scrutinize the contract comments closely but website looks great & all pages are searchable! 🎉
5700f1f
to
8455b1d
Compare
…y inherited functions in solidity docgen docs
…y on the NatSpec comments for all Solidity files, document the scripts used within the website folder to fix typedoc and natspec links
…nning typedoc, and solidity docgen) in order to allow preview via netlify
8455b1d
to
3101a60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks!
fix #770
This PR adds support for Solidity Docgen as well as fixes syntax errors in current NatSpec comments (note it does not enhance the comments as that is to be worked on #843). Support for hosting the generated content on Docusaurus is also added