Skip to content
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

feat(docs): Add library documentation #12

Closed
wants to merge 1 commit into from

Conversation

NotAussie
Copy link

This draft aims to implement basic but useful auto-generated documentation using MkDocs and mkdocstrings.

I'm, still working on getting some markdown features to work, but in the meantime feel free to give any input on changes you'd like!

Closes #1 if merged.

A basic docs implementation using Mk Docs, there's still a hand full of issues needing to be fixed but the basics are there.
@MCausc78
Copy link
Owner

MCausc78 commented Dec 7, 2024

The library does not mkdocs' syntax to document stuff, it uses Sphinx syntax.

Also can you not copypaste docs stuff from hikari, like you did with scripts/docs/gen_ref_pages.py?

@NotAussie
Copy link
Author

The library does not mkdocs' syntax to document stuff, it uses Sphinx syntax.

No problem there, luckily it seems like the handler for doc strings supports using reStructuredText.

Also can you not copypaste docs stuff from hikari, like you did with scripts/docs/gen_ref_pages.py?

Yea, no problem, I was just working out some stuff using it, but I do plan to rewrite it or remake it entirely before this pr is anywhere near ready. (I should have made that clear before, sorry.)

@NotAussie
Copy link
Author

I've got MkDocs properly rendering the docstrings for the most part, but there are a few things that'll need some basic fixes (e.g. using mkdocstring's references style) but that's nothing I can't easily clean up. Before I work on that, though, I'll rewrite scripts/docs/gen_ref_pages.py as I want to remove that temporary code and replace it with something that'll be more permanent.

Here are two examples of those small issues I'll need to fix:
image
image

@MCausc78
Copy link
Owner

MCausc78 commented Dec 7, 2024

I've got MkDocs properly rendering the docstrings for the most part, but there are a few things that'll need some basic fixes (e.g. using mkdocstring's references style) but that's nothing I can't easily clean up. Before I work on that, though, I'll rewrite scripts/docs/gen_ref_pages.py as I want to remove that temporary code and replace it with something that'll be more permanent.

Yeah, the library uses a lot of Sphinx-specific things, such as admonitions. As such I'll likely close this PR and make docs using Sphinx instead.

@MCausc78 MCausc78 closed this Dec 7, 2024
@NotAussie
Copy link
Author

I'm a little confused on why you list hikari.py in #1 as what I was doing would have brought this project's docs mostly inline with what Hikari does. I'd recommend being a bit clearer in what you want, so people don't feel like their efforts were undermined due to a lack of communication.

@MCausc78
Copy link
Owner

MCausc78 commented Dec 7, 2024

What I meant in original issue is writing docs itself, not a poll about choosing static site generator (Sphinx, mkdocs).

@NotAussie NotAussie deleted the docs branch December 7, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation
2 participants