1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] pelican: How to embed html and javascript in markdown

Discussão em 'Python' iniciado por Stack, Setembro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I want to embed a few html elements and javascript in a blog post. This is my markdown file.

    Title: Foo
    Tags: Bar

    Some Content here

    <div id="foo">
    </div>

    <script type="text/javascript" src="static/js/bar.js"> </script>


    But pelican is wrapping the html tags in a pre. So the code is not getting executed.

    I'm using the Markdown library installed from pip install Markdown, version 2.3.1

    I checked the docs, but to no avail.

    How to avoid this from happening, either through markdown or in a pelican setting?

    Continue reading...

Compartilhe esta Página