# Including one md file into another

**URL:** <https://discourse.gohugo.io/t/including-one-md-file-into-another/17891>\
**Category:** support\
**Created:** [April 2, 2019, 12:41am UTC](https://discourse.gohugo.io/t/including-one-md-file-into-another/17891 "2019-04-02T00:41:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawsys](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pawsys/32/7949_2.png) [@pawsys](https://discourse.gohugo.io/u/pawsys)\
**Post date:** [April 2, 2019, 12:41am UTC](https://discourse.gohugo.io/t/including-one-md-file-into-another/17891/1 "2019-04-02T00:41:18Z")

</div>

Let’s say I am creating a new markdown file. I have two paragraphs. I would like to embed an already existing md file in between two paragraphs. I would also want to render the embedded file with a custom Content View Template.

I would be grateful if anybody could explain how to do it.

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [April 2, 2019, 1:05am UTC](https://discourse.gohugo.io/t/including-one-md-file-into-another/17891/2 "2019-04-02T01:05:50Z")

</div>

> [@pawsys](#):
>
> I would like to embed an already existing md file in between two paragraphs.

This can be done by using a shortcode and then grabbing the other markdown file as a page resource.

> [@pawsys](#):
>
> I would also want to render the embedded file with a custom Content View Template.

I don’t know how to do this. Maybe others can help you there.

---

<div class="post-metadata">

**Author:** ![pawsys](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pawsys/32/7949_2.png) [@pawsys](https://discourse.gohugo.io/u/pawsys)\
**Post date:** [April 2, 2019, 1:09am UTC](https://discourse.gohugo.io/t/including-one-md-file-into-another/17891/3 "2019-04-02T01:09:17Z")

</div>

thanks.

I know how to render through pages, but how to grab a specific md file?

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [April 2, 2019, 1:26am UTC](https://discourse.gohugo.io/t/including-one-md-file-into-another/17891/4 "2019-04-02T01:26:51Z")

</div>

You can use

```
{{ .Page.Resources.GetMatch "*your-page*" }}

```

Also see the docs on Page Resources [https://gohugo.io/content-management/page-resources/#methods](https://gohugo.io/content-management/page-resources/#methods)
