Using a mandolin slicer or knife, thinly and evenly slice the potatoes widthwise.
Lay the potatoes out into three rows across the length of the baking dish.
Lay the onions across the top of the potatoes. Set aside.
Meanwhile, make the pumpkin cheese sauce. Mix together the pumpkin puree, 1 cup of cheddar cheese, 1 cup of parmesan cheese, heavy cream, thyme, and salt.
Pour the cheese sauce on top of the onions and potatoes.
Cover the baking dish and place in the oven for 45 minutes.
After 45 minutes, remove from the oven and remove the cover.
Top with the remaining ½ cup of cheddar cheese and ¼ cup of parmesan cheese.
Cook uncovered for another 30 minutes until lightly browned.
Once browned, remove from the oven and allow to cool before serving. Garnish with fresh parsley (optional).
Notes
Yukon gold or russet potatoes are best for potatoes au gratin.