What's exactly wrong with this mkdocs.yml configuration?

1.3k Views Asked by At

I am working on a MkDocs project and trying to tweak the markdown_extensions setting. Please look at it and tell me what's wrong, since I really can't find the error. Note: I have installed the required libraries, so that isn't the problem.

  - markdown.extensions.codehilite:
    css_class: highlight
  - markdown.extensions.extra: {}
  - markdown.extensions.fenced_code: {}
  - markdown.extensions.md_in_html: {}
  - markdown.extensions.meta: {}
  - markdown.extensions.nl2br: {}
  - markdown.extensions.tables: {}
  - markdown.extensions.toc:
    title: 
  - pymdownx.emoji:
    title: long
  - pymdownx.tasklist: {}

By the way, I'm using the ponylang theme.

1

There are 1 best solutions below

3
On BEST ANSWER

Well, I'll start admiting the lack of details in the question. I supposed, apparently wrongly, that the problem is self-explanatory. Sorry about that.

Next, I found the solution. I simply should specify the extensions as key/value pairs instead of a list of elements. Now everything works fine.

markdown_extensions:
  markdown.extensions.codehilite:
    css_class: highlight
  markdown.extensions.def_list: {}
  markdown.extensions.extra: {}
  markdown.extensions.fenced_code: {}
  markdown.extensions.md_in_html: {}
  markdown.extensions.meta: {}
  markdown.extensions.nl2br: {}
  markdown.extensions.tables: {}
  markdown.extensions.toc:
    title: ""
  pymdownx.emoji:
    title: "long"
    emoji_index: !!python/name:materialx.emoji.twemoji
    emoji_generator: !!python/name:materialx.emoji.to_svg
  pymdownx.tasklist: {}