Comments (8)
You could override the 404.html template with a version that contains a JavaScript redirection script based on the URL for old links.
from mkdocs-static-i18n.
You could override the 404.html template with a version that contains a JavaScript redirection script based on the URL for old links.
That's a good idea, I'll try it
from mkdocs-static-i18n.
Hello @MetalKnight56,
looking at https://readthedocs.org/projects/epicfight-docs/ it seems that ReadTheDocs itself sets /en/latest/
as the root /
page of the project. I don't understand why it adds /en/
before the /latest/
.
The i18n 1.0 plugin creates the default language at the /
root directory and then creates subsequent languages at /lang_code/
. Before in 0.53 it would also duplicate the default language in it's own /lang_code/
path.
It's hard to tell what's the issue here as the behaviour didn't change so much. You could try setting the site_url
in your mkdocs.yml
https://www.mkdocs.org/user-guide/configuration/#site_url to https://epicfight-docs.readthedocs.io/
Other than that investigate ReadTheDocs to find how it sets the /
directory.
from mkdocs-static-i18n.
Hello @MetalKnight56, looking at readthedocs.org/projects/epicfight-docs it seems that ReadTheDocs itself sets
/en/latest/
as the root/
page of the project. I don't understand why it adds/en/
before the/latest/
.The i18n 1.0 plugin creates the default language at the
/
root directory and then creates subsequent languages at/lang_code/
. Before in 0.53 it would also duplicate the default language in it's own/lang_code/
path.It's hard to tell what's the issue here as the behaviour didn't change so much. You could try setting the
site_url
in yourmkdocs.yml
mkdocs.org/user-guide/configuration/#site_url tohttps://epicfight-docs.readthedocs.io/
Other than that investigate ReadTheDocs to find how it sets the/
directory.
The thing that is weird is the fact that before when i used "0.56" version of i18n it all worked just fine, because it would add the lang code even after selecting any page including the index.en
so for example when you click on a language when on index.en it would look something like this the url
https://epicfight-docs.readthedocs.io/en/latest/pt/
but now it just does this - https://epicfight-docs.readthedocs.io/pt/
from mkdocs-static-i18n.
If you're saying that https://epicfight-docs.readthedocs.io/en/latest/pt/
is correct, then try setting the site_url
to https://epicfight-docs.readthedocs.io/en/latest/
, but to me it's weird that there is both en
and pt
.
from mkdocs-static-i18n.
If you're saying that
https://epicfight-docs.readthedocs.io/en/latest/pt/
is correct, then try setting thesite_url
tohttps://epicfight-docs.readthedocs.io/en/latest/
, but to me it's weird that there is bothen
andpt
.
Ok i found the solution to it, but it just gave me a huge headache. So ReadTheDocs allows me to change how they build the versioning scheme. If anyone ever has the same issue as me, here's the reference - https://docs.readthedocs.io/en/latest/versioning-schemes.html#
Just gotta change a setting on the admin panel>adavanced options and change the versioning scheme to Single version
(Mind that it took me like 10 minutes or so for the changes to apply + it broke all links i had on my other pages...)
Here's the new page - https://epicfight-docs.readthedocs.io/
from mkdocs-static-i18n.
Did you try using site_url
or not? I believe it would allow you to keep the old links working.
from mkdocs-static-i18n.
Did you try using
site_url
or not? I believe it would allow you to keep the old links working.
didn't actually try that, but i mean, just converted the links its fine, i agree with you that it did look weird so i kinda stopped stalling and got to fix that as well
from mkdocs-static-i18n.
Related Issues (20)
- [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
- [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
- Example not working: translation link in menu HOT 3
- Integration with mkdocs-material privacy plugin - image link invalid HOT 1
- Document how to build the documentation
- Is possible to put default language result in non-root path?
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.