How do you make homemade cheese and onion pie?

Ingredients:

For the pastry:

* 225g plain flour

* 110g cold butter, cubed

* 1 egg yolk

* 1 tbsp cold water

For the filling:

* 2 onions, thinly sliced

* 1 tbsp olive oil

* 100g cheddar cheese, grated

* 3 beaten eggs

* 150ml milk

* Salt and pepper, to taste

Instructions:

1. Make the pastry: Place the flour in a large bowl and add the butter. Rub the butter into the flour until it resembles breadcrumbs.

2. Add the egg yolk and cold water and mix until the dough comes together.

3. Wrap the dough in cling film and place it in the fridge for at least 30 minutes.

4. Preheat the oven to 200C/180C fan/gas 6.

5. Grease and flour a 23cm x 3cm pie dish.

6. Make the filling: Heat the olive oil in a frying pan and add the onions. Cook the onions until they are soft and golden brown.

7. Remove the pan from the heat and add the cheese, eggs, milk, salt, and pepper. Stir well to combine.

8. Roll out the pastry on a lightly floured surface to about 3mm thick. Line the pie dish with the pastry.

9. Pour the filling into the pie dish.

10. Bake the pie in the preheated oven for 30-35 minutes, or until the pastry is golden brown and the filling is set.

11. Serve the pie hot or cold with your favorite sides.