Add all ingredients beside the jam into a bowl of a kitchen aid with the paddle attachment and mix on low until it forms a crumbly mixture.
Add the eggs and mix on low till a uniformed dough forms.
Preheat the oven to 200C.
If not using jam, put all the dough into a buttered mold(about 24cm in diameter) and using a spatula or spoon, spread the dough to a nice even layer.
If using jam, then add half of the dough to the buttered mold and spread evenly to a nice flat layer. Add the jam, and spread to about 1 cm away from the edge. Roll the other half of the dough on a lightly floured surface or between 2 pieces of parchment paper, then place on top of the jam and use a spatula to even out the dough to make it reach the edge of the mold in a nice even and flat layer.
Beat the egg yolk with a little bit of salt(the salt breaks up the egg to make it homogenous and not grainy) and brush on the surface of the dough.
Use the back of a fork to indent the dough in a crossed pattern.
Bake for 20 minutes at 200C then lower to 180C for a further 20-22 minutes.
Place foil under your mold in the oven in case butter leaks, or else it will smoke the oven.
