Code Monkey home page Code Monkey logo

Comments (22)

ultrabug avatar ultrabug commented on May 17, 2024 2

ahah, best fix is no fix ;) enjoy mate, closing

from mkdocs-static-i18n.

ultrabug avatar ultrabug commented on May 17, 2024 1

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.

ultrabug avatar ultrabug commented on May 17, 2024
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.

Stanzilla avatar Stanzilla commented on May 17, 2024

@ultrabug Uh, really? With the current state?

from mkdocs-static-i18n.

ultrabug avatar ultrabug commented on May 17, 2024

yep, latest development commit ab913dfed544265d4f4e44d2dc9b6d1974a8c19d

from mkdocs-static-i18n.

Stanzilla avatar Stanzilla commented on May 17, 2024

yep, latest development commit ab913dfed544265d4f4e44d2dc9b6d1974a8c19d

oh that is not latest but that at least gives me a place to start bisecting.

https://github.com/ManticoreGamesInc/platform-documentation/compare/ab913dfed544265d4f4e44d2dc9b6d1974a8c19d..development

Latest is ManticoreGamesInc/platform-documentation@0e27cfa

from mkdocs-static-i18n.

Stanzilla avatar Stanzilla commented on May 17, 2024

@ultrabug any hints on where I could start looking?

from mkdocs-static-i18n.

ultrabug avatar ultrabug commented on May 17, 2024

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.

Stanzilla avatar Stanzilla commented on May 17, 2024

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.

Stanzilla avatar Stanzilla commented on May 17, 2024

@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.

ultrabug avatar ultrabug commented on May 17, 2024

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.

Stanzilla avatar Stanzilla commented on May 17, 2024

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.

ultrabug avatar ultrabug commented on May 17, 2024

And it works?

No... I can reproduce the problem now, I'll have a look

from mkdocs-static-i18n.

Stanzilla avatar Stanzilla commented on May 17, 2024

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.

ultrabug avatar ultrabug commented on May 17, 2024

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.

Stanzilla avatar Stanzilla commented on May 17, 2024

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.

ultrabug avatar ultrabug commented on May 17, 2024

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.

Stanzilla avatar Stanzilla commented on May 17, 2024

@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.

Stanzilla avatar Stanzilla commented on May 17, 2024

@ultrabug awesome, thank you. how about the generator meta tag?

from mkdocs-static-i18n.

ultrabug avatar ultrabug commented on May 17, 2024

@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 avatar ultrabug commented on May 17, 2024

@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.

Stanzilla avatar Stanzilla commented on May 17, 2024

yep. you are are totally right and that fixed it! Thank you so much!

from mkdocs-static-i18n.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.