Former White House press secretary Karoline Leavitt will join Fox News as a contributor from 1 November after stepping down in August.