Photonic nanostructures simultaneously maximizing spectral and spatial overlap between fundamental and second-harmonic confined modes are highly desirable for enhancing second-order nonlinear effects in nonlinear media. These conditions have thus far remained challenging to satisfy in photonic crystal cavities because of the difficulty in designing a band gap at the second-harmonic frequency. Here, we solve this issue by using instead a bound state in the continuum at that frequency, and we design a doubly-resonant photonic crystal slab cavity with strongly improved figures of merit for nonlinear frequency conversion when compared to previous photonic crystal designs. Furthermore, we show that the far-field emission at both frequencies is highly collimated around normal incidence, which allows for simultaneously efficient pump excitation and collection of the generated nonlinear signal. Our results could lead to unprecedented conversion efficiencies in both parametric down conversion and second harmonic generation in an extremely compact architecture.