Relative access between translations using mkdocs-material theme.
Project description
mkdocs-material-relative-language-selector
Edit the builtin mkdocs-material site selector to make the links between languages relative.
- If you have in Github Pages the URL
https://foo.github.io/bar/es/config/
, you can access it from the URLhttps://foo.github.io/bar/config/
selecting Spanish in the language selector. - The current language being displayed will be removed from the language selector, so you will only capable to access to other languages than the current.
Installation
pip install mkdocs-material-relative-language-selector
Example configuration
With mkdocs-mdpo-plugin
theme:
name: material
language: en
plugins:
- search
- material-relative-language-selector
- mdpo
extra:
alternate:
- name: English
lang: en
- name: Español
link: es
lang: es
Configuration
- If you want to publish your site in Github Pages, you don't need to define any setting because is the default configuration.
- If you want to serve your site
under a custom root domain, define
root_domain: true
to get correct links between languages.
Projects using it
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkdocs_material_relative_language_selector-1.1.4.tar.gz
.
File metadata
- Download URL: mkdocs_material_relative_language_selector-1.1.4.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e678272b2aa587f39c6d0c11b9be19e1f5959714582e78a150bfda4f6c1dc69 |
|
MD5 | 52f7675c48d0c834ab52aeb9ffd86f4b |
|
BLAKE2b-256 | 00374815d55adc55f5ccb80f8fcf0eeef27ada2e0f1aa91d0a1709d6026c3184 |
File details
Details for the file mkdocs_material_relative_language_selector-1.1.4-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_material_relative_language_selector-1.1.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c17e6b655e87a05aea8d6a994a0b019dafe4a95f8674c6d2ffceaba0f1967a |
|
MD5 | 4a1d6d471fbf4f7ff550ef299c00f433 |
|
BLAKE2b-256 | 56310460ed7e2914b477b71c3621e62fa7da7415b60eb4ff382a6f4a361a42f7 |