I want to display the other pages with the same category as the current page. I added this code in blog_item.html.twig which displays all the pages right now :
<ul class="liste-articles">
{% for p in page.parent.children if p != page %}
<li>
<a href="{{ p.url }}">{{ p.title }}</a>
</li>
{% endfor %}
</ul>
What you described is searching via taxonomies. What you really wanted to do: get all the siblings (what you meant with cartegory is a folder) of the actual page on the same level.
Thank you for your help but I don’t think I have been clear enough, sorry I’m French and I have trouble expressing myself correctly in English.
Simply put: All my articles are subpages of the home page that display them. At the end of each subpage, I want to display the other articles that have the same category as the current subpage. Currently, all subpages are displayed at the end of each article.
I hope I have been clear and thank you in advance for your help.