# Ignore md file if html file already exists?

**URL:** <https://talk.jekyllrb.com/t/ignore-md-file-if-html-file-already-exists/9592>\
**Category:** Help\
**Created:** [December 16, 2024, 10:45pm UTC](https://talk.jekyllrb.com/t/ignore-md-file-if-html-file-already-exists/9592 "2024-12-16T22:45:23Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [December 16, 2024, 10:45pm UTC](https://talk.jekyllrb.com/t/ignore-md-file-if-html-file-already-exists/9592/1 "2024-12-16T22:45:23Z")

</div>

Can I tell jekyll to ignore the `.md` file if the `.html` file already exists? That is, html \>\> md ? (I would still like the user to be able to download my md file, just as if it was an ordinary md file and had nothing to do with jekyll, so I don’t want to remove it altogether.) Right now, I am getting unpleasant warnings:

```auto
          Conflict: The following destination is shared by multiple files.
                    The written file may end up with unexpected contents.
                    /var/www/2022.html
                     - 2022.md
                     - 2022.html

```

---

<div class="post-metadata">

**Author:** ![chuckhoupt](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/chuckhoupt/32/523_2.png) [@chuckhoupt](https://talk.jekyllrb.com/u/chuckhoupt)\
**Post date:** [December 17, 2024, 4:17am UTC](https://talk.jekyllrb.com/t/ignore-md-file-if-html-file-already-exists/9592/2 "2024-12-17T04:17:06Z")

</div>

I gather the `2022.md` file has YAML front-matter? That triggers Jekyll to process it through Liquid and render the Markdown to `2022.html` (which conflicts with the existing `2022.html`). If you removed/disabled the YAML front-matter, then `2022.md` would just be copied as-is to the destination, and there would be no conflict with `2022.html`.

If you’re using Github-Pages, then you might need to configure/disable the [optional-front-matter plugin](https://github.com/benbalter/jekyll-optional-front-matter) since that changes how `.md` files are handled.

---

<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:** [December 18, 2024, 12:39am UTC](https://talk.jekyllrb.com/t/ignore-md-file-if-html-file-already-exists/9592/3 "2024-12-18T00:39:41Z")

</div>

thank you. my problem is that these .md files need some yaml, because they will have to go into pandoc, too. your pointer is very helpful in telling me that it is _not_ a standard feature that I have overlooked.

maybe I need to learn ruby and patch a line somewhere…grrr…

regards,

/iaw
