Split index into index, footer, and header.