1. In a medium bowl, whisk together flour, sugar, baking powder, salt, and cinnamon.
2. In a food processor fitted with the S blade, pulse the hazelnuts with 1/4 cup of the flour mixture until they’re finely ground.
3. Add the remaining flour mixture and process to combine. Add butter or margarine and pulse until the mixture resembles coarse crumbs. Add the egg yolks and vanilla and pulse until the dough just comes together.
4. Form the dough into two discs. Wrap in plastic and refrigerate for 30 minutes.