I'm trying to figure out how to inject custom blog post frontmatter into the HTML #6957
Answered
by
alexvoss
divSelector
asked this question in
Q&A
-
I have this in the frontmatter of my post divchan_board: main
divchan_thread: 0x000860
divchan_post: 0x000001 I have this in <!-- Values Passed From Blog Post Frontmatter to JS -->
<input type="hidden" id="divchan-board" value="{{ page.divchan_board }}">
<input type="hidden" id="divchan-thread" value="{{ page.divchan_thread }}">
<input type="hidden" id="divchan-post" value="{{ page.divchan_post }}"> It's successfully putting the input elements into the blog posts, but the values are empty. I'm not sure if there is a way to go about this or if I need to write some kind of plugin. If someone could point me in the right direction I can figure it out. |
Beta Was this translation helpful? Give feedback.
Answered by
alexvoss
Mar 23, 2024
Replies: 1 comment 1 reply
-
Try adding <input type="hidden" id="divchan-board" value="{{ page.meta.divchan_board }}"> |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
divSelector
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try adding
.meta
into the variable reference, as in: