Open MasonRemaley opened 1 week ago
According to the docs you can use:
<ctx alt="$page.alternative('rss')">
<a href="$ctx.alt.link()"
type="$ctx.alt.type"
text="$ctx.alt.name"
></a>
</ctx>
(but it doesn't currently work for me 😅)
Edit: sorry, I totally missed that you were using SuperMD instead of SuperHTML.
After a discussion on Discord here's what worked for me now:
<ctx :loop="$page.alternatives">
<ctx :if="$loop.it.name.eql('rss')">
<a href="$loop.it.output" type="$loop.it.type">RSS</a>
</ctx>
</ctx>
.alternatives = [{
.name = "rss",
.type = "application/rss+xml",
.layout = "blog.xml",
.output = "index.xml",
}],
I tried to create a link to the RSS feed of a devlog on that devlog via this smd:
But I got this output:
I'm guessing some logic just needs to be added to the path checker to handle this case (but if there's just some other syntax I'm missing let me know!)
For anyone who finds this issue looking for a workaround, you can bypass the validation when needed by making the link with embedded HTML: