In 2005, Côte and co-workers introduced a new family of layered and porous materials which are referred to as covalent organic frameworks (COFs). In these systems, organic linker molecules are connected via covalent bonds with connectors, formed, e.g., by oxygen and boron atoms (see Figure for building blocks of COF-5). Regular frameworks, formed by stitching together these linkers and connectors, can have honeycomb topology within each layer, as in the case of COF-5 (see Figure ), but are not restricted to this topology. For example, using porphyrins as tetratopic organic linkers leads to a square topology. Note that even though these materials are referred to as "2D COFs", in the literature, they are in fact rather layered materials, where single 2D sheets form three dimensional structures with porous channels normal to the basal planes. Nowadays, many different COF systems have been synthesized and investigated, and several reviews or perspective articles are available in the literature. Here, we would like to focus on the aspect of layer stacking and its effect on the electronic properties of selected COFs. In 2011, we have calculated the stacking order of a few layered COFs from first-principles. We focused especially on the structures of COF-1, -5, -6, and -8. Back in 2011, the experimentally reported layer stacking of these systems was either AAAA (eclipsed) (cf. Figure top) or ABAB (staggered). We showed that these systems are considerably more energetically stable (see Figure ) if their stacking arrangement is either serrated (AA'AA', that is, the 6-fold rings in the linkers and connectors are stacked as in Bernal graphene, cf. Figure top for COF-5) or inclined (AA'A''A''', cf. Figure ). In these arrangements, the layers are shifted with respect to one another by about one C-C bond length, ~1.4 Å, compared with the eclipsed stacking. Note that many other stackings, possibly random ones, are possible. Our calculated PXRD patters fit very well to the experimental ones (see Figure ). We also showed that the proposed stackings of layers affect the pore geometries.