How can I keep my baby awake while feeding?

Why? Most babies fall asleep when they are done feeding. The rare baby who is too weak to feed properly really needs to be managed by a pediatrician.
Change their diaper. Many babies get sleepy during nursing and fall asleep half-way through their feeding. Burping them and changing their diaper are usually effective ways to wake them up so they can continue feeding.