简体   繁体   中英

Jekyll: How to template to get <header> tags in markdown

Currently I have a page which I've templated such that the header and footer are all sorted and I just need to do my actual content. In my content section I have:

<header> **subsection title** </header>
<section **content ** <section>
<header> **subsection 2 title** </header>
<section **content 2 ** <section>

I ideally want my pages to be written in markdown but I make the page

<header> **subsection title** </header>
<section **content markdown ** <section>

Jekyll then fails to process this correctly.

What is the correct way of constructing a page with multiple tags which each require variables in Jekyll?

My assumption would be I could redefine <h2> tags somehow so that they produce a <header> tag instead but that seems like overkill. My other assumption would be to wrap the <section> content in a special tag to force it to be read as markdown? Again that seems a bit of an odd way to do it.

Any advice welcome!

Your problem could be that you are using two header tags. Try using a different tag for the second header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM