mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Version selector is not displayed correctly after enabling showing version alias

Open raymond-u opened this issue 1 year ago • 3 comments

Context

No response

Bug description

After upgrading to the latest version and enabling showing version alias, the version selector starts to displays some extra character.

Before:

image

Now:

image

Related part of mkdocs.yaml:

extra:
  version:
    provider: mike
    alias: true
    default:
      - nightly
      - stable

The command I use in GitHub Actions to deploy docs:

# Docs for nightly version
poetry run mike deploy --push nightly

# Docs for stable version
poetry run mike deploy --push --update-aliases ${{ steps.docs_version.outputs.docs_version }} stable
poetry run mike set-default --push stable

Related links

Reproduction

N/A

Steps to reproduce

N/A

Browser

Chrome

Before submitting

raymond-u avatar May 16 '24 04:05 raymond-u

Thanks for reporting. Unfortunately, without a minimal reproduction, it's unclear what is causing the problem. If you could at least share your versions.json that is built by mike, it would be a start.

squidfunk avatar May 16 '24 05:05 squidfunk

Apologies. Here is my version.json:

[
  {
    "version": "nightly",
    "title": "nightly",
    "aliases": []
  },
  {
    "version": "0.4",
    "title": "0.4",
    "aliases": [
      "stable"
    ]
  },
  {
    "version": "0.3",
    "title": "0.3",
    "aliases": []
  },
  {
    "version": "0.2",
    "title": "0.2",
    "aliases": []
  },
  {
    "version": "0.1",
    "title": "0.1",
    "aliases": []
  }
]

raymond-u avatar May 16 '24 06:05 raymond-u

Thanks! Fixed in 407335d20.

squidfunk avatar May 16 '24 09:05 squidfunk

Released as part of 9.5.24.

squidfunk avatar May 20 '24 11:05 squidfunk