mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Optimize the path setting of LiveRe & Valine
* See: https://github.com/next-theme/hexo-theme-next/issues/97
This commit is contained in:
parent
ae9e1407ea
commit
5e1b0d0e8c
2
layout/_third-party/comments/livere.njk
vendored
2
layout/_third-party/comments/livere.njk
vendored
@ -2,7 +2,7 @@
|
||||
<script>
|
||||
NexT.utils.loadComments('#lv-container', () => {
|
||||
window.livereOptions = {
|
||||
refer: location.pathname.replace(CONFIG.root, '').replace('index.html', '')
|
||||
refer: {{ page.path | replace(r/index\.html$/, '') | safedump }}
|
||||
};
|
||||
(function(d, s) {
|
||||
var j, e = d.getElementsByTagName(s)[0];
|
||||
|
||||
2
layout/_third-party/comments/valine.njk
vendored
2
layout/_third-party/comments/valine.njk
vendored
@ -3,7 +3,7 @@ NexT.utils.loadComments('#valine-comments', () => {
|
||||
NexT.utils.getScript('{{ theme.vendors.valine }}', () => {
|
||||
new Valine(Object.assign({
|
||||
el : '#valine-comments',
|
||||
path: location.pathname,
|
||||
path: {{ url_for(page.path) | replace(r/index\.html$/, '') | safedump }},
|
||||
}, {{ theme.valine | safedump }}
|
||||
));
|
||||
}, window.Valine);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user