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

关于Twikoo的集成 #388

Open
SYuan03 opened this issue Jun 23, 2024 · 7 comments
Open

关于Twikoo的集成 #388

SYuan03 opened this issue Jun 23, 2024 · 7 comments
Labels
bug Something isn't working high priority It will be completed right away

Comments

@SYuan03
Copy link

SYuan03 commented Jun 23, 2024

我参照twikoojs/twikoo#620 一个似乎相关的twikoo的issue找到了相关代码

<% if (theme.comment.enable === true && theme.comment.hasOwnProperty('system') && page.comment !== false && page.comment !== false) { %>
<div class="comment-container px-2 sm:px-6 md:px-8 pb-8">
<%- partial('_partials/comments/comment') %>
</div>
<% } %>

但是我们不是用的vitepress似乎没法这么解决?

https://bblog.031105.xyz/posts/%E6%9C%9F%E6%9C%AB%E5%A4%8D%E4%B9%A0/%E8%BD%AF%E4%BB%B6%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1/24-spring-%E8%BD%AF%E4%BB%B6%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1%E6%9C%9F%E6%9C%AB%E5%A4%8D%E4%B9%A0.html
这是我的博客链接,现在任何一个点赞回复都会回到页面顶部,求解QAQ

@FrederickBun
Copy link
Contributor

你在评论框上加一个 class="vp-raw" 试试

@SYuan03
Copy link
Author

SYuan03 commented Jun 23, 2024

你在评论框上加一个 class="vp-raw" 试试

好,我再试试。我之前参照那个链接试过加这个,不知道为啥还是不行QAQ,我全局搜索好像在page.ejs里也有container类,我之前就是在那边加了后好像么得用

@SYuan03
Copy link
Author

SYuan03 commented Jun 23, 2024

你在评论框上加一个 class="vp-raw" 试试

emm是这样加嘛,我试了好像还是有这问题

<div class="comment-container px-2 sm:px-6 md:px-8 pb-8 vp-raw">
    <%- partial('_partials/comments/comment') %>
</div>

@EvanNotFound EvanNotFound added bug Something isn't working high priority It will be completed right away labels Jun 23, 2024
@RyouSY
Copy link
Contributor

RyouSY commented Jun 24, 2024

只要把 twikoo 点赞跟评论 a 标签的 href="#" 给改掉就不会出现这种情况了,一时不知道该说是哪边的bug了......

@SYuan03
Copy link
Author

SYuan03 commented Jun 24, 2024

只要把 twikoo 点赞跟评论 a 标签的 href="#" 给改掉就不会出现这种情况了,一时不知道该说是哪边的bug了......

感谢!好像还真是,我试了下直接F12编辑后确实好了,但我不知道改哪里的代码

@imaegoo
Copy link

imaegoo commented Jun 24, 2024

image

# Whether to enable single page experience (using swup). See https://swup.js.org/. similar to pjax
single_page: true

把 single_page 改成 false 再试试呢?

@SYuan03
Copy link
Author

SYuan03 commented Jun 24, 2024

image

# Whether to enable single page experience (using swup). See https://swup.js.org/. similar to pjax
single_page: true

把 single_page 改成 false 再试试呢?

It works! 感谢大佬orz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority It will be completed right away
Projects
None yet
Development

No branches or pull requests

5 participants