Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rezrov opened this issue Mar 1, 2022 · 1 comment · Fixed by #120
Closed

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

rezrov opened this issue Mar 1, 2022 · 1 comment · Fixed by #120

Comments

@rezrov
Copy link
Contributor

rezrov commented Mar 1, 2022

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.

@chrisrhymes
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants