m14i-blogging 0.2.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/m14i-blogging-0.3.0.tgz +0 -0
- package/package.json +1 -1
- package/dist/m14i-blogging-0.2.7.tgz +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1404,6 +1404,9 @@ function formatReadingTime(minutes) {
|
|
|
1404
1404
|
function getReadingTimeDuration(minutes) {
|
|
1405
1405
|
return `PT${minutes}M`;
|
|
1406
1406
|
}
|
|
1407
|
+
function generateSlug(title) {
|
|
1408
|
+
return title.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, "-");
|
|
1409
|
+
}
|
|
1407
1410
|
function BlogPreview({
|
|
1408
1411
|
title,
|
|
1409
1412
|
sections,
|
|
@@ -2468,6 +2471,7 @@ exports.generateJSONLDScriptTags = generateJSONLDScriptTags;
|
|
|
2468
2471
|
exports.generateMetaTagsHTML = generateMetaTagsHTML;
|
|
2469
2472
|
exports.generatePersonSchema = generatePersonSchema;
|
|
2470
2473
|
exports.generateSEODefaults = generateSEODefaults;
|
|
2474
|
+
exports.generateSlug = generateSlug;
|
|
2471
2475
|
exports.getLayoutClasses = getLayoutClasses;
|
|
2472
2476
|
exports.getLayoutLabel = getLayoutLabel;
|
|
2473
2477
|
exports.getReadingTimeDuration = getReadingTimeDuration;
|