chrisrhymes/bulma-clean-theme

Include file "image-modal.html" does not render properly

rezrov opened this issue · 1 comments

The include "image-modal.html" doesn't render properly when used in a markdown file. In my markdown I have:

{% include image-modal.html 
  ratio="is-16by9" 
  link="/assets/images/tracing.png" 
  alt="Example image" 
  large_link="/assets/images/tracing.png" 
%}

The page is rendered without any errors, but the resulting HTML looks like this:

<div x-data="{ open: false }">
    &lt;a @click="open = true" title="View large image"&gt;
        <figure class="image is-16by9">
            <img src="http://localhost:4000/assets/images/tracing.png" alt="Example image">
        </figure>
    &lt;/a&gt;
    &lt;div class="modal" :class="{ 'is-active': open }"&gt;
        &lt;div class="modal-background" @click="open = false"&gt;</div>

Thus the web page is a mix of actual HTML and page text that contains some of the HTML. It seems like the presence of "@click" is causing some lines from the include file to be escaped with "&lt;" and "&gt;", breaking the rendering.

Hi, v0.13.1 has a fix for this issue. Thanks for using the theme!