valaxy icon indicating copy to clipboard operation
valaxy copied to clipboard

feat: 希望添加自动摘要功能

Open Montaro2017 opened this issue 2 months ago • 4 comments

Clear and concise description of the problem

目前只能手动添加摘要,希望能添加自动摘要功能

Suggested solution

添加自动摘要功能或自动摘要插件,从正文截取开头部分作为摘要 hexo有自动摘要插件

Alternative

No response

Additional context

No response

Validations

  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Montaro2017 avatar Oct 20 '25 03:10 Montaro2017

半年前我确实考虑过开发这个插件,已实现AI摘要功能并支持20多种大语言模型。后续工作主要为数据存储、性能优化及对话交互。目前不清楚是否有同类插件,若不存在功能冲突,后续我将考虑重启这一项目

WRXinYue avatar Oct 20 '25 15:10 WRXinYue

半年前我确实考虑过开发这个插件,已实现AI摘要功能并支持20多种大语言模型。后续工作主要为数据存储、性能优化及对话交互。目前不清楚是否有同类插件,若不存在功能冲突,后续我将考虑重启这一项目

我是希望能从正文截取开头部分作为摘要显示在文章列表中。 没有摘要光秃秃的太难看了。

Image

目前看valaxy的源代码,只能手动指定excerpt或者从文章中截取<!-- more -->前面的部分

const { data, excerpt, content } = matter(md, matterOptions)
const mdFm = data as (Page | Post)

route.addToMeta({
  frontmatter: routerFM,
  excerpt: mdFm.excerpt || (excerpt ? getExcerptByType(excerpt, mdFm.excerpt_type || defaultFrontmatter.excerpt_type, mdIt) : ''),
})

Montaro2017 avatar Oct 21 '25 07:10 Montaro2017

好吧,又仔细看了一下,应该可以通过hooks或者extendRoute方式来指定excerpt,我写个插件看看

Montaro2017 avatar Oct 21 '25 07:10 Montaro2017

只是自动截取的话,可以做到框架内置开关里。

YunYouJun avatar Nov 05 '25 09:11 YunYouJun