Preheat the oven to 170c (fan) or 180c (regular)
Butter a gratin dish
Peel the onion, potatoes and garlic
Use a mandolin set to 3/8cm to cut the onion and potato into neat slices
Chop the garlic into tiny nuggets
Strip the thyme of any large stalks
If your onion is strong, melt a little butter in a frying pan and gently fry the onion slices for 5 - 8 minutes till soft
Start building the dish with a layer of onions
Season with salt and pepper, add a few thyme leaves and a few bits of garlic
Add a layer of potatoes
Repeat until the dish is full, finishing with a neat layer of potatoes.
Press the mixture down gently but firmly
Pour over the stock
Finish the dish by dotting with little bits of butter, seasoning with salt and pepper and sprinkling over any remaining thyme
Cook in the oven for an hour in total.
After 30 minutes, check and add more stock if necessary. If the potatoes are browning then cover the dish with foil.
Remove the foil for the last 10 minutes of cooking