pawamoy / mkdocs-coverage

MkDocs plugin to integrate your coverage HTML report into your site.
https://pawamoy.github.io/mkdocs-coverage
ISC License
24 stars 1 forks source link

Ability to place coverage pages in sub pages. #6

Open mattgialelis opened 2 years ago

mattgialelis commented 2 years ago

Is your feature request related to a problem? Please describe. Just for keeping things tidy on the Mkdocs Nav bar the current way where the links are all in a row going down the page without a way to organize them makes it harder for users to find the correct places to look for the documentation/coverage reports

Describe the solution you'd like A way to store the docs under a collapsible folder, this could be per coverage file or a global plug-in wide setting, an example is below of what would be amazing :)

Describe alternatives you've considered Ive attempted to make some changes to the code to allow for this but lack the knowledge of MKdocs and what it requires to make the adequate changes

Additional context

Screenshot 2022-04-11 at 11 21 31

Im sorry if there is a way to do this and i've not found it

i've attempted moving the report dir to sub folders but that isn't registered as an option in the menu/navbar

Boost priority

Fund with Polar

pawamoy commented 2 years ago

I'm not sure to follow. You have multiple Python packages and therefore multiple HTML coverage reports that you want to integrate into a single site?

mattgialelis commented 2 years ago

Yeap, i'm using a single mkdocs instance(site) for all my html coverage reports and other application documentation over multiple Go Projects.

I am actually also using this to host other html reports in my documentation.. I did find yesterday with some tinkering that to add things to a folder in the nav you just need to return the page name with a path attached like below.

            File(
                "test/"+page_name,
                str(tempfile.parent).removesuffix('/test'),
                config["site_dir"],
                config["use_directory_urls"],
            ),
pawamoy commented 2 years ago

I see, thanks for the explanation. Well, I initially didn't plan to support adding multiple coverage reports, but that would be a good feature :slightly_smiling_face: If you want to send a PR, I will review it :slightly_smiling_face: Otherwise I'll eventually get to it, but I cannot say when!

dmrauch commented 7 months ago

Unfortunately, I am not familiar with the development of MkDocs plugins and am currently lacking the time to commit to digging into it. Otherwise I'd love to help out with this feature because I would greatly appreciate the possibility to add multiple coverage reports. Many thanks for your great work around MkDocs API docs @pawamoy!

viettappcard commented 5 months ago

Definitely a good feature to have to support monorepos

pawamoy commented 5 months ago

I recently updated the code to support putting the coverage report in a sub page. It shouldn't be hard now to update it again to support multiple reports. Would you like to take a stab at it @dmrauch? :slightly_smiling_face: