-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Regression: Tabs are not shown properly #3330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
According to
|
Ok, digging deeper it seems that the missing This would make it much easier to fix such things without bisecting and then reading the commit histrory :). |
The breaking change was introduced in v8 which is a major release and it is prominently mentioned in the upgrade guide which contains step-by-step instructions. Any idea how we could improve this further? I’m happy to do so. |
Oh I completely missed that - probably because I did not expect it in "Getting started". I use the insiders version via git - as recommended here - this way I do not "intentionally" upgrade - I get the new version with every CI build. Therefore I would prefer if the build of the documentation would actually break instead of producing unintended output. I know that this is not always possible. In such a case I normally consult the release-page of the project first (https://github.com/squidfunk/mkdocs-material/releases) and seach dor breaking changes there. Maybe this is a giid Idea, to list them there. The details can still go in the actual documentation. In my own projects I use semantic-release these days, as it automates this process for me to a certain extend (see https://github.com/semantic-release/semantic-release/releases/tag/v18.0.0 for an example). This parses the commit messages for known markers to create the changelog with the necessary information. I don't know if this would be an option, as the default/insiders split would probably need some extra work here. |
Material for MkDocs and Insiders use semantic versioning, but not semantic release. I'm a huge fan and advocate of the former but not of the latter, because I don't like releases being triggered automatically. In general, you shouldn't deploy straight away to production always trusting that everything works, especially when a major release happens. Insiders is versioned exactly like Material for MkDocs with git tags, so it's probably best to check out a specific version and always manually double-check when doing upgrades. Note that both, Material for MkDocs and Insiders received a major version bump on the latest version.
Me too. Unfortunately, this is not possible from a theme perspective. The "runtimes" that the theme has is template rendering, i.e. Jinja, which doesn't allow for throwing errors or aborting, and the JavaScript runtime, which is too late. Furthermore, there's currently no possibility for specifying a schema for theme configuration, which would be a much better approach. This is a limitation which you could raise over at MkDocs. It could also be implemented as part of a plugin, but it's so essential that it would better be baked into MkDocs without the need for the user to provide a plugin explicitly. |
* chore(metrics): github page doc * chore(docs): fix local tab view (squidfunk/mkdocs-material#3330)
* mkdocs: add light/dark mode toggle * use var for header colour * update mkdocs config to fix code blocks rendering fix issue squidfunk/mkdocs-material#3330 (comment) https://squidfunk.github.io/mkdocs-material/upgrade/#pymdownxtabbed * formatting
Contribution guidelines
I've found a bug and checked that ...
mkdocs
orreadthedocs
themescustom_dir
,extra_javascript
andextra_css
Description
Tabs within the bage content suddenly does not render correctly anymore. Iget this in the javascript console:
I made a minimal reporducer:
index.md:
mkdocs.yml:
Output:

environment:
Python 3.9.9
requirements.txt:
Expected behaviour
The tabs should render correctly.
Actual behaviour
The tabs are not shown and an error occures in the js console.
When this happens other functionality (like the theme switch) is also affected and does not work anymore.
Steps to reproduce
mkdocs serve
Package versions
3.9.9
1.2.3
mkdocs-material-insiders.git@4b6b0232c27532f00eb9af50d6b8db5d9ce08592
Configuration
System information
The text was updated successfully, but these errors were encountered: