feat: add initial Nuxt frontend with SSR

This commit is contained in:
Tim
2025-08-07 19:18:42 +08:00
parent 925973b134
commit cfdd257b9a
34 changed files with 14165 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
export function stripMarkdown(text) {
return text ? text.replace(/[#_*`>\-\[\]\(\)!]/g, '') : ''
}
export function stripMarkdownLength(text, length) {
const plain = stripMarkdown(text)
if (!length || plain.length <= length) {
return plain
}
return plain.slice(0, length) + '...'
}