Heat oven to 220C/fan 200C/gas 7. Cut the pastry into 4 rectangles and place on a baking sheet. Mark a border 1cm in from the edge of the pastry with a sharp knife. Spoon the onions into the middle, smooth then top with the cheese and thyme. Drizzle with oil and bake for 15-20 mins, until the cheese has melted and the pastry has risen and is golden brown.
For the onions: Makes 600g, which is 3 batches. Prep time 5 mins, cook time 30 mins. Melt the butter in a large, deep frying pan and stir through the onions. Cover with a lid and cook gently for about 10 mins, until softened. Remove lid, add
sugar, then cook 15-20 mins, stirring, until all of the liquid has evaporated and onions have turned golden. Divide into 3 batches to make the recipes, right. Will keep in the fridge for up to 5 days, or freeze for up to 1 month.