JakubAndrysek / MkDoxy

📖 Automatically generates API documentation for your project based on Doxygen comments and code snippets in your markdown files.
https://mkdoxy.kubaandrysek.cz/
MIT License
60 stars 16 forks source link

use_directory_urls: false doesn't work with Mkdoxy #30

Closed mikuslaw closed 1 year ago

mikuslaw commented 1 year ago

Hi,

I'm trying to run mkdocs+ mkdoxy and publish it to artifactory. This solution has a drawback that in order to be able to view files in htmls embedded in zip files published, links need to end in index.html.

In mkdocs there is an option use_directory_urls: false (https://www.mkdocs.org/user-guide/configuration/#use_directory_urls) that takes care of that. It also covers the use case of viewing the files from local disk.

When I run the mkdocs, I get nice links with "somename/index.html" appended, but links that come from mkdoxy are still pointing to "somename/". I tried to check sources in mkdoxy for places that would need to be changed, but didn't see anything specific for now. Can you take a look if there is a way to support this setting? Or maybe at least give a general tips where that fix may need to happen? I saw that jinja is used as template engine, but it generates markdown(?). So do I understand correctly that it would be mkdocs that would be parsing generated md files and then the support for use_directory_urls is broken on mkdocs side?

I appreciate any help. Jerzy

JakubAndrysek commented 1 year ago

I have fixed this issue

        self.siteDir = siteDir
        self.apiPath = apiPath
        self.doxygen = doxygen
-       self.useDirectoryUrls = useDirectoryUrls,
+       self.useDirectoryUrls = useDirectoryUrls
        self.fullDocFiles = []
        self.debug = debug
        self.outputSumm = ""

I have forgotten the comma which changes the ty to the tuple.

Upgrade to version 1.0.4 or newer. https://pypi.org/project/mkdoxy/1.0.4/

mikuslaw commented 1 year ago

I appreciate the swiftness of your response very much! Thank you. Testing it right now.