Preheat the oven to 200°C.
Blend ground almonds, butter, and sugar in a bowl.
Beat in the whole egg and vanilla, then chill for 3 minutes.
Roll pastry on a floured surface to a 30cm square.
Drape pastry over a floured roasting tray so edges overhang.
Spread jam in the centre, leaving a 5cm border.
Layer the chilled almond mixture over the jam.
Fold pastry edges over the filling, leaving the centre visible.
Brush pastry with milk and yolk mix, then top with sugar and almonds.
Bake at 200°C for 25-30 minutes until golden.
Lower heat to 160°C and bake for 10 more minutes.
Cool slightly before serving.