Place the butter or margarine and dark brown sugar in a large mixing bowl and combine – you can use a wooden spoon, an electric hand whisk or a stand mixer with a paddle attachment. Mix until creamy.
Add the flax ‘egg’, black treacle and vanilla extract, and combine. Add the flour, baking powder and spices, and mix until a soft dough forms (you may need to bring it together with your hands).
Wrap the dough in greaseproof paper and let it chill in the fridge for 2 hours before rolling out.
Preheat the oven to 180°C fan/200°C/400°F/gas mark 6 and line 2 baking trays with greaseproof paper. Sprinkle flour over a clean worktop. Roll out the chilled dough to a thickness of 5mm (¼in) and cut out the cookies using a medium-sized gingerbread man cutter. You can roll out the dough between 2 sheets of greaseproof paper if you prefer, to prevent any sticking.
Place the cookies on the lined baking trays and bake in the middle of the oven for 10–15 minutes. You may need to bake each tray separately if there isn’t enough room on one shelf for both trays.
Once baked, use a spatula to lift up the biscuits and place them on a cooling rack. Leave to cool fully before decorating.
The royal icing can be made before making the cookies or after.
Store at room temperature in a sealed container or cookie jar with a sealed lid – gingerbread cookies can last for months if stored correctly.