Skip to content

Commit

Permalink
chore: Limit excerpt length to 250 characters
Browse files Browse the repository at this point in the history
Updated the excerpt filter to limit the length of the extracted content to 250 characters. This ensures a more concise summary is presented and prevents excessively long excerpts from affecting layout or readability.
  • Loading branch information
kudoh committed Nov 30, 2024
1 parent d58a3b6 commit 4c59ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lume/filters/excerpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ export const excerpt = (content: string | React.ReactElement) => {
return "";
}
const target = isReactComponent(content) ? content.props.children : content;
return chop(normalizeContent(target));
return chop(normalizeContent(target), 250);
};

0 comments on commit 4c59ecb

Please sign in to comment.