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

Detect mkdocs-nature as supported theme #19

Closed
pawamoy opened this issue Sep 10, 2023 · 3 comments
Closed

Detect mkdocs-nature as supported theme #19

pawamoy opened this issue Sep 10, 2023 · 3 comments

Comments

@pawamoy
Copy link

pawamoy commented Sep 10, 2023

MkDocs-Nature seems to support section-index natively. Example: https://pawamoy.github.io/markdown/sitemap.html, built from https://github.com/pawamoy/markdown/tree/api-docs. It would be nice if it was detected as a supported theme, to get rid of the warning.

Possible solution (tested, seems to work fine) in rewrites.py:

        if path.endswith("/mkdocs/templates/sitemap.xml"):
            src = _transform_mkdocs_sitemap_template(src)
        elif path.endswith("/nature/base.html"):
            self.found_supported_theme = True
            return src, filename, uptodate
        else:
            ...

Let me know if I should open a PR 🙂

A way to disable the warning would be fine too.

@oprypin
Copy link
Owner

oprypin commented Sep 10, 2023

😯 how did it happen that it supports that?

@oprypin
Copy link
Owner

oprypin commented Sep 10, 2023

Great stuff! 👍 That's the way to go when writing a theme

We'll list it for sure

@oprypin
Copy link
Owner

oprypin commented Sep 12, 2023

Release in a day probably

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

No branches or pull requests

2 participants