Text this: A new method to retrieve the star formation history from white dwarf luminosity functions – an application to the Gaia catalogue of nearby stars.