Ingredients

1/3 cup whole hazelnuts 

12 tablespoons unsalted butter, softened, plus more for pan 

1 3/4 cups unbleached all-purpose flour, plus more for pan 

1 1/4 cups sugar 

3/4 teaspoon baking powder 

1/2 teaspoon baking soda 

3/4 teaspoon kosher salt (we use Diamond Crystal) 

2 large eggs, room temperature 

3/4 cup plain full-fat yogurt (not Greek) 

1 teaspoon pure vanilla extract, or 1/4 teaspoon pure almond extract 

1 tablespoon natural or Dutch-process cocoa powder 

Preparation

Preheat oven to 350°F. Spread hazelnuts on a rimmed baking sheet and toast until fragrant and golden brown and skins are loosened. Rub nuts in a clean kitchen towel to remove skins, then coarsely chop.

Brush a 9-by-2-inch square cake pan with butter. Line with parchment, leaving a 2-inch overhang on two sides. Butter parchment, then dust with flour, tapping out excess. In a large bowl, whisk together flour, sugar, baking powder, baking soda, and salt. Using your fingers, work butter into mixture until it has the texture of coarse meal. Remove and reserve 2/3 cup of mixture.

Make a well in center of remaining mixture in bowl and add eggs, whisking to break up, then add yogurt and vanilla. Whisk to combine into a batter (you might see some small specks of butter; that’s okay). Scrape about three-quarters of batter into prepared pan, then whisk cocoa into remaining batter. Dollop evenly over top and swirl with a toothpick or skewer.

Return reserved flour-butter mixture to bowl and stir in hazelnuts until a granola-like mixture forms. Sprinkle over top of batter in pan, squeezing to create clumps. Bake until top of cake springs back when lightly pressed, about 45 minutes. Let cool in pan 10 minutes.

Using overhangs, lift out of pan and transfer to a wire rack; let cool completely. Cut into 12 squares. Cake can be stored in an airtight container at room temperature up to 2 days.