Hexo+Next修改记录

MountainDayNepal

博客由 Typecho 换成了 Hexo,记录一下改动内容,以备下次重装……

程序版本:
Hexo 3.4.3
NexT.Gemini 5.1.3

安装插件

hexo-deployer-git
hexo-generator-feed
hexo-generator-searchdb
hexo-generator-sitemap (将 sitemap.xml 拷贝到根目录 改名为 sitemap_template.xml

修正 sidebar 在 IE 不显示(margin-left 为负)

/themes/next/source/css/_schemes/Pisces/_sidebar.styl : line 4

1
2
// margin-left: -50%;
margin-left: inherit;

去除侧边栏的错位

/themes/next/source/js/src/utils.js : line 327

1
2
// $('.site-overview, .post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
$('.site-overview, .post-toc').css('width', '100%');

css 修改

/themes/next/source/css/_custom/custom.styl : line 3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// 去除侧边栏导致错位的 margin
.site-overview {
margin: 0;
text-align: center;
}
// 把 footer 的内容连成一行
.footer-custom {
display: inline-block;
}
// 修正 IE 显示效果(因 IE 不支持 initial)
.main, .content-wrap, .posts-expand {
padding: 0;
}
// 修正 IE 显示效果(因 IE 不支持 initial)
.content-wrap {
background: inherit;
box-shadow: inherit;
}
// 修正 IE 显示效果(因 IE 不支持 initial)
#comments {
margin: 12px 0 0 0;
}
// 去除文章中的图片边框
.posts-expand .post-body img {
border: 0;
}
// 缩小 margin-bottom
.posts-expand .post-meta {
margin: 3px 0 30px 0;
}

删除【某站正在使用畅言】

/themes/next/layout/_layout.swig : line 81

1
2
3
4
5
6
7
8
9
10
<script type="text/javascript">
var zzz=setInterval(clear_section_service_w,200);
function clear_section_service_w(){
if($('.section-service-w').length>0){
$('.section-service-w').html('');
clearInterval(zzz);
}
}
setTimeout(function(){clearInterval(zzz);},3000);
</script>