High-resolution observations of low-luminosity gigahertz-peaked spectrum and compact steep-spectrum sources