Covalent organic frameworks (COFs) are porous organic polymers . They comprise lightweight elements (e.g., C, B, and N) linked via covalent bonds. They exhibited several advantages, including high chemical and thermal stability, high porosity, and low density . Thus, they improved the performance for several applications such as gas adsorption or separation and catalysis . COFs offer the potential to use as support and precursors for the synthesis of porous materials such as carbon nanomaterials .