The hydrogen-bond-acceptor (HBA) templates 2,3-bis(4-methylenethiopyridyl)naphthalene (2,3-nap) and 1,8-bis(4-pyridyl)naphthalene (1,8-dpn) are used to assemble (E,E)-2,5-dimethylmuconic acid (dmma) in the solid state for an intermolecular [2 + 2] photocycloaddition. Co-crystallisation of 2,3-nap with dmma affords an 1D hydrogen-bonded polymer that is photostable while 1,8-nap affords a 0D hydrogen-bonded assembly that is photoactive. The diene stacks in-phase and reacts to give a syn monocyclobutane in up to 55% yield.