On Sabbaths and on the festivals, one should begin with the concept of comfort and conclude with the concept of comfort and, in the midst of the blessing, mention the sacred quality of the day.
How should one begin? Either with, "Comfort us, God, our Lord, with Zion, Your city..." or "Have mercy on us, God, our Lord, and on Israel, Your people, on Jerusalem, Your city...." One should conclude with: "[Blessed are You, God,] who will comfort His people Israel with the building of Jerusalem" or "... who will build Jerusalem."
On the Sabbath, in the midst [of the blessing], one should say:
Our God, and God of our fathers, may it please You, God, our Lord, to strengthen us through Your mitzvot and through the mitzvah of this great and holy seventh day. For this day is great and holy before You for us to refrain from work and rest on it with love in accordance with the commandment of Your will. In Your good will, God, our Lord, grant us tranquility and prevent distress, evil, and sorrow on the day of our rest.
On the festivals, one should include the prayer Ya'aleh v'yavo in this blessing. Similarly, on Rosh Chodesh and on Chol HaMo’ed, one should include the prayer Ya'aleh v'yavo in the third blessing.