Steps
1. Preheat the oven to 200°C (400°F).
2. Heat olive oil in a pan over medium heat. Add the sliced onions and a pinch of salt. Cook slowly, stirring occasionally, until onions are golden and caramelized, about 15 minutes.
3. Stir in balsamic vinegar and thyme leaves; cook for an additional 2 minutes. Remove from heat.
4. Roll out the puff pastry on a baking sheet lined with parchment paper.
5. Score a 1-inch border around the edge of the pastry with a knife.
6. Spread the caramelized onions evenly within the border.
7. Crumble goat cheese over the onions.
8. Beat the egg and brush the pastry border with the egg wash.
9. Bake in the oven for 20-25 minutes or until the pastry is golden and puffed.
10. Remove from oven, let cool slightly, then slice and serve warm.