Skip to main content

Relative access between translations using mkdocs-material theme.

Project description

mkdocs-material-relative-language-selector

PyPI version

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 URL https://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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mkdocs_material_relative_language_selector-1.1.0.tar.gz.

File metadata

  • Download URL: mkdocs_material_relative_language_selector-1.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for mkdocs_material_relative_language_selector-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ef52d55a6f169ff08c0cacc777191bb718d332648b352ccab03378a68b247583
MD5 d72efaaa9f2b80e75d18b922499cdc17
BLAKE2b-256 87d825b7aa8bb0313bfdfcf1ff1cb2efabb5ae3d13f49abf7552fe6b291c7215

See more details on using hashes here.

File details

Details for the file mkdocs_material_relative_language_selector-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_material_relative_language_selector-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3339981018eb87a943afbf26cf101e19bfe3bf8a20879c420544bee6a6ddfe2
MD5 059a2cba0e2d754a3c7f85f802e708fd
BLAKE2b-256 04f2bdeb3f3b4af03695cc2051aac69d710aefb86420235a8e9368dd2ceb55a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page