Processed html page:
<html>
<body>
<div>
<p>Some content originating from a markdown file.</p>
</div>
<div>
<p>Some content originating from another markdown file.</p>
</div>
</body>
</html>
Here is what I've tried so far...
(Note: I've excluded my base.njk (html doctype shell) for readability.)
Directory Structure
src/
/_includes
base.njk
_layout-A.njk
_layout-B.njk
main-layout.njk
content-1.md
content-2.md
main-layout.njk
{% extends "base.njk" %}
{% block content %}
{% include '_layout-A.njk' %}
{% include '_layout-B.njk' %}
{% endblock %}
content-1.md
---
layout: _layout-A.njk
---
Some content.
_layout-A.njk
<div>{{ content | safe }}</div>
content-2.md
---
layout: _layout-B.njk
---
Some more content.
_layout-B.njk
<div>{{ content | safe }}</div>
dist/
/content-1
index.html
/content-2
index.html
/main-layout
index.html
main-layout/index.html
<html>
<body>
<div></div>
<div></div>
</body>
</html>
I'm at a loss for how the files are processed and what I can do to do what I set out to.
That's not how 11ty works. Each MD file is a single page.
If you want to include multiple MD files to page, you should add custom filter for 11ty, to render it to html.
See examples in this issue https://github.com/11ty/eleventy/issues/658