Excluding *.md files withought preventing html files from being in their place

As far as I know jekyll exclude parameter in config is for preventing some files from build folder. I have some custom *.md files that i dont want in output. however when I exclude them, I also see no html file of my pages and posts in output. Very strange for me.

Any Idea?

can you give more info? why are they there if you don’t want them? how did you try to exclude them?

They are there for a reason. They contain some data and included to other md files.

I just don’t want them to be in the output (public folder).

I have excluded my files like this:

exclude:
  - "*.sh"
  - .jekyll-cache
  - "*.json"
  - "*.md"

The reason is because you’re using a wildcard to exclude all .md files.
To exclude only some .md files, list them explicitly or use a pattern to identify them properly:

exclude:
  - Gemfile
  - node_modules/
  - README.md
  - "downloads/**/*.md"