Giter Club home page Giter Club logo

Comments (8)

oprypin avatar oprypin commented on June 14, 2024 2

It seems that #45 is taking us closer to a solution, but it's still really tough.

Out of these two redirects, the 1st one will start working, but not 2nd:

        "en/old.md": "new.en.md"
        "pt/old.md": "new.pt.md"

Somehow the pt one is not reported to be in the files collection.

from mkdocs-redirects.

oprypin avatar oprypin commented on June 14, 2024 1

Please provide a mkdocs website source (mkdocs.yml and necessary sources) that exhibits this issue.

from mkdocs-redirects.

hhslepicka avatar hhslepicka commented on June 14, 2024

I am with the same problem as the one reported here. I am using the mkdocs-static-i18n and I can't get the redirects to work. Any update?

from mkdocs-redirects.

hhslepicka avatar hhslepicka commented on June 14, 2024

@oprypin working on that.

from mkdocs-redirects.

hhslepicka avatar hhslepicka commented on June 14, 2024

@oprypin here they are:

Steps to Reproduce

  1. Access the website at https://hhslepicka.github.io/mkdocs-redirect-issue-i18n/
  2. Click on the Old link on the home page.
  3. You will receive a 404 error
  4. Go back into the home page
  5. Click on the New link
  6. It will open the new page properly

As @MAGICCC reported, this plugin ends up generating a old.en folder with the index.html file inside of it (https://github.com/hhslepicka/mkdocs-redirect-issue-i18n/tree/gh-pages).

Also, the page is not generated for the multiple supported languages or even for the language indicated on the redirects area, it just adds it to the root.

from mkdocs-redirects.

MAGICCC avatar MAGICCC commented on June 14, 2024

I did a quickfix on my end some days after I created the issue.
Basicly a script which will change the index.html in the redirect folders

#/bin/bash
find ./site/ -maxdepth 2 -mindepth 2 -type f -name 'index.html' -not -path './site/de/*' -not -path './site/en/*' | while read f; do
	echo "Fixing redirect '$f'..."
	sed -i -E 's/\.en\/"/\/"/' $f
done

And I am speaking about this repo, https://github.com/mailcow/mailcow-dockerized-docs

from mkdocs-redirects.

hhslepicka avatar hhslepicka commented on June 14, 2024

@oprypin I appreciate you looking into that. Thank you very much.

from mkdocs-redirects.

kamilkrzyskow avatar kamilkrzyskow commented on June 14, 2024

The i18n plugin simulates the subsequent builds on the fly modifying the configuration to change the language of the theme and correctly save new.en.md under en/new/index.html. I doubt this is an issue to be dealt with in the redirects plugin.
https://github.com/kamilkrzyskow/i18n/tree/redirects-plugin-support I made changes to i18n plugin, didn't create a PR yet, but it's been working OK for the past few days.

from mkdocs-redirects.

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.