Grease and line three 8-inch (20 cm) cake tins with parchment paper.
2. Step
In a large bowl, sift together the flour, cocoa powder, salt, baking soda, and baking powder. Set aside.
3. Step
In a large glass measuring cup, combine the stout, vanilla, and espresso powder. Set aside.
4. Step
In a large mixing bowl, cream together the butter and sugar until it is light and fluffy, about 5 minutes, scraping down the sides occasionally to ensure all the ingredients are being evenly creamed together.
5. Step
Beat in the eggs, one at a time, ensuring each egg is fully incorporated before adding the next.
6. Step
Add the mayonnaise and beat until the mixture is smooth and creamy.
7. Step
Preheat oven to 325˚F (160˚C).
8. Step
Alternate adding the prepared dry and wet ingredients to the batter. Starting with about ⅓ of the dry ingredients, beat until incorporated. Then add ⅓ of the liquid ingredients, mixing until the batter comes together. Continue until all the wet and dry ingredients have been incorporated.
9. Step
Using a rubber scraper, fold the dark chocolate chunks into the batter.
10. Step
Distribute the batter evenly between the 3 prepared cake tins.
11. Step
Bake for about 35 minutes, or until a toothpick inserted into the center of the cake comes out clean.
12. Step
Place the cakes on a cooling rack and leave to cool for about 10-15 minutes, until the outside of the pan is cool enough to touch.
13. Step
Once the cakes have cooled, loosen the edges using a butter knife. Then place a large plate over the tin and invert to release the cake from the pan. Remove the parchment paper from the bottom of the cake and slide the cake back onto the cooling rack to cool completely. Repeat for the remaining two layers.
14. Step
While your cakes are cooling, prepare the buttercream.
15. Step
In a large bowl, beat together the butter and vanilla.
16. Step
Gradually add in the cocoa powder, powdered sugar, and milk, continuously beating until all the ingredients have been incorporated and the frosting is light and fluffy.