Start by making the vegan pastry cream as it needs to chill for at least 4 hours. It can be made a day in advance. To make the cakes, preheat the oven to 180℃/160℃ fan/350℉/gas mark 4. Line two 20 cm/8 in round cake tins with baking paper.
Whisk together the flour, cornflour, baking powder and soda, salt and sugar in a large bowl.
Whisk together the milk, vinegar, yogurt, oil, melted butter and vanilla extract in a jug.
Pour the wet ingredients into the dry and stir with a balloon whisk until no dry lumps remain.
Divide the mixture evenly between the prepared cake tins and spread it level. Bake for about 30 minutes until a skewer inserted into the centre comes out clean.
Leave the cakes to cool in the tins for 10 minutes then carefully turn them out onto a wire rack and leave to cool completely.
To make the ganche, place the chopped chocolate in a heatproof bowl. Heat the coconut milk or cream until almost boiling then pour it over the chocolate. Leave to sit for 5 minutes then stir until smooth and melted.
Set the ganache aside to cool and firm up slightly. You don't want it to be runny but it shouldn't be too set either so keep an eye on it; you are looking for a soft but spoonable and spreadable consistency.
Meanwhile, trim the tops of the cooled cakes to level them.
Place one cake layer on a serving plate. Give the chilled pastry cream a good whisk until it becomes smooth and creamy then spread it over the cake, do not go all the way to the edges as it will squish out when you add the second cake layer.
Place the second cake layer on top and press it down very slightly. Place the cake in the fridge until the ganache is ready.
Once the ganche has thickened a little but is still soft, spoon it on top of the cake and use a palette knife or the back of a spoon to spread it towards the edges. Keep the cake refrigerated until ready to serve.