Serves 6 with leftover potatoes

5 medium sweet potatoes (about 4 1/2 pounds)
4 1/2 tablespoons olive oil
1 large red onion, chopped
2 cloves garlic, finely chopped
1 bunch Swiss chard, thick stems removed
1 1/2 cups whole-milk ricotta
2 teaspoons chopped fresh thyme
Salt and pepper, to taste
1 cup dried white bread crumbs or panko
Extra olive oil (for the pan)

1. Cut the larger potatoes in half crosswise. In a stockpot, place the potatoes and water to cover and bring to a boil. Simmer for 20 to 30 minutes or just until tender. (Don’t overcook.) Drain the potatoes in a colander. When cool enough to handle, peel off the skins. Reserve 2 potatoes for the pizza. Cut the remaining 3 potatoes into 1/2-inch-thick slices.

2. Set the oven at 350 degrees. Oil a 9-inch square baking dish.

3. In a large skillet over medium heat, heat 2 tablespoons of the oil. Add the onion and cook, stirring occasionally, for 15 minutes. Add the garlic and cook, stirring, for 2 minutes. Transfer to a bowl.

4. Meanwhile coarsely chop the chard leaves and finely chop the stems. Rinse well.

5. In the skillet used to cook the onion, heat 1 tablespoon of oil over medium heat. Add the chard leaves and stems with the water that clings to it. Cook, stirring often, for 5 minutes or until tender. Add to the onions.

6. In another bowl, combine the ricotta, thyme, salt, and pepper.

7. In a small bowl, toss the bread crumbs, the remaining 1 1/2 tablespoons olive oil, salt, and pepper.

8. Place 1/2 the potato slices in the baking dish, cutting them, if necessary, to make a full layer. Add 1/2 the chard mixture. Spread the ricotta on top. Cover with the remaining potatoes, then the remaining chard mixture. Sprinkle with bread crumbs.

9. Bake the gratin for 45 to 50 minutes or until it is hot and browned on top. Let stand for 5 minutes before cutting into squares.