mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
feat: automatically generate Open Graph cards
This commit is contained in:
parent
9b9bdb2811
commit
a556a622ab
14 changed files with 59 additions and 30 deletions
|
@ -5,7 +5,7 @@ import sanitizeHtml from 'sanitize-html'
|
|||
const parser = new MarkdownIt()
|
||||
|
||||
// Generate an excerpt from Markdown content
|
||||
export function generateExcerpt(content: string, length: number = 100): string {
|
||||
export function generateExcerpt(content: string, length: number = 98): string {
|
||||
if (!content)
|
||||
return ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue