Preheat your oven to 180c fan/200c conventional/gas mark 6.
Grease a 20 x 20 cm oven proof dish using some butter.
Spread a thin layer of onions in the bottom of the dish, then cover with some potatoes, a sprinkling of fresh thyme, salt and pepper and several small knobs of butter.
Continue layering as above until the dish is full, making sure you end on a potato layer.
Carefully pour the stock into the dish, add the final knobs of butter and a good seasoning of salt and pepper.
Place the dish on to a baking sheet, cover with foil and bake for 30 minutes, then remove the foil and cook for a further 20-30 minutes until the potatoes are cooked through and the top is golden and crispy.
