01 - Preheat the oven to 400°F. Line a baking sheet with parchment paper to prevent sticking and ensure easy cleanup.
02 - Melt butter with olive oil in a large skillet over medium-low heat. Add sliced onions, salt, and sugar. Cook slowly for 25–30 minutes, stirring frequently, until onions turn deep golden brown and develop a rich, sweet flavor. Add thyme and black pepper during the final 5 minutes of cooking.
03 - While onions caramelize, unroll the puff pastry and cut into 6 equal rectangles. Transfer to the prepared baking sheet. Using a sharp knife, score a 1/2-inch border around each rectangle, being careful not to cut completely through the dough. This creates a raised edge when baked.
04 - Brush the scored borders of each pastry rectangle with beaten egg using a pastry brush. This promotes even browning and creates a glossy, golden finish.
05 - Distribute the caramelized onions evenly within the scored borders of each pastry rectangle. Top generously with crumbled goat cheese, ensuring the cheese covers the onion layer.
06 - Place the baking sheet in the preheated oven and bake for 15–18 minutes. The pastry should be puffed, golden brown, and crisp, while the cheese should be softened and slightly melted.
07 - Remove from the oven and immediately sprinkle with finely chopped fresh chives or parsley if desired. Serve warm for the best flavor experience, or allow to cool to room temperature for a more structured appetizer.