Preheat the oven to 180°C/350°F/gas 4. Get an ovenproof dish around 30cm x 20cm and 5cm deep.
Peel and thinly slice the potatoes. Peel, halve and thinly slice the onions. Pick the sage leaves and thinly slice most of them, leaving some whole.
Arrange a layer of sliced potatoes over the base, then a layer of sliced onions, followed by a scattering of sliced sage and a sprinkle of sea salt and freshly ground black pepper. Continue in this way, alternating the layers of potatoes and onions, finishing with a layer of potatoes that slightly overlap each other.
Pour your stock over the potatoes. Season the top layer with a little salt and pepper, then scatter over the whole sage leaves and your Parmesan. Pop little dots of the butter all over the potatoes.
Put the dish on the highest shelf of the oven and cook for around an hour, until the top is crisp and golden and the potatoes cooked all the way through.