Content tabs are not working #7282
-
I've read the following document and wanted to add one Contents Tab for my site. I added the following item in mkdocs.yml: markdown_extensions:
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true Then I tired one Content tabs, its markdown code looks like below: === "C"
``` c
#include <stdio.h>
int main(void) {
printf("Hello world!\n");
return 0;
}
```
=== "C++"
``` c++
#include <iostream>
int main(void) {
std::cout << "Hello world!" << std::endl;
return 0;
}
``` Which is nothing but an example from the above document. But the actual result I get is this: === "C"
=== "C++"
It looks like the plugin isn't working, but I'm not sure why. The documentation seems to only require adding the above field to mkdock.yml to enable this feature. Am I missing something? The version of mkdocs and mkdocs-material are 1.5.3 and 9.5.15. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Not sure what the problem is without a screenshot. Have you tried the latest version 9.5.27? Note sure if anything related to this has changed recently but it is always a good idea to take the opportunity to upgrade. You could also help us investigate the problem by creating a minimal reproduction. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your suggestion. When I updated the version and tried to reproduce the problem, I found that the Contents Tab function can be used normally. I think there are some problems with my previous environment. |
Beta Was this translation helpful? Give feedback.
Not sure what the problem is without a screenshot. Have you tried the latest version 9.5.27? Note sure if anything related to this has changed recently but it is always a good idea to take the opportunity to upgrade.
You could also help us investigate the problem by creating a minimal reproduction.