Differentes routes

Hello, I’m new to Jekyll.
I managed to create a statistic site for an exhibition with different exhibitors.

My next step is to create routes.

For example, I would like to create a “Fruit” route that only goes through exhibitors who sell fruit. A “Vegetables” route which only goes through the exhibitors who sell vegetables.
Obviously, some exhibitors sell fruits and vegetables. They must therefore be in the 2 courses.

My main problem is that when I find myself at an exhibitor, I no longer know which route I am on. I cannot transmit the information.

Wouldn’t it be possible to use a generator (Ruby) to create the pages:

Fruits
stand 1
stand 25
stand 2

Vegetables
stand 4
stand 1 (the same as in fruit!)

etc

thank you for your reply

Raoul Oppliger

Have a look at a data files and collections in Jekyll docs.

I see you have the same content which you want to appear as two output files. A generator would work
You could store your content as a collection or a single data YAML file. Then iterate over twice. Once to output fruit and once to output veg

As an alternate approach

Store your data as exhibitors. Not as a fruit or veg. File structure:

- _exhibitors/
   - a.md # fruit: true    in metadata 
   - b.md # veg: true
   - c.md # fruit: true.  veg: true

Then have a contents page for each category.

- fruits.md
- veg.md

Result after applying liquid for loop with filter. Use a bullet list with a link to each page. e.g. /exhibitors/a.html

Fruit exhibitors:

- A
- C

Repeat for a veg listing page.