1/3 cup butter, softened
2/3 cup sugar
1 teaspoon pure vanilla extract
1 3/4 cups all-purpose flour
1/3 cup cocoa powder
2 teaspoons baking powder
1/2 cup miniature semisweet chocolate chips
1/4 cup walnuts or pecans, chopped (optional)
For the topping:
1 egg yolk, beaten
1 tablespoon water
Preheat oven to 375 degrees. Line a baking sheet with parchment paper.
In a large bowl, cream together the butter and sugar until smooth. Beat in the vanilla and eggs, one at a time.
In a separate bowl, combine the flour, cocoa and baking powder; stir into creamed mixture on low until well-blended. Dough will be stiff. By hand, stir in the chocolate chips and nuts.
Divide dough into two equal parts and place on prepared baking sheet. Shape each into 9- by 2- by 1-inch logs, making sure they are 4 inches apart. You can also use two pans.
Blend the egg yolk and water together and brush the loaves lightly with the mixture.
Bake at 375 degrees for 20 to 25 minutes, until firm. Remove from pan, cool for 30 minutes.
Using a serrated knife, slice the loaves diagonally into 1-inch slices. Return the slices to the covered baking sheet, placing them on their sides.
Reduce heat to 350 degrees and bake for 10 minutes on each side or until dry. Cool completely and store in an airtight container.