Dinan is a commune .
Dinan ( , Gallo : Dinan ) is a walled Breton town and a commune in the CÃ tes-d ` Armor department in north-western France .