-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Initial import of sphinx project #768
Initial import of sphinx project #768
Conversation
dpw13
commented
Feb 5, 2024
- Creates docs folder
- Converts top-level markdown files to RST in docs folder
- Adds doxygen, sphinx, and breathe options to CMakeLists.txt to generate projectm_sphinx build target
- Tweaks some of the generated RST to properly produce ToC and conform to sphinx's expectations
This is less of a PR and more of an RFC. I didn't have opinions on the look and feel of the generated documentation; this PR only creates the scaffolding to produce somewhat sensical documentation as described in #731. Generated documentation attached. Note that there are issues in generating the ToC; the index file has the ToC replicated in its body and I haven't figured out how to fix that. |
Turns out the tool |
They use an interesting naming scheme in Sphinx. I actually like it 😆 |
This is the Sphinx project for the internal classes, right? We also need another section in the docs for the public-facing API, which is the main area of interest for users of the library. This documentation needs to be generated from the installed files/headers only, so it doesn't include all the internal classes and also includes the proper (generated) files/directory structure of the final include directory. Since some headers/code files are also generated during the source build, it'd be nice to include the additional include dirs in the build directory in the Sphinx project. Not sure how it'll deal with the directory structure though, as it could get messy. We probably have to create a temporary amalgamated "source" dir with all libprojectM headers, including the generated ones, in the build dir and then run Doxygen on this. This is actually a point where Doxygen shows its age, it was definitely not designed for dynamic build systems which generate files out-of-source. It's always a pain to make it do what it needs to. Oh, this is just a rant on ideas - the initial check-in is fine, way better than nothing and we can work through all the remaining things step by step of course :) |
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.
Is there an automated way of converting the Markdown files to RST?
If so, I'd actually prefer to do this when building the docs so the RST file is always the same as the respective top-level file, and we won't have to change them twice all the time - duplicated content is always a guarantee that it'll diverge over time.
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.
Yes, I used pandoc to do it, but I wasn't sure it made sense to add that as a dependency for building docs. In addition, it seemed like the conversion wasn't perfect and needed a bit of tweaking. The markdown may be able to be tweaked instead to make it work.
Would it make sense to replace the markdown with the RST version entirely, deleting the MD files (apart from simple READMEs) to avoid duplication?
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.
RST is already quite popular these days and GitHub supports it, so personally I'm fine with it, especially given the fact reStructuredText is better suited for actual technical documentation than Markdown.
Once we have the documentation in place, we probably won't really need the building* files in the root dir anymore, so the docs and the main readme could just be separate things. Users could still just open the .rst files in the docs dir to read them, if someone is too lazy to visit the rendered page 😆
Let's just keep the files there so we have some content, and replace them one by one later on. We're really not in a rush there, projectM hasn't had proper documentation for a quarter of a century now, so a few weeks won't make much of a difference.
0a35d4f
to
4c74557
Compare
4c74557
to
82f2b58
Compare