Remove single quotes before creating slug (#1781)

This commit is contained in:
Ranie Santos 2018-10-24 10:24:17 +08:00 committed by Shawn Erquhart
parent 5d299723ad
commit 33e20ad751

View File

@ -69,6 +69,9 @@ const slugFormatter = (collection, entryData, slugConfig) => {
// Convert slug to lower-case // Convert slug to lower-case
.toLocaleLowerCase() .toLocaleLowerCase()
// Remove single quotes.
.replace(/[']/g, '')
// Replace periods with dashes. // Replace periods with dashes.
.replace(/[.]/g, '-'); .replace(/[.]/g, '-');