Preheat the oven to 350°F (175°C) and grease a 9-inch pan. In a bowl, whisk together the flour, cocoa powder, baking powder, baking soda, and salt. Set aside.
In a mixing bowl, beat the softened butter and brown sugar on low speed until light and fluffy. Add the eggs one at a time, mixing well after each addition. Then, mix in the vanilla and Greek yogurt.
Mix in the sourdough discard until the batter is uniform.
Alternate adding the dry ingredients and the milk to the batter in small amounts, mixing gently after each addition until smooth.
Gently fold in the raspberries and chocolate chips. If using fresh fruit, toss it with a bit of flour first to prevent sinking.
Pour the batter into the prepared pan and smooth the top. Bake for 55-60 minutes, or until a toothpick inserted in the center comes out clean. Let cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.
Optional - Make the Frosting: Mix the sweetened condensed milk and cocoa powder until smooth. Add the butter, vanilla, salt, and espresso powder (if using). Stir until uniform. Spread over the cooled cake.
Notes
if you’re using fresh fruit, toss it with a tablespoon of flour before folding it into the batter—this keeps the fruit evenly distributed and prevents it from sinking.
use Dutch process cocoa for the richest chocolate flavor, and don’t skip the Greek yogurt—it keeps the cake moist and balances the sweetness perfectly.