Steps
1. Preheat your oven to 400°F (200°C).
2. In a skillet, heat the olive oil over medium heat, add the sliced onions, and cook until they are soft and caramelized, about 15-20 minutes.
3. Roll out the puff pastry sheet on a baking tray lined with parchment paper.
4. Spread the caramelized onions evenly over the pastry, leaving a small border.
5. Sprinkle the crumbled goat cheese and thyme leaves on top, and season with salt and pepper.
6. Fold the edges of the pastry over slightly to create a border.
7. Beat the egg and brush it over the pastry edges for a golden finish.
8. Bake in the preheated oven for 20-25 minutes, or until the pastry is golden and puffed.
9. Allow to cool slightly before slicing and serving.