The imprint of cosmic reionisation on the luminosity function of galaxies