Heat the oven to 180C, Gas Mark 4. Peel and slice the potatoes thinly. Lightly grease an ovenproof dish and place a layer of potatoes on the bottom, then a layer of onions. Repeat and finish with a neat layer of potatoes.
Pour over the stock and sprinkle with the thyme. Dot with small pieces of butter and bake for 30 minutes. Cover with foil and bake for a further 40 minutes. Remove the foil and insert a knife, the potatoes should be soft. Return the dish to the oven and cook for a further 10 minutes until potatoes are golden.