Identical file names are causing problems

Hi,
I am new to jekyll, I tried to google the topic, but I was unable to find an answer. Sorry if I happen to ask stupid question.

I am using fresh jekyll on Windows, run via ubuntu shell. The problem I am experiencing is with files with identical names. That is generated html files mix up data from different sources.

In my _config file I provide source dir:

include: [“_pages”]

In there I have two files with same name in different directories _pages/a/index.md and _pages/b/index.md. Those source files both use same layout. Result of a build are files _site/_pages/a/index.html and _site/_pages/b/index.html. Both of the html files use proper config from between the — (like title:). But the problem is with the {{content}}. Both of generated files use content block from _pages/a/index.md. Why does it happen? How can I fix it?

I am not sure which part of source code should I show, because I am not sure where the problem might be (or maybe everything works as designed). But in short, my layout page looks like:

<!DOCTYPE html>
  <head>
  {% include head.html %}
  </head>
  <body>  
	<article>
            {{ content }}
	</article>
  </body>
</html>

and source files like:

---
title: title
description: desc
layout: main
---
<main>
[a or b]
</main>

Thank you for your help.

do you have a link to your repo?

While preparing the repo, I’ve found the problem. It seems it might not be really file name related. The problem seems to be caused by identical path: variable in those files. For me having identical paths made sense (given each of the subdirectories supposed to be under different domain). Still, making content of those files mixed up without any warning was very confusing.