Comments (22)
ahah, best fix is no fix ;) enjoy mate, closing
from mkdocs-static-i18n.
I understand mate.
Maybe there's another way to get the name of the theme that's being used instead of just reading the one declared from the config file when it's set to null
I'll give it a try and try to be smart, stay tuned (after dinner) :)
from mkdocs-static-i18n.
site/fr/tutorials/lua_basics_manticoin/index.html:<html lang="fr" class="no-js">
site/fr/tutorials/lua_basics_manticoin/index.html: <a href="/fr/" hreflang="fr" class="md-select__link">
site/fr/index.html:<html lang="fr" class="no-js">
site/fr/index.html: <a href="/fr/" hreflang="fr" class="md-select__link">
I can't reproduce on your development
branch
from mkdocs-static-i18n.
@ultrabug Uh, really? With the current state?
from mkdocs-static-i18n.
yep, latest development commit ab913dfed544265d4f4e44d2dc9b6d1974a8c19d
from mkdocs-static-i18n.
yep, latest development commit ab913dfed544265d4f4e44d2dc9b6d1974a8c19d
oh that is not latest but that at least gives me a place to start bisecting.
Latest is ManticoreGamesInc/platform-documentation@0e27cfa
from mkdocs-static-i18n.
@ultrabug any hints on where I could start looking?
from mkdocs-static-i18n.
Now I'm extra confused because I can't get it to work on that commit either.. Hrm.
You mean you can reproduce? did you recreate your venv? tbh I don't really know where to start because I was under the impression that I was doing the right thing and that it works as intended on the demo website...
from mkdocs-static-i18n.
Since it does not work in my env and not on Netlify either, I assumed it's something else. What I meant is that I can not get it to work on the commit you tried or on the latest.
from mkdocs-static-i18n.
@ultrabug Can you try on the latest commit again please? I tested on 3 systems now and it does not work anywhere :(
from mkdocs-static-i18n.
ok I'll give it a try again
* commit b1ae0eddd2cb04091b2d0259646e93aa32a77152 (HEAD -> development, origin/development, origin/HEAD)
| Author: Apalatn <[email protected]>
| Date: Tue Jun 15 09:55:54 2021 -0700
brand new venv, with requirements.txt installed
running with DEFAULT_LANGUAGE_ONLY=false mkdocs serve
from mkdocs-static-i18n.
ok I'll give it a try again
* commit b1ae0eddd2cb04091b2d0259646e93aa32a77152 (HEAD -> development, origin/development, origin/HEAD) | Author: Apalatn <[email protected]> | Date: Tue Jun 15 09:55:54 2021 -0700
brand new venv, with requirements.txt installed
running with
DEFAULT_LANGUAGE_ONLY=false mkdocs serve
And it works?
from mkdocs-static-i18n.
And it works?
No... I can reproduce the problem now, I'll have a look
from mkdocs-static-i18n.
And it works?
No... I can reproduce the problem now, I'll have a look
Oh my god, that makes me so happy, haha. I was going crazy here.
from mkdocs-static-i18n.
Ok I found why, this is because your theme.name
is null
and you derive material from a git submodule
This means that mkdocs-static-i18n cannot detect the material theme and thus does not set the theme.language for you (and you explicitly force the theme.language to be en
)
from mkdocs-static-i18n.
Oh that makes sense. I had actually tried not setting theme.language
but that causes material to fail compiling as well...
from mkdocs-static-i18n.
It does because you use it through a custom_dir and the material code can't find the language file since it's not a proper material distribution. In a sense, it suffers from the same problem as mkdocs-static-i18n.
If you use theme.name: material you can omit the language parameter just fine!
I suggest you just pin your material version and use overrides where appropriate mate.
As it is, this is not a mkdocs-static-i18n bug to me.
from mkdocs-static-i18n.
@ultrabug problem with that is that it is a very very customized fork that not only uses overrides...but yes, not your bug indeed then.
from mkdocs-static-i18n.
@ultrabug awesome, thank you. how about the generator
meta tag?
from mkdocs-static-i18n.
@Stanzilla dumb question but...
theme:
name: material
custom_dir: mkdocs-material/material
isn't that supposed to work? quick look at mkdocs code and it looks like it should....
from mkdocs-static-i18n.
@ultrabug awesome, thank you. how about the generator meta tag?
I'd rather not start parsing HTML nope
But I believe that you actually don't need to set theme.name to null and still benefit from your customization
from mkdocs-static-i18n.
yep. you are are totally right and that fixed it! Thank you so much!
from mkdocs-static-i18n.
Related Issues (20)
- Search shows Korean/Chinese pages when using default english HOT 6
- Plugin makes mkdocs-material pages scroll horizontally on mobile HOT 6
- Relative html img links are referencing non existing locale files since v1 HOT 5
- [Feature] Option to insert/inject content for fallback lang pages. HOT 16
- [Question] Can you hide/supress link warnings by mkdocs for non-existing files? HOT 7
- How to fix when translate got problem "warning not found image" HOT 1
- no Language code causing issues HOT 1
- Is there a way to preserve the language selection? HOT 2
- Incompatibility with Mkdocs Material Blog plugin? HOT 3
- [Bug?] 404 page not generated for selected language HOT 2
- Having issues building my translations after updating it to 1.0.0 HOT 8
- [Enhancement] Hiding localization options for unstralated pages HOT 2
- Issue with incorrect language folder being copied HOT 17
- Both languages show on the left-side menu instead of the current language's content only HOT 5
- Warning when homepage is not in nav HOT 1
- Non localized files missing in not default language HOT 3
- [RFE] - scaffold navigation for translations to allow for upstream management of fallback HOT 1
- Custom language selector (non-mkdocs-material) HOT 10
- [Question] INFO - Selected en None File(...) output HOT 4
- Not yet translated files in duplicated navigation entry
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-static-i18n.