-
Notifications
You must be signed in to change notification settings - Fork 202
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(store): add API reference #1762
Conversation
|
another approach could be a component that wraps each markdown file and does ~the same (though it prob wouldn't solve sidebar issues) |
Looks decent, despite shortcomings! https://mud-next-docs-fv7gsl0r0-latticexyz.vercel.app/store/reference/store-core Seems like the imported markdown is also missing from search, which is a big downside IMO. Bigger than the ones mentioned above. |
Good catch! I think to solve this we have to print the markdown instead of using the nextra component |
Added a script to post-process the |
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 love it. There is some formatting weirdness (compare http://localhost:3000/store/reference/store-core#getfieldlayout and http://localhost:3000/store/reference/store-core#getvalueschema, for example). Also, I'd expect the italicized test to be the one in the purple box, not what's in the green one.
However, these are minor and we have lots of docs to go through. I saw merge it now and deal with formatting later. It's clear enough.
Re italic font vs regular font: I think that depends on what has the
`@notice` tag (regular) and what has the `@dev` tag (italic) in the NatSpec. We
need to do another pass for NatSpec in the IStore interfaces, we had
skipped those bc they were not relevant for the audit.
…On Fri 13. Oct 2023 at 19:56, Ori Pomerantz ***@***.***> wrote:
***@***.**** approved this pull request.
I love it. There is some formatting weirdness (compare
http://localhost:3000/store/reference/store-core#getfieldlayout and
http://localhost:3000/store/reference/store-core#getvalueschema, for
example). Also, I'd expect the italicized test to be the one in the purple
box, not what's in the green one.
[image: Screenshot 2023-10-13 at 12 53 51 PM]
<https://user-images.githubusercontent.com/12722969/274993667-e9e48119-934e-4011-9b1e-9fa37adfe8b0.png>
However, these are minor and we have lots of docs to go through. I saw
merge it now and deal with formatting later. It's clear enough.
—
Reply to this email directly, view it on GitHub
<#1762 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVI5JBQEZJCQDTIJHMLTAHLX7F6F7AVCNFSM6AAAAAA56C2VKWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMNZXGA2TIOBZGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This approach lets us generate API docs from NatSpec and render them on the docs page.
Limitations:
We could work around both limitations by creating a script that parses the raw forge markdown output, processes it (eg to replace links and change headlines from H1 to H2 etc), and render it as plain mdx file in the docs.
Curious about your thoughts on this approach @holic @qbzzt