Preheat oven to 350F degrees and adjust oven rack to middle position. Lightly grease 10 wells of the donut pan with butter or cooking spray.
In a large mixing bowl, whisk the flour, cocoa powder, baking soda, and salt until mixed.
In a small mixing bowl, combine both of the sugars, egg, buttermilk, and vanilla extract. Stir until thoroughly combined.
Pour the liquid ingredients into the dry ingredients and also add the melted coconut oil at this time. Using a spatula gently mix until no flour streaks remain.
Spoon the batter into the donut pan, or you can transfer the batter to a piping bag - cutting the tip off the end after adding the batter - and pipe into the donut pan. Fill each donut reservoir 2/3 full. If you are using a 6-donut, donut pan, you will have batter remaining which you will reserve to make the second batch of donuts.
Bake the donuts for 10 minutes, or until a toothpick inserted in the middle of the donut comes out clean. Allow the donuts to cool in the pan for 5 minutes before transferring to a wire rack to cool completely.