Prepare the custard and then let it cool completely.
Meanwhile, sift the flour into a large bowl and add milk, sugar, egg, liqueur, baking powder and salt. Begin kneading until all ingredients are combined. Continue kneading for at least 5–10 minutes until a soft dough forms.
Wrap the dough in plastic wrap and let rest for 30 minutes.
Once the dough has rested for the necessary time, roll it out with a rolling pin or a pasta machine to a thickness of 2-3 cm, not too thin or the filling will leak out during frying.
Using a pasta cutter, divide the dough into strips about 8-9 cm wide.
Place small mounds made with a heaping teaspoon of pastry cream on the first pasta strip, spacing them 8-9 cm apart and leaving at least 1.5 cm from the edges of the ravioli.
At this point, it is essential to moisten the edges of the pasta strips if they have dried out slightly. Otherwise, the ravioli may open during cooking, causing the filling to leak into the oil and create a mess.
Now, carefully place another strip of pasta dough on top. Press the dough around the filling to remove any air pockets, then use a fluted wheel cutter to cut out rectangular ravioli.
Ensure the edges are well-sealed by pressing firmly with your fingers or a fork. Proceed in this manner until you have used up all the dough strips.