Preheat oven to 350°F. Line a baking sheet with parchment paper. Set aside.
In a medium-sized bowl, whisk together flour, cocoa powder, baking soda, baking powder, salt, and espresso powder. Set aside.
In a large bowl, add the butter, brown sugar, and sugar. Using a stand mixer or hand mixer, beat until light and creamy, about 3 minutes.
Add egg yolks, peppermint extract, and vanilla extract. Beat until well combined. Scraping down sides of bowl as needed.
Add dry ingredients and mix on low speed until combined. Scrape down sides of bowl.
Using a cookie scoop, scoop about 2-3 tablespoons of dough onto prepared baking sheet, about 3 inches apart. Bake for 12-15 minutes, until cookies spread out and the top begins to crack. Transfer to a wire rack to cool completely.
Buttercream Frosting
In a large bowl, add butter and powdered sugar and beat with a mixer until the mixture is whipped and fluffy while slowly adding heavy whipping cream. Beat in salt and vanilla extract.
Add buttercream to a piping bag fitted with a ½-inch round metal tip. Pipe the buttercream on each cooled cookie, starting from the outside and working your way in to create a swirl on top. Top with crushed candy canes and enjoy!