Open gospodima opened 2 months ago
I guess we can apply that patch, but what happens if a version of the site does not have the page that pagename
points to? I think this is why it is currently the way it is.
As far as I understand, Sphinx uses gettext with .po files for localization. I.e. the page structure should be the same and in case there is no translation - default language will be shown.
Or do you mean there could be an issue with some other localization approaches?
the page structure should be the same
How accurate is this assumption? You could actually do some clever stuff with toctree
directives, so that some languages have special pages or simply elide a page for a language (usually for legal reasons).
Also, FYI, we have contribution guidelines about unwanted changes. Notice the part about the src directory (the HTML templates included).
In upstream mkdocs-material, they too don't add to the base URL either.
Fortunately, as for overriding the template, this will become much easier when we merge in the updates from upstream (#338). The file to override would be partials/alternate.html
(no longer the entire partials/header.html
).
The file to override would be partials/alternate.html
This looks like a good option. Thank you!
Hello,
Thank you for maintaing this repo
I would like to make an adjustment to the language switch functionality so that it redirects to the currently opened page instead of some default page.
From what I can see, the only option currently available to implement this is by adding
href="{{ pathto(alt.link + pagename) }}"
to header.html. And this is only possible by copying and overwriting header.html template.Is there a solution that doesn't require overwriting the entire header template?