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

[Request] Excluding folders from localization #264

Open
usulpt opened this issue Sep 25, 2023 · 4 comments
Open

[Request] Excluding folders from localization #264

usulpt opened this issue Sep 25, 2023 · 4 comments

Comments

@usulpt
Copy link

usulpt commented Sep 25, 2023

hello! would it be possible to exclude one or more folders from being localized? api documentation, for example?

thanks and keep up the great work!

@usulpt usulpt changed the title [Request] [Request] Excluding folders from localization Sep 25, 2023
@ultrabug
Copy link
Owner

Hi @usulpt ; it's hard to understand what you mean exactly by this.

Could you provide a sample docs structure and explain from there?

@AIboy996
Copy link

Same issue. Later I will make a pull request on this.

@AIboy996
Copy link

@usulpt hei, I modify some code to support exclude one or more folders from being localized, you can check https://github.com/AIboy996/mkdocs-static-i18n.

It works like:
mkdocs-i18n

All files in ignored folder will be redirected to default language page(but not simple redirect, in fact these page will not be built).

FYI, if you want to install the modified version, just type:

pip install git+https://github.com/AIboy996/mkdocs-static-i18n --force-reinstall

then you can ignore some folder in mkdocs.yml:

plugins:
  - search
  - i18n:
      docs_structure: suffix
      exclude_folders:
        - docs/setup

hope it helps.

And @ultrabug maybe this can be considered to include as a formal config option for mkdocs-static-i18n.

@AIboy996
Copy link

Since i am not familar with mkdocs-static-i18n source code enough. I am not sure the modification is appropriate.(it will trigger some WARNINGs from mkdocs.structure.nav.get_navagation) So I won’t initiate a pull request qwq__

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

3 participants