# Prevent Jekyll from processing Markdown files (which are supposed to be downloaded)

**URL:** <https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178>\
**Category:** Uncategorized\
**Created:** [November 16, 2017, 1:50pm UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178 "2017-11-16T13:50:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnoirel](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jnoirel](https://talk.jekyllrb.com/u/jnoirel)\
**Post date:** [November 16, 2017, 1:50pm UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/1 "2017-11-16T13:50:35Z")

</div>

I expected many people to have asked this question but after hours of looking for a solution, I haven’t found what I need.

I use my website to host lecture material and that includes Markdown files (R Markdown files to be more specific, extension ‘Rmd’). Annoyingly, I haven’t found any way to tell Jekyll not to process .Rmd files — since the YAML preamble is gobbled up in the process (to no purpose, whatsoever, needless to say).

Rmd files are to be processed by R then rendered anyway; for that reason, a fairly obvious solution would be to be able to tell Jekyll, ‘you know what, whenever you see an Rmd file, deal with it as you would have done with a PDF or DOC file, just copy it _as is_’.

(Obviously, the idea of including an empty YAML frontmatter on top of a YAML-containing Rmd file is pretty revolting 😉 )

Does that possibility exist? Because I haven’t found it.

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [November 16, 2017, 4:09pm UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/2 "2017-11-16T16:09:51Z")

</div>

If a file has the two lines of `---` Jekyll will process the file.  
If you want it to ignore Markdown files or any other file just omit those lines.

For example say I have `/lectures/lecture-1.md` and it has Markdown content in it. Jekyll will ignore it and place it in `_site/lectures/lecture.md` untouched.

---

<div class="post-metadata">

**Author:** ![jnoirel](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jnoirel](https://talk.jekyllrb.com/u/jnoirel)\
**Post date:** [November 19, 2017, 6:25pm UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/3 "2017-11-19T18:25:53Z")

</div>

Thanks for your reply.

The problem here is precisely that Rmd files do use YAML front matters themselves. So they look exactly like files that Jekyll would like to process.

---

<div class="post-metadata">

**Author:** ![chromatical](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chromatical/32/278_2.png) [@chromatical](https://talk.jekyllrb.com/u/chromatical)\
**Post date:** [November 20, 2017, 3:38am UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/4 "2017-11-20T03:38:48Z")

</div>

If the Rmd files are in their own folder, you could add it to the `exclude` list in `_config.yml`.

UPDATE: I entirely forgot to mention that you would then need a Gulp task or something similar to copy the files to your `_site` folder. Sorry for any confusion!

---

<div class="post-metadata">

**Author:** ![jnoirel](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jnoirel](https://talk.jekyllrb.com/u/jnoirel)\
**Post date:** [November 27, 2017, 10:17am UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/5 "2017-11-27T10:17:28Z")

</div>

Hi,

Thanks, I’ll read about this thanks. Yes, your update was useful! 🙂

---

<div class="post-metadata">

**Author:** ![iaw4](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/iaw4/32/5737_2.png) [@iaw4](https://talk.jekyllrb.com/u/iaw4)\
**Post date:** [August 22, 2019, 8:35pm UTC](https://talk.jekyllrb.com/t/prevent-jekyll-from-processing-markdown-files-which-are-supposed-to-be-downloaded/1178/6 "2019-08-22T20:35:10Z")

</div>

is there an easier way? like, e.g., a capitalized file extension that is ignored for markdown-\>html conversion??
