With 23 different flavors, no wonder people started adding Dr Pepper to their cakes.

Chocolatesheet cakeswere popular among early 20th-century cooks from Kentucky to California.

Dr Pepper cake takes its cues from those recipes.

Dr Pepper Texas Sheet Cake

Credit: Antonis Achilleos; Food Styling: Emily Nabors Hall; Prop Styling: Kathleen Varner

Coat a 17 12- x 12 12-inch rimmed baking sheet with cooking spray.

Whisk together flour, sugar, baking soda, cinnamon, and salt in a large bowl.

Add cola mixture; whisk until blended.

Whisk in eggs, buttermilk, and vanilla.

Pour batter into prepared baking sheet.

Reduce heat to low; whisk in cola and milk until blended.

Gradually add powdered sugar, whisking constantly until blended.

Pour warm icing over warm cake; gently spread in an even layer.

Cool completely in baking sheet on a wire rack, about 1 hour.