For the parmesan shortbreads, sift the flour into a bowl with the parmesan, salt, pepper and cayenne pepper. Grate the cold butter into the dry ingredients and rub together until the mixture resembles breadcrumbs.
Add the egg yolk and mix together to form a firm dough. Form into a ball, wrap with cling film and chill in the fridge for two hours.
Preheat the oven to 180C/355F/Gas 4.
Remove the dough from the fridge and roll out to a thickness of about 0.5cm/¼in on a floured work surface.
Using a star-shaped cutter, cut out 40 large (6cm/2½in diameter) or 60 small (4.5cm/2in diameter) shortbread stars, or a mixture of sizes. Place the shortbread stars onto a baking tray lined with greaseproof paper and bake in the oven for 10-12 minutes, until golden-brown. Remove from the oven and leave to cool. They'll keep in an airtight container for 3-4 days.
For the red onion marmalade, melt the butter in a small pan, add the red onions, thyme and red wine and cook over a very low heat for 20-30 minutes, or until the red wine has completely reduced, the onions have caramelised and the marmalade is thick and sticky. Leave to cool.
Meanwhile, for the creamed goats' cheese, place the goats' cheese into a food processor and blend with enough milk to form a smooth, thick paste. If you don't have a food processor, mix until smooth in a bowl.
To serve, spread or pipe a small amount of creamed goats' cheese onto each shortbread star. Top with a little red onion marmalade and serve at once.