Access a template's content/markup with the relevant template data file? #2659
Unanswered
kachunchau
asked this question in
Q&A
Replies: 1 comment
-
|
You could potentially use a custom transform and parse the final HTML using something like cheerio. Or else a paired shortcode if you can edit the HTML. Something like… {% article %}
<h1>Hello</h1>
<code>Some code</code>
<p>World</p>
{% endarticle %}
<aside>
<p>Content</p>
</aside>Where the custom |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, sorry if this is a silly question. I have a standard template file eg:
example.htmland in it I have someHTMLmarkup, the content is kinda like:Is there a way to access the
articlecontent/markup, run a function and then return it in the template data fileexample.11tydata.jswith something like this?Beta Was this translation helpful? Give feedback.
All reactions