zola icon indicating copy to clipboard operation
zola copied to clipboard

Inconsistent shortcode rendering

Open bemyak opened this issue 1 year ago • 2 comments

Bug Report

Environment

Zola version: 0.16.0, next OS: Linux

Expected Behavior

Shortcodes should render the same way each invocation

Current Behavior

The youtube shortcode in the attached website produces different results from build to build. Sometimes it renders correctly into:

<figure class="image is-16by9">
    <iframe class="has-ratio" frameborder="0" allowfullscreen width="100%"
        src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ"></iframe>
</figure>

<div class="comment">
    <em><p>test</p>
</em>
</div>

Sometimes it's just

<div >
    <iframe src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

Step to reproduce

Unzip the archive, and run zola build && cat public/post/index.html around 5-10 times. Observe that the output is slightly different.

bemyak avatar Jul 31 '22 14:07 bemyak

@Keats, any tips here? I'm not sure how to debug this, it looks like a concurrency issue :shrug:

bemyak avatar Aug 04 '22 05:08 bemyak

Looks like it's somehow conflicting with the built-in youtube shortcode and rendering that one instead, which is weird as it should have been replaced by the custom one.

Keats avatar Aug 04 '22 06:08 Keats