Yttrium-doped g-C3N4 was prepared via a facile pyrolysis method.
Yttrium-doped g-C3N4 exhibited enlarged specific surface areas.
Yttrium-doped g-C3N4 show optimized optical absorption property.
Induced Y3 + into g-C3N4 can reduce electron–hole recombination.