twikoojs / twikoo

💬 一个简洁、安全、免费的静态网站评论系统 | A simple, safe, free comment system.
http://twikoo.js.org
MIT License
1.4k stars 263 forks source link

无法更新版本 #604

Closed wjsw3369 closed 8 months ago

wjsw3369 commented 8 months ago

Vercel部署的,直接访问域名显示的版本是设置的最新版本号,但在博客上还是显示之前的版本且提示更新

imaegoo commented 8 months ago

image

wjsw3369 commented 8 months ago

image

我使用的是Stellar主题,按主题的配置方式在_config.stellar.yml中添加:

comments:
  service: twikoo
  twikoo:
    envId: https://xxx # vercel函数

也在Vercel绑定的Github仓库中将package.json改成图片的样子

{ "dependencies": { "twikoo-vercel": "1.6.21" } }

123321 你说的这个地址要在哪改,Vercel的地址也没有版本号呀

imaegoo commented 8 months ago

https://github.com/xaoxuu/hexo-theme-stellar/blob/main/_config.yml#L127

在主题配置yml文件中

comments:
  twikoo:
    js: https://gcore.jsdelivr.net/npm/twikoo@1.6.21/dist/twikoo.all.min.js
wjsw3369 commented 8 months ago

https://github.com/xaoxuu/hexo-theme-stellar/blob/main/_config.yml#L127

在主题配置yml文件中

comments:
  twikoo:
    js: https://gcore.jsdelivr.net/npm/twikoo@1.6.21/dist/twikoo.all.min.js

非常感谢解答,没有想过去主题的配置文件找,设置过现在已经是新版了


另外想问一下,如何让多个页面显示同一个评论区

imaegoo commented 8 months ago

如何让多个页面显示同一个评论区

https://www.imaegoo.com/2021/twikoo-path/

https://blog.guole.fun/posts/hugo-gongyong-twikoo/

wjsw3369 commented 8 months ago

如何让多个页面显示同一个评论区

https://www.imaegoo.com/2021/twikoo-path/

https://blog.guole.fun/posts/hugo-gongyong-twikoo/

我所用的这个主题好像没有path可改

wjsw3369 commented 8 months ago

如何让多个页面显示同一个评论区

https://www.imaegoo.com/2021/twikoo-path/

https://blog.guole.fun/posts/hugo-gongyong-twikoo/

非常感谢提供的的方法,自己没看太懂,借助bingai帮助已经解决了,是和上面这个一样再加一条

path: 'window.TWIKOO_MAGIC_PATH||window.location.pathname'

然后在文章中加入

<script>window.TWIKOO_MAGIC_PATH="XXX"</script>

我原本按照此主题提供的beaudar的共用方式在front-matter中添写了一下类似内容,始终不行

twikoo:
  path: 'XXX'

非常感谢解答