Preheat your oven to 350°F (175°C) and grease a 9-inch round cake pan.
In a large mixing bowl, cream the softened butter and sugar together until light and fluffy.
Add the eggs one at a time, mixing well after each addition, followed by the vanilla extract.
In a separate bowl, whisk together the flour, baking powder, salt, cinnamon, and shredded coconut (if using).
Gradually add the dry mixture to the wet ingredients, alternating with the crushed pineapple, starting and ending with the dry ingredients.
Pour the batter into the prepared cake pan, smoothing the top with a spatula.
Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cake to cool in the pan for 10 minutes before transferring it to a wire rack to cool completely.