Heteroatom doping effectively changes the electron distribution of polymeric materials. In general, the doping of O [
39], S [
35], P [
36], and other elements mainly contributed to HOMO electron distribution and changed the position of the valence band. Thus, it is possible to narrow the bandgap while maintaining the position of the conduction band to supply enough driving force for hydrogen generation. To dope sulfur into CTF-1, the polymerized CTF-1 was ground with sulfur powder and calcined at 250 °C for 1 h under a nitrogen atmosphere. The bandgap was sufficiently narrowed. Compared with the undoped sample, the photocatalytic activity for hydrogen generation was enhanced 4 times [
35]. When replacing N atoms in CTF-1 with P atoms, a narrower bandgap was obtained as well, while the photocatalytic activity increased 5 times compared to the bare sample [
36]. However, elemental doping may destroy the conjugated structure of the material and cause a great deviation in LUMO position as well. For the oxygen doping materials in particular, one study reported hydrogen had an evolution rate of only 0.5 µmol h
−1 (>420 nm), which was much lower than the bare sample [
39]. This could partially be explained by the halogen atoms doped samples. When treating CTF-1 with HCl, Cl atoms were successfully doped in the position between the C-N bond, showing much lower activity than the undoped sample [
38]. On the contrary, when treated CTF-1 by NH
4Cl, Cl atoms were only able to substitute H atoms in benzene motifs. The photocatalytic activity of the Cl-doped sample increased 7.1 times compared to the unmodified sample, and high quantum efficiency of 10.31% was achieved under 420 nm light irradiation [
37]. By comparing the band structures of two Cl-doped samples, the conduction band slightly shifted to more negative as well when replacing H in benzene, although the overall bandgap was narrower than the unmodified sample, which thus gave more driving force for proton reduction while increasing the light absorption range. Fe
3+ ions were also claimed to be doped into the CTF molecule structure. With the increase in Fe amount, the valence band position shifted more negatively, resulting in a 30 times improvement in the hydrogen generation rate than the bare sample of 30 µmol h
−1 (>420 nm) [
50]. Protonating CTFs by acid was a strategy to enhance hydrophilicity. The protonated CTF-1 presented a contact angle of 38.4°, which was only one-third of the bare sample, resulting in ca. 10 times enhancement of the hydrogen evolution rate [
51].