1Preheat the oven to 350°F. Oil a 9-inch square baking pan and line with parchment paper, leaving a 2-inch overhang on two sides. Lightly oil the parchment.
2To prepare the cake, in a medium bowl, whisk together the flour, cocoa powder, nutmeg, cinnamon, baking powder, baking soda, and salt. If your cocoa powder has a few lumps you can sift this mixture, but it isn’t necessary otherwise.
3In a large bowl, whisk together the coconut oil, sugar, eggs, and vanilla. Whisk in about half of the flour mixture. Then whisk in half of the milk. Repeat this process, stirring until the batter is smooth. Pour the batter into the prepared pan and smooth the top. Tap the pan against the counter a few times to knock out the air bubbles.
4Bake until a toothpick inserted into the center comes out with moist crumbs attached, 25 to 30 minutes. Let cool completely on a rack.
5To prepare the frosting, place the chocolate in a large bowl. In a small saucepan, bring the cream to a boil. Immediately pour it over the chocolate and let stand 1 minute, then whisk until smooth. Let the mixture cool at room temperature to a spreadable consistency, stirring occasionally.
6Lift the cake out of the pan and set it on a serving plate. Remove the parchment. Spread the frosting evenly over the top of the cake.
7This cake is best the day it’s made but you can keep leftovers, well wrapped, at room temperature for 1 day.