Skip to content

How to build Markdown content page with partial in between? #1927

Answered by pdehaan
j9t asked this question in Q&A
Discussion options

You must be logged in to vote

Wouldn't something like this work?

---
title: Homepage
twitter: pdehaan
email: [email protected]
website: https://twitter.com/pdehaan
---

# Heading Number One

Some paragraph text.

{% include "partials/websites.njk" %}

## Heading Number Two

1. ordered list bullet
1. more list items

> Block quote

Then you just need to set markdownTemplateEngine: "njk" in your .eleventy.js config file (which I see you're already doing; but more of a heads-up for future readers).

Seems to work for me locally (albeit with a very simple test case) and rendered out the following HTML:

<h1>Heading Number One</h1>
<p>Some paragraph text.</p>
<ul><li><a href="https://twitter.com/pdehaan">Website</a></li><li><a href

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@pdehaan
Comment options

pdehaan Aug 11, 2021
Collaborator

Answer selected by j9t
Comment options

You must be logged in to vote
2 replies
@pdehaan
Comment options

pdehaan Aug 11, 2021
Collaborator

@j9t
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants