A novel covalent organic framework (COF) (Tp-BI-COF) with combined ketimine-type enol-imine and keto-enamine linkages was prepared through a cascade of ketimine condensation followed by aldimine condensation and characterized by XRD, solid state13C NMR, IR, TGA and BET. Tp-BI-COF showed high stability toward acid, organic solvent, and boiling water. The 2D COF exhibited photochromic properties after being irradiated with a xenon lamp. The stable COF, with aligned one-dimensional nanochannels, provided nitrogen sites on pore walls, which confine and stabilize the H3PO4in the channelviahydrogen-bonding interactions. After loading with H3PO4, the material showed excellent anhydrous proton conductivity.