I have a collection of items that outputs a unique page per item, and I want those items to each have unique preview images when you embed them in Twitter, Discord, etc. To that end, I have the following code in my default.html layout
<head> ... <meta property="og:image" content="" /> </head>
Then, in the layout file for the individual item, I have front matter like
--- layout: default preview: ---
And finally in item.md
itself, I have front matter like
--- icon: /assets/img/preview_img.png --- Item content goes here
The issue here is, the variables seem to get lost somewhere along the way. Specifically, in going from item.html
-> default.html
. I'm guessing this is a limitation with either collection pages or fluid in general, does anyone know a way around this?
没有评论:
发表评论