自定义页面
以404页面为例
执行命令
$ hexo new page "404"
INFO Created: D:\Hexo\Hexo\source\404\index-1.md
编写代码如下:
title: 404 Not Found:该页无法显示
comments: false
permalink: /404
fancybox: false
---
<style type="text/css">
.article-title {
font-size: 2.1em;
}
strong a {
color: #747474;
}
.share {
display: none;
}
.player {
margin-left: -10px;
}
.sign {
text-align: right;
font-style: italic;
}
#page-visit {
display: none;
}
.center {
text-align: center;
height: 2.5em;
font-weight: bold;
}
.search2 {
height: 2.2em;
font-size: 1em;
width: 50%;
margin: auto 24%;
color: #727272;
opacity: .6;
border: 2px solid lightgray;
}
.search2:hover {
opacity: 1;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3)
};
.article-entry hr {
margin: 0;
}
.pic {
text-align: center;
margin: 0;
}
.pic br {
display: none;
}
</style>
***
<div class="pic">
<img src="/img/404.jpg" title="Mihawk-Wind">
</div>
<p class="center">很抱歉,您所访问的地址并不存在: </p>
<p class="center"><a href="/">回主页</a> · <a href="/archives">所有文章</a> · <a href="/about">关于</a></p>
<p class="center">可在边栏搜索框中对本站进行检索,以获取相关信息。</p>
<div style="text-align: center">
以下是博主喜欢的一些歌曲,可以听听,稍作休息~
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=320 height=330 src="http://music.163.com/outchain/player?type=0&id=112513213&auto=0&height=430"></iframe>
</div>