tangly1024 / NotionNext

使用 NextJS + Notion API 实现的,支持多种部署方案的静态博客,无需服务器、零门槛搭建网站,为Notion和所有创作者设计。 (A static blog built with NextJS and Notion API, supporting multiple deployment options. No server required, zero threshold to set up a website. Designed for Notion and all creators.)
https://tangly1024.com
MIT License
7.15k stars 9.97k forks source link

【添加自定义Html代码】允许用户使用自建AI摘要(类似Tianli AI) #2563

Open wuyuhanzijin opened 2 months ago

wuyuhanzijin commented 2 months ago

为什么提出这个新的特性改动 张洪的AI摘要需要付费,而目前存在可以自己搭建相同功能的方案

描述一下你推荐的解决方案 允许用户在每个页面添加HTML代码 需要添加下面的代码

<!-- 可以在网页结构的任何位置插入,只要你能够 -->
<script src="你新建的js文件"></script>

<!-- 但要确保的是,下列代码一定要在上述 js 之后插入 -->
<script data-pjax defer>
  new ChucklePostAI({
    // 文章内容所在的元素属性的选择器,也是AI挂载的容器,AI将会挂载到该容器的最前面
    el: '#post>#article-container',
    summary_directly: true,
    rec_method: 'web',
    // 若网站开启了 PJAX, 则开启
    pjax: true,
  })
</script>

描述一下你考虑过的其它替代解决方案 暂时没有找到源代码中关于文章添加HTML的内容

补充说明 搭建AI摘要参照 https://bbs.chuanliu.org/d/33-gei-bo-ke-tian-jia-yi-ge-ai-zhai-yao

BKDragon commented 2 months ago

这个不是使用 notion AI 可以直接实现吗?

wuyuhanzijin commented 2 months ago

但是我不想要用NoTion AI,因为我自己搭建了一个摘要机器人