chrisrhymes / bulma-clean-theme

A clean and modern Jekyll theme based on Bulma
http://www.csrhymes.com/bulma-clean-theme/
MIT License
387 stars 492 forks source link

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

Closed rezrov closed 2 years ago

rezrov commented 2 years ago

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 "\<" and "\>", breaking the rendering.

chrisrhymes commented 2 years ago

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