Open biociao opened 3 years ago
Well, I've found a solution for myself:
proxy: 'https://<your customized proxy url>'
{%- assign _proxy = _proxy | slice: 2, _last -%}
proxy: [{{ _proxy }}],
gitalk:
js: 'https://unpkg.com/gitalk@latest/dist/gitalk.min.js'
css: 'https://unpkg.com/gitalk@latest/dist/gitalk.css'
Not perfect but it works now.
Well, I've found a solution for myself:
- Add the following line next to /_config.yml#L131:
proxy: 'https://<your customized proxy url>'
- Add the following line next to /_includes/comments-providers/gitalk.html#L23:
{%- assign _proxy = _proxy | slice: 2, _last -%}
- And this line next to /_includes/comments-providers/gitalk.html#L33:
proxy: [{{ _proxy }}],
- Use the latest version of gitalk at L48 and L59 in /_data/variables.yml
gitalk: js: 'https://unpkg.com/gitalk@latest/dist/gitalk.min.js' css: 'https://unpkg.com/gitalk@latest/dist/gitalk.css'
Not perfect but it works now.
right now, just update the gitalk to the latest version, it sloved.
According to https://github.com/gitalk/gitalk/issues/433, new proxy is needed to solve CORS issue. Current theme version seems not available to config it.
Similar issue in another theme: https://github.com/auroral-ui/hexo-theme-aurora/issues/16