mkdocs-static-i18n icon indicating copy to clipboard operation
mkdocs-static-i18n copied to clipboard

Support jupyter notebook(ipynb) files

Open yeemh opened this issue 2 years ago • 1 comments

thanks for the great i18n plugin 👍

I'm trying to use mkdocs-jupyter plugin for rendering ipynb files, and figured out ipynb files don't show if I use with this plugin. Is there any way to use both plugins?

plugins:
    - i18n
    - mkdocs-jupyter

made possible to show ipynb in default page, but not in other languages

yeemh avatar Sep 01 '22 11:09 yeemh

Searched for why and found file.is_documentation_page() may make ipynb as static files. Mkdocs defines files.py

def is_documentation_page(self) -> bool:
        """Return True if file is a Markdown page."""
        return utils.is_markdown_file(self.src_uri)

utils/__init__.py, utils/__init__.py is_markdown_file

markdown_extensions = (
    '.markdown',
    '.mdown',
    '.mkdn',
    '.mkd',
    '.md',
)

def is_markdown_file(path):
    """
    Return True if the given file path is a Markdown file.
    https://superuser.com/questions/249436/file-extension-for-markdown-files
    """
    return path.endswith(markdown_extensions)

So I've tried to inclue ipynb when checking file.is_documentation_page(), but it didn't work. Is there any other part that affects ipynb not working?

yeemh avatar Sep 05 '22 02:09 yeemh

Hello @yeemh sorry for the late reply.

Do you have a public repo where this can be tested? I need a reproductible environment to be helpful I'm afraid.

It's hard for a plugin to be compatible with whatever the others plugins are doing as you can understand :(

ultrabug avatar Oct 14 '22 16:10 ultrabug

Please reopen if you want to help in reproduction.

ultrabug avatar Nov 09 '22 09:11 ultrabug