Prepare for use with mkdocs-static-i18n
joaolrc opened this issue · comments
First of all, thanks for making this project.. exactly what i was looking for.
What i am about to post is not really an issue but a feature request.
While using mkdocs-static-i18n plugin, one ends with a structure like (assuming pt and en as site languages):
├── docs
│ ├── Home
│ │ ├── index.pt.md
│ │ ├── index.en.md
│ ├── index.pt.md
│ ├── index.en.md
│ ├── mkdocs.yml
So, 2 indexes must be created. One that includes only *.en.md files for en version and another that includes *.pt.md for portuguese version home page.
I already see that you have a feature to erxclude/include filex by pattern/regex.
It would be great that we could combine that and instruct your plugin to create 2 separata index..md to create a home page per language.
Kind Regards!
Hi @joaolrc
Thank you for having an interest in this project.
I don't know if I can do it, but I'll try. 👍
I have released a v0.0.6 that supports mkdocs-static-i18n.
Could you please check to see if this release satisfies your request?
- Update plugin to v0.0.6
- Adds setting for mkdocs-static-i18n
integrate_mkdocs_static_i18n: true
languages:
en:
toc_page_title: Contents
toc_page_description: Usage mkdocs-toc-md
ja:
toc_page_title: 目次
toc_page_description: mkdocs-toc-mdプラグインの使い方
Sample mkdocs.yml
Hello
Thanks for the quick response and development.
The implementation seems correct!
However, looking at this again, i found another thing that could be better.
Assuming the following structure:
├── docs
│ ├── Home
│ │ ├── index.pt.md
│ │ ├── index.en.md
│ │ ├── foo.pt.md
│ │ ├── foo.en.md
│ ├── index.pt.md
│ ├── index.en.md
│ ├── mkdocs.yml
If you have an h1 in Home/index and another one in Home/foo, you will render both as H1.
In my opinion, this should not be like that but there may be others that say otherwise.. maybe if you put some config variable to avoid this behaviour, it would be cool.
So, to conclude, you would only render 1 h1 per directory, which should be found at Home/index.
Take as example
Home/index.en.md
# IndexTitle
## IndexSubtitle
Home/foo.en.md
# FooTitle
## FooSubtitle
TOC would look like:
# IndexTitle
### IndexSubtitle
## FooTitle
### FooSubtitle
Do you understand and agree?
Kind Regards