Skip to content

Commit 4318ab8

Browse files
committed
Reduce post slug max length
1 parent d8a7ca0 commit 4318ab8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/mg-json/lib/to-ghost-json/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default async (json) => {
1212
// String length data from https://github.com/TryGhost/Ghost/blob/main/ghost/core/core/server/data/schema/schema.js
1313
let properties = {
1414
title: 255,
15-
slug: 191,
15+
slug: 185,
1616
custom_excerpt: 300,
1717
og_title: 300,
1818
og_description: 500,

packages/mg-wp-xml/lib/process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const processPost = async ($post, users, options) => {
214214
};
215215

216216
if (post.data.slug.trim().length === 0) {
217-
post.data.slug = slugify(post.data.title).substring(0, 191);
217+
post.data.slug = slugify(post.data.title).substring(0, 185);
218218
}
219219

220220
post.data.html = await preProcessContent({

0 commit comments

Comments
 (0)