Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

推荐加入畅言云评 #205

Open
2 tasks done
Linux-qitong opened this issue May 19, 2024 · 14 comments
Open
2 tasks done

推荐加入畅言云评 #205

Linux-qitong opened this issue May 19, 2024 · 14 comments
Labels
enhancement New feature or request
Milestone

Comments

@Linux-qitong
Copy link

报告前须知

  • 我已确认该功能确实不存在
  • 我会认真详细地描述清楚我想要的功能

您的新功能建议是由使用时出现的不便引发的吗?

是的,其他评论插件不适合我,目前在用来必力,但不是太方便,用其他主题时候,就是用的畅言云评,最近开始用的咱家主题

请描述您所设想的功能或是解决方案

畅言云评主要方便管理,没有广告,比来必力好用,可以用畅言云评的微信小程序进行评论管理,很方便。
接入畅言云评插件也不是很费劲。

补充内容

加入畅言云评不是很麻烦,咱们主题如果我自己加畅言云评,我该怎么插入畅言的评论代码,让其正常使用,真的很方便。

@Linux-qitong Linux-qitong added the enhancement New feature or request label May 19, 2024
@ArcticLampyrid
Copy link
Collaborator

如果想要自己添加评论系统
可以参考 https://github.com/Candinya/Kratos-Rebirth/tree/master/layout/_comments 目录下的现有文件
新建一个 ejs 文件并编写相关代码,注意处理好 pjax 时重新加载评论的逻辑

PR is welcome

@Linux-qitong Linux-qitong closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
@Linux-qitong Linux-qitong reopened this May 19, 2024
@Linux-qitong
Copy link
Author

和其他主题不一样,其他主题加完ejs,需要改comment.ejs,咱们主题我没有发现有comment.ejs

@Linux-qitong
Copy link
Author

我参考了其他主题的教程,ejs这个写法一样:
打开 themes\indigo\layout_partial\post\comment.ejs,在文件末尾 <%} %> 的前面添加一行代码:

<%- partial('../plugins/changyan') %>

@ArcticLampyrid
Copy link
Collaborator

假设你创建的文件叫 foo.ejs,那么你直接在配置里面使用 foo 就可以了

@Linux-qitong
Copy link
Author

https://github.com/Candinya/Kratos-Rebirth/blob/master/_config.yml
等我有时间放假回家,我试试看,就创建个ejs就完事了,有点懵,毕竟改hexo主题不是特别多

@Linux-qitong
Copy link
Author

Linux-qitong commented May 19, 2024

Screenshot_2024-05-19-10-46-16-82_a252b927494330cdc2c8ba3b3f952e5e
这个是?
也是和评论有关,看着好复杂,我在_config.yml,没找到provider: gitalk ,但找到类似的:
vendors:
packages:
disqusjs:
version: 1.2.6
gitalk:
version: 1.7.2
gitment:
version: 0.0.3

@ArcticLampyrid
Copy link
Collaborator

那个是存储js库文件(非cdn模式)用的,像畅言这种直接从服务商拉取js的是不需要考虑这些的。

@ArcticLampyrid
Copy link
Collaborator

考虑到 pjax 切换,需要参考一下
https://changyan.kuaizhan.com/static/help/f-pjax.html

@ArcticLampyrid
Copy link
Collaborator

ArcticLampyrid commented May 19, 2024

我在_config.yml,没找到provider: gitalk

看 demo 文件夹里面的配置文件 或者 配置文档 哦。

根目录的是主题内部提供默认值用的配置。

@Linux-qitong
Copy link
Author

嗯嗯,我回家试试,实在不行,只能有偿悬赏了,或者联系畅言官方处理,脑袋有点脑雾,就改过不几回hexo主题,太复杂的改,感觉够呛

@Candinya Candinya added this to the v3 milestone May 23, 2024
@Linux-qitong
Copy link
Author

Linux-qitong commented May 24, 2024

目前我在2.1.5成功添加畅言评论,只需要写好ejs,在_config.yml里面添加了如图,但我发现去除畅言的enable(不去除问不大吧),畅言评论框不显示
显示评论框切换页面,不手动刷新不显示评论页面,不知如何解决

@Linux-qitong
Copy link
Author

Screenshot_2024-05-24-19-02-31-04_99c04817c0de5652397fc8b56c3b3817

@ArcticLampyrid
Copy link
Collaborator

显示评论框切换页面,不手动刷新不显示评论页面,不知如何解决

参见之前的回复:

考虑到 pjax 切换,需要参考一下
https://changyan.kuaizhan.com/static/help/f-pjax.html

@Linux-qitong
Copy link
Author

Linux-qitong commented May 25, 2024

这个参考了,链接里面的代码:
https://changyan.kuaizhan.com/static/help/f-pjax.html
加在哪里吖
我用的
https://www.jianshu.com/p/4c418f385171
这里面的畅言代码,用其他主题的changyan.ejs不显示评论框,但这个显示畅言云评有小bug。
不是太大

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants