To start the cookies, preheat the oven to 325°F and roast the almonds and hazelnuts in an ovenproof skillet until they smell toasty, about 12 minutes. Remove the nuts from the oven and set them aside to cool.
In a food processor, combine the nuts and the flour and process until the mixture is finely ground. Add the salt and cinnamon and pulse to mix. In the bowl of a stand mixer and using the paddle attachment, cream the confectioners’ sugar with the butter on medium-high speed. Add the vanilla, turn the mixer to low, and add the flour mixture. Mix until the dough is homogeneous, scraping the bowl as necessary. Form the dough into a disk, wrap it in plastic, and chill it until it is firm, about 30 minutes.
To bake the cookies, preheat the oven to 325°F and line a baking sheet with parchment paper. Roll out the dough between two pieces of lightly floured parchment—this dough is a little sticky and you want it nice and thin for sandwich cookies—about 1/8 inch thick. Be sure to loosen the dough from the paper from time to time, adding a little more flour if necessary. Cut out cookies: hearts, rounds, or squares. I like to use a cutter that is 2 inches across. Arrange the cookies in a single layer on the prepared baking sheet. Dock the dough with a fork and chill in the refrigerator for at least 15 minutes. Using a 3/4-inch cutter, punch out the centers of half the cookies; these will be the tops. (I bake the cute little cookie “holes,” cool them, then serve them dusted with confectioners’ sugar).
Bake all the cookies for 6 minutes, then rotate the pan front to back and continue baking until the bottoms and edges are lightly browned, about 6 minutes more .Let the cookies cool completely on the baking sheet, then dust the top halves—the cookies with the holes—with confectioners’ sugar.
Heat the jelly in a small pan over low heat (or warm it in the microwave) just until it “loosens” (this makes the jelly extra shiny when it sets). Spoon a little jelly onto each base—the uncut, un-sugared cookies. Let the jelly set for about 5 minutes, then, using an offset spatula, gently top with the other cookies, sugared sides up. Let the jelly set completely before serving.