Skip to content

Markdown in HTML blocks does not render after deployment (local normal) #8353

Answered by kamilkrzyskow
pyheight asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pyheight,

When testing with local mkdocs serve, Markdown rendering in HTML blocks works fine:

Interesting, could you show the results of these commands? Maybe you have some special behaviour. Screenshots look like Windows 7, but I guess it's only a theme, right? 👀

python --version
pip freeze

As for the fix, when you mix md_in_html you have to add markdown attribute to every [block-level] HTML tag in the DOM tree chain.
Extension docs: https://python-markdown.github.io/extensions/md_in_html/#nesting
Example in the theme docs: https://squidfunk.github.io/mkdocs-material/reference/annotations/#in-everything-else

<center markdown>
  <span style="font-size:1.6em;color:#ff6b6b">:material-…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@facelessuser
Comment options

@kamilkrzyskow
Comment options

Answer selected by pyheight
Comment options

You must be logged in to vote
1 reply
@kamilkrzyskow
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants