Closed nidem closed 1 month ago
@nidem you are going to need to provide details of exactly what you are doing. You are making a claim that using those configurations do not work, but it does work as my documentation is built with it and it uses both details and admonitions with custom types: https://facelessuser.github.io/pymdown-extensions/extensions/blocks/.
Please provide a minimal, reproducible example. The steps you listed are not enough because my project is already doing that and works fine. Most likely this is a user error, but since you aren't providing me a failing example, I can only guess what you might have done wrong.
To be clear, please provide me a minimal, failing example, contained in zip, that way I can see exactly what you are doing.
File is here: test-adding-types.tgz
Also, here is the output of pip freeze
.
Babel==2.15.0
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
ghp-import==2.1.0
idna==3.7
Jinja2==3.1.4
Markdown==3.6
MarkupSafe==2.1.5
mergedeep==1.3.4
mkdocs==1.6.0
mkdocs-get-deps==0.2.0
mkdocs-material==9.5.29
mkdocs-material-extensions==1.3.1
packaging==24.1
paginate==0.5.6
pathspec==0.12.1
platformdirs==4.2.2
Pygments==2.18.0
pymdown-extensions==10.8.1
python-dateutil==2.9.0.post0
PyYAML==6.0.1
pyyaml_env_tag==0.1
regex==2024.5.15
requests==2.32.3
six==1.16.0
urllib3==2.2.2
watchdog==4.0.1
I left index.md
empty since it didn't matter because mkdocs would never run
$ mkdocs serve
ERROR - Config value 'markdown_extensions': Invalid Markdown Extensions configuration
Aborted with a configuration error!
Your indentation was wrong in your config. Here is the fixed config:
site_name: test
nav:
- Home: index.md
# works
#markdown_extensions:
# - pymdownx.blocks.admonition
# - pymdownx.blocks.details
# errors
markdown_extensions:
- pymdownx.blocks.admonition:
types:
- new
- settings
- note
- abstract
- info
- tip
- success
- question
- warning
- failure
- danger
- bug
- example
- quote
- pymdownx.blocks.details:
types:
- name: details-new
class: new
- name: details-settings
class: settings
- name: details-note
class: note
- name: details-abstract
class: abstract
- name: details-info
class: info
- name: details-tip
class: tip
- name: details-success
class: success
- name: details-question
class: question
- name: details-warning
class: warning
- name: details-failure
class: failure
- name: details-danger
class: danger
- name: details-bug
class: bug
- name: details-example
class: example
- name: details-quote
class: quote
I swear I did that too. My bad. Sorry for you taking up your time. Much appreciated! Tip/sponsorship incoming.
No worries, YAML can be a little confusing. You aren't the first to fall into this trap :).
Oh and thanks for the tip!
Description
I used the same syntax in https://github.com/facelessuser/pymdown-extensions/blob/main/mkdocs.yml#L175-L220 to add additional types to both admonition and details, but returns the error
Invalid Markdown Extensions configuration
.Minimal Reproduction
Version(s) & System Info