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

出现双重代码框/代码框无法显示,纯色背景 等的解决方案(专门开一个帖子) #44

Closed
sctop opened this issue Feb 2, 2018 · 5 comments

Comments

@sctop
Copy link
Contributor

sctop commented Feb 2, 2018

这个问题我解决了
首先我们在prism的官网看到js占了一大半,所以我们可以肯定的是js是显示的主要部分
选中你要的部分,然后下载js和css,替换原来的
push上去或者直接127.0.0.1(建议push上去)
然后网页加载完毕之后(tips:看刷新键是否是刷新的样子),F12调出审查元素,点network(网络),然后点一下红点(有一个开始的红点的,按一下会变成灰色,同时下面会有“F5 xxxxx”),F5刷新。
网页加载再次成功后,检查一下prism.js是否有加载,如果有那么正常情况下是能显示正常的,如果只有css没有js的话,将layout里头的加载prism.js的片段扯出来放到和(include文件头里有两种head,两种都要加)里头(head头是一定会读取的)。再push上去,一般情况下就能解决了。

@gitzjm
Copy link

gitzjm commented Feb 7, 2018

我用了一个很傻瓜的办法..把代码块的CSS样式
.markdown-body .highlight {
margin: 0 0 16px;
overflow: scroll;
}
中的overflow: scroll去掉即可
一层框都没有,清爽~
附我调好的博客地址zhaojunming.com

@nimocat
Copy link

nimocat commented Feb 9, 2018

@gitzjm 牛逼啊666

@sctop
Copy link
Contributor Author

sctop commented Feb 9, 2018

这个功能有些问题,请各位听好了:
fork之后一定要这样子做!要不然。。。有部分文章还是会出问题!

@kaeyleo kaeyleo closed this as completed Apr 17, 2018
@charcai
Copy link

charcai commented Jun 27, 2018

请问双重代码框怎么解决

@charcai
Copy link

charcai commented Jun 27, 2018

OK,把_config.yml里面的highlighter改成none就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants