Whenever any ordinance, notice, or other instrument is required by law to be published in a city or park district in which no official newspaper is published, such publication may be made or such notice given by publication of such ordinance, notice, or other instrument in the official newspaper designated pursuant to section 40-01-09. In a county in which no newspaper is published, any notice required by law to be published may be published in a newspaper printed in an adjoining county and having a general circulation in said county.