Hexo theme development invocation problem?

add a parameter top_img

to the front-matter of markdown

clipboard.png

how do I call top_img in the theme code?
I use page.top_img to call the corresponding URL does not work. Who can help

Jun.17,2022

there may be a way.

but at present, all the variables in page are defined by the author of hexo. You can console.log (page) to look at a large number of variables. There are no custom variables.

then, I still recommend using markdown to solve the problem of text.

at the beginning:

! [top_img] (https://jerryc.me/posts/xxx.png)

if you need a special style or plug-in, embed HTML directly,

the rest of the actions and styles are defined in the theme.

Manual dog head

Menu