Add the buttermilk, eggs, vanilla extract, and almond extract to the batter. Mix until smooth and well combined.
Pour the batter into the prepared baking pan and spread it evenly.
Bake for 25-30 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cake to cool completely in the pan on a wire rack.
Prepare the Pineapple Topping:
In a medium saucepan, combine the crushed pineapple (with its juice) and sugar.
Cook over medium heat, stirring occasionally, until the mixture thickens, about 10-15 minutes.
Spread the pineapple topping evenly over the cooled cake.
Prepare the Frosting:
In a large mixing bowl, beat the softened butter and cream cheese until smooth and creamy.
Gradually add the powdered sugar, one cup at a time, mixing well after each addition.
Add the vanilla extract and beat until well combined.
If using, fold in the chopped pecans or walnuts and shredded coconut.
Spread the frosting evenly over the pineapple topping on the cake.
Serve:
Slice the cake into squares and serve. Enjoy