xaoxuu / hexo-theme-stellar

内置文档系统的简约商务风Hexo主题,支持大量的标签组件和动态数据组件。
https://xaoxuu.com/wiki/stellar/
MIT License
1.3k stars 319 forks source link

fix(stellar-artalk): bump version, fix site name escape #452

Closed songtianlun closed 4 months ago

songtianlun commented 5 months ago

修复以下问题: 1、低版本的 artalk js 无法对接高版本的 artalk 后端,升级配置文件中的版本; 2、模板中向 artalk 传递 site 名称使用了 <%= 转义会导致 artalk 无法对应站点,改用 <%- 解决。

例如我的博客名叫 Frytea's Blog ,但是在 artalk 看到请求的是类似 Frytea&#39;s Blog 导致 artalk 无法找到对应名字的站点,最终得到 404 错误。

Error: 未找到站点:`Frytea&#39;s Blog`,请在控制台创建站点

Fix the following issues:

  1. Older versions of artalk js cannot connect to newer versions of artalk backend, upgrade the version in the configuration file;
  2. Passing the site name to artalk in templates using <%= for escaping will cause artalk to not recognize the site correctly, use <%- instead.

For example, if my blog is named 'Frytea's Blog', but in artalk I see requests like 'Frytea's Blog', which causes artalk to be unable to find the corresponding site name, resulting in a 404 error.

stackblitz[bot] commented 5 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

xaoxuu commented 4 months ago

感谢大佬🫶