I am trying to use Pug to create an HTML template, but I am encountering an issue where my Pug file is not rendering in the browser. I have narrowed down the problem to the usage of a custom attribute (data-reveal=”bottom”) in my Pug file. When I include this attribute, the file fails to render.
Here is a snippet of my Pug code:
extends client-base
block content
main
article
//- NEWS
section.section.news(aria-label=”our latest news” id=”news”)
.container
p.section-subtitle(data-reveal=”bottom”) What’s On Our Mind
h2.h2.section-title(data-reveal=”bottom”)
| News And
When I remove the (data-reveal=”bottom”) attribute, the file renders correctly. But with the attribute included, the browser fails to display the content.
I am using the following tools and versions:
My Setup:
I am compiling Pug to HTML using Parcel Bundler. Here are the relevant versions:
Pug: “^3.0.3″,
Node.js: v20.9.0
parcel-bundler”: “^1.12.5”
Error Message:
There’s no error on either console
What I’ve Tried:
Ensured there are no syntax errors in the Pug file.
Verified that the Pug environment is correctly set up.
Tested with a minimal example without the attribute, which works fine.
Question:
Why does the (data-reveal=”bottom”) attribute block my Pug file from rendering, and how can I resolve this issue?
Udodirim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.