Grease a 4" x 14" tart pan with removeable bottom (see note). Set aside.
In the bowl of a food processor, combine flour, cocoa, powdered sugar, and salt. Pulse briefly to combine.
Add diced butter and pulse until no large pieces remain. Beat egg yolk slightly and drizzle over the top. Process in long pulses until the dough comes together.
Turn the dough out onto a lightly floured surface and gently knead together. Roll the dough large enough to line your tart pan. Transfer to tart pan and trim edges. Freeze the crust for at least 30 minutes.
Preheat oven to 350° F. Grease some foil and line the frozen crust with it (you don't need pie weights because the crust is frozen). Place the tart on a baking sheet and bake 25 minutes. Remove the foil, then bake for another 5 minutes. Remove to a wire rack to cool completely.
For Custard:
In a medium saucepan, heat milk to boiling.
While the milk warms, combine egg yolks, sugar, cornstarch, espresso powder, and salt in a medium heatproof bowl. Whisk until thoroughly combined.
Add about ½ cup of the hot milk in a slow, steady stream to the egg mixture while whisking constantly. This will temper the eggs. Then add the egg mixture to the saucepan with the remaining milk.
Cook mixture over medium heat, whisking constantly, until mixture is thick. Once the desired thickness is reached, remove from the heat.
Add melted chocolate and mix to combine. Add vanilla bean paste (see note), chocolate extract (see note), and butter and mix to incorporate.
Strain the mixture through a fine mesh sieve into another bowl to ensure there are no lumps in the custard. Cover with plastic wrap, pressing it directly to the surface of the custard to ensure it doesn't form a skin. Refrigerate until chilled through.
Once chilled, fill the prepared tart crust with the custard. Chill until ready to top with whipped cream.
For Whipped Cream (see note):
You can choose to make the whipped cream all plain, all chocolate, or go for the ombre effect like I did. There are details in the recipe notes on how I achieved each shade of chocolate whipped cream that you see in the photos.
Combine cream, powdered sugar, and vanilla bean paste in the bowl of a stand mixer (if making chocolate whipped cream, add the cocoa powder at this time, too). Using the whisk attachment, begin beating on low speed to start to incorporate the ingredients. Turn the mixer off and scrape down the sides of the bowl.
With the mixer on medium-high speed, whip the cream to stiff peaks. Transfer to a piping bag to pipe onto the tart, or dollop on top with a spoon.Enjoy!
Notes
Note on tart pan: I used a 4" x 14" rectangular tart pan with removeable bottom for this tart (like this one here). The recipe can also be made into a 9" round tart without any alterations to the recipe.Note on espresso powder: I've found it difficult to find espresso powder--especially one that isn't already hard as a rock--at my local grocery store. I use King Arthur Flour's brand (link here), as it's very fine and made specifically for baked goods.Note on vanilla bean paste: You can substitute with one vanilla bean or with vanilla extract if you like. If you're looking to purchase vanilla bean paste and can't find it in your local grocery store (I never can), you can find it online here.Note on chocolate extract: Chocolate extract lends amazing depth of flavor to chocolate baked goods! If you can’t find it in your local grocery store, you can find some here. Even better, make yourself some Homemade Chocolate Extract for next time!Notes on whipped cream: You can choose to make the whipped cream all plain, all chocolate, or go for the ombre effect like I did. Here is how I made each of the 5 shades of whipped cream that you see in my photos (I know it's crazy and making five different whipped creams is ridiculous, but...) :Shade 1 (base recipe): ¼ cup cream, 1 tablespoon powdered sugar, and ¼ teaspoon vanilla bean paste.Shade 2: Base recipe +1 teaspoon cocoa.Shade 3: Base recipe +1 teaspoon cocoa and 1 teaspoon dark cocoa.Shade 4: Base recipe +2 teaspoon dark cocoa and ½ teaspoon black cocoa.Shade 5: Base recipe +2 teaspoon black cocoa.