Hello all!
I’m using WindiCSS in my Hugo project. The primary reason for choosing it was the Attributify mode. So I could add a margin to top like: <div w:m = "t-5">
. I migrated my entire project from Tailwind yesterday and then I realised I missed one thing. I totally forgot about my Markdown content. At first, it appeared not to be too much of an issue, but I soon ran into the following problem:
## Heading
{w:snap = "mt-5" w:text = "2xl"}
Text
{w:m = "t-2.5"}
In this, the heading is getting the attributes I’m trying to set. So it is rendered correctly. However, the <p>
tag is rendered without the attribute. I checked further and the following works:
Text
{.mt-2.5}
Text
{class = "mt-2.5"}
Text
{title = "some text"}
Basically, I’m able to set class with .class
, class = ""
and even the title
attribute is working. However, the custom attribute doesn’t work.
Even the following doesn’t work:
Text
{class = "mt-2.5" w:m = "t-2.5"}
In this case, only the class is added, the custom attribute is still ignored.
So is there a limitation which allows only class, ID and title to be set (I could only see those being used in examples all around)?
EDIT:
I have the following in my config.toml
:
[markup.goldmark.parser.attribute]
block = true
And here’s a test repo:
Run npm i && npm run dev
.