You and your employer will continue to make pension contributions if you’re getting paid during maternity leave.
If you’re not getting paid, your employer still has to make pension contributions in the first 26 weeks of your leave (‘Ordinary Maternity Leave’). They have to carry on making contributions afterwards if it’s in your contract. Check your employer’s maternity policy if you’re unsure.
For more information see www.pensionsadvisoryservice.org.uk/about-pensions/when-things-change/parental-leave.