ultrabug / mkdocs-static-i18n

MkDocs i18n plugin using static translation markdown files
https://ultrabug.github.io/mkdocs-static-i18n/
MIT License
219 stars 37 forks source link

Unclear how to work with mkdocs-static-i18n and mike versioning at the same time #265

Closed jodygarnett closed 9 months ago

jodygarnett commented 9 months ago

Really enjoying this project, running into a difficulty combing mike publishing and mkdocs-static-i18n language control.

I am sure I just do not understand the interaction between these two plugins.

From the "home" page the language chooser is ending up directing to 404 page:

  1. From here https://jodygarnett.github.io/core-geonetwork/4.2.5/ selecting fr 404: https://jodygarnett.github.io/fr/

  2. From https://jodygarnett.github.io/core-geonetwork/4.2.5/fr/ selecting en 200 (but empty): https://jodygarnett.github.io

  3. From https://jodygarnett.github.io/core-geonetwork/4.2.5/devel/docs/markdown/ selecting fr 200: https://jodygarnett.github.io/core-geonetwork/4.2.5/fr/devel/docs/markdown/

My mkdocs.yaml configuration is I hope normal:

plugins:
  - i18n:
      docs_structure: suffix
      reconfigure_material: true
      languages:
        - locale: en
          default: true
          name: English
          build: true
        - locale: fr
          name: Français
          build: !ENV [FRENCH,true]
          site_name: 'Online Help (FR)'

And am deploying to mike using (there is no special mike configuration set):

mike deploy --push --update-aliases 4.2.5 latest 
jodygarnett commented 9 months ago

Indeed I run into similar issues testing mike serve locally.

jodygarnett commented 9 months ago

Oh dear, if I read the manual site_url is required, which addresses this problem.

Thanks 🤣