I'm looking for a way to transform, at build time, links between pages of my 11ty site.
Here is my scenario:
I have pageA.md and pageB.md.
In pageA.md I have a link to pageB.md, like [learn more on page B](/pageB) or, with this plugin, I would have {% link_to "page B" %}.
What I'm looking for is a way to transform this link so it includes more than just the text I provide in the markdown link tagging.
For example, I would want be able to generate some custom HTML code like:
<a href="/pageB">
<span class="title">The title of the pageB page</span>
<span class="body">The first few characters of the pageB page content</span>
<img src="/img/the-first-image-found-in-pageB.png">
</a>
For context: https://mamot.fr/@nhoizey/111449404487082982
I'm looking for a way to transform, at build time, links between pages of my 11ty site.
Here is my scenario:
pageA.md
andpageB.md
.pageA.md
I have a link topageB.md
, like[learn more on page B](/pageB)
or, with this plugin, I would have{% link_to "page B" %}
.What I'm looking for is a way to transform this link so it includes more than just the text I provide in the markdown link tagging. For example, I would want be able to generate some custom HTML code like: