Can I render two different rmakrdown into the same webpage?

content/
├─ index.md
├─ about.md
├─ bio/
│  ├─ _index.md
│  ├─ bio_a.md 
│  ├─ bio_b.md 
│  ├─ bio_c.md 

My list.html makes only an index of these pages, can I render them to be part of the same webpage, one above the other? What I have in mind is similar to the [Hugo Academic](https://academic-demo.netlify.app/) theme, where the home web page is consists of accomplishments experience etc…

Thx

2 Likes

Yes… but you should use ‘index.md’ (without underscore) and refer to these markdown files as resources. Look for more info about Page Resources here: Page Resources | Hugo

Hi, thx for your reply.
I struggled with this, and didn’t manage to use it.
Is anyone aware of any minimal example that might help me?

Hi there,

bio/_index.md is a list page. You can have a look here for examples of how to list child pages in a list page: Lists of Content in Hugo | Hugo

Hi thx for the reply,
All the examples in the link you gave me create a page with link/ summary of each page.
What I’m looking for is to render all the pages one under the other, without any link or “read more” option. I don’t even want to create a webpage for each of (sub)pages.

You need to modify the example so you get what you want.

This lists all the titles and content of the child pages under the list:

{{ range .Pages }}
{{ .Title }}
<br>
{{ .Content }}
<br>
{{ end }}

Of course you need to add your own html and styles so it looks exactly like the way you want it to look. If you don’t want to add a link then don’t add a link.

See doc: Build options | Hugo

Add this to the frontmatter of your _index.md:

# section build options:
_build:
  render: true
# children build options with cascade
cascade:
  _build:
    render: false
    list: true # default