Preheat the oven to gas 4, 180°C, fan 160°C. Grease and line a 20cm square cake tin with nonstick baking paper.
Beat the butter and sugar together in a large bowl, until soft and pale. Add the eggs one at a time, along with 1 tbsp flour per egg, beating well between each addition. Fold in the remaining flour and the baking powder. Stir through the lemon zest and juice, thyme leaves, almonds and yogurt. Pour the mixture into the lined tin and bake in the oven for 60-75 mins, until a skewer inserted into the cake comes out clean. Remove from the oven and leave to cool in the tin on a wire rack for 10 minutes.
Meanwhile, make the compote. Put all the ingredients, except the cornflour, into a pan. Bring to a gentle simmer, partly covered, and cook for 4 mins. Mix a little water with the cornflour, then whisk into the compote, and continue to cook for 2 mins. Remove from the heat and leave to cool.
Poke holes into the cake while it’s still warm and in the tin, using the handle of a wooden spoon to go three-quarters of the way down into the sponge. Pour two-thirds of the compote over the top, making sure it goes into all the holes. Cool in the tin for a further 1 hr, then remove and allow to cool completely.
Meanwhile, make the icing. Beat the butter until softened, then add in the icing sugar and whisk until smooth and thick. Stir in the maple syrup. Spread over the top of the cake and decorate with the remaining compote.