文章比较长,需要侧边栏目录的,可以点击我的个人博客地址:http://zwd596257180.gitee.io/blog
如果有什么问题想问的,请在 CSDN 上留言。
npm install hexo-cli -g
hexo init
hexo g
hexo s
git clone https://github.com/theme-next/hexo-theme-next.git
hexo new "此处输入文章名字"
---
title: a
date: 2019-04-14 23:10:17
---
hexo g
hexo new page categories
npm install hexo-generator-search --save
npm install hexo-generator-searchdb --save
search:
path: search.xml
field: post
format: html
limit: 10000
.site-author-image {
display: block;
margin: 0 auto;
padding: $site-author-image-padding;
max-width: $site-author-image-width;
height: $site-author-image-height;
border: $site-author-image-border-width solid $site-author-image-border-color;
/* 头像圆形 */
border-radius: 80px;
-webkit-border-radius: 80px;
-moz-border-radius: 80px;
box-shadow: inset 0 -1px 0 #333sf;
/* 设置循环动画 [animation: (play)动画名称 (2s)动画播放时长单位秒或微秒 (ase-out)动画播放的速度曲线为以低速结束
(1s)等待1秒然后开始动画 (1)动画播放次数(infinite为循环播放) ]*/
/* 鼠标经过头像旋转360度 */
-webkit-transition: -webkit-transform 1.0s ease-out;
-moz-transition: -moz-transform 1.0s ease-out;
transition: transform 1.0s ease-out;
}
img:hover {
/* 鼠标经过停止头像旋转
-webkit-animation-play-state:paused;
animation-play-state:paused;*/
/* 鼠标经过头像旋转360度 */
-webkit-transform: rotateZ(360deg);
-moz-transform: rotateZ(360deg);
transform: rotateZ(360deg);
}
/* Z 轴旋转动画 */
@-webkit-keyframes play {
0% {
-webkit-transform: rotateZ(0deg);
}
100% {
-webkit-transform: rotateZ(-360deg);
}
}
@-moz-keyframes play {
0% {
-moz-transform: rotateZ(0deg);
}
100% {
-moz-transform: rotateZ(-360deg);
}
}
@keyframes play {
0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(-360deg);
}
}
<script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js">script>
body{
background:url(/images/bg.jpg);
background-size:cover;
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
// 设置主题部分的透明度,具体看图
opacity: 0.8;
}
!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);
<script type="text/javascript" src="/js/src/clicklove.js">script>
auto_excerpt:
enable: true
length: 150
npm install --save hexo-generator-feed
# Extensions
## Plugins: http://hexo.io/plugins/
plugins: hexo-generate-feed
npm uninstall hexo-generator-index --save
npm install hexo-generator-index-pin-top --save
---
title: this is my first blog
date: 2019-04-14
top: 100
---
{% if post.top %}
<i class="fa fa-thumb-tack">i>
<font color=7D26CD>置顶font>
{% endif %}
# Wechat Subscriber
wechat_subscriber:
enable: true
qcode: /uploads/wechat-qcode.jpg
description: 欢迎您扫一扫上面的微信公众号,订阅我的博客!
{% if page.copyright %}
<div class="my_post_copyright">
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js">script>
<script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js">script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js">script>
<p><span>本文标题:span><a href="{{ url_for(page.path) }}">{{ page.title }}a>p>
<p><span>文章作者:span><a href="/" title="访问 {{ theme.author }} 的个人博客">{{ theme.author }}a>p>
<p><span>发布时间:span>{{ page.date.format("YYYY年MM月DD日 - HH:MM") }}p>
<p><span>最后更新:span>{{ page.updated.format("YYYY年MM月DD日 - HH:MM") }}p>
<p><span>原始链接:span><a href="{{ url_for(page.path) }}" title="{{ page.title }}">{{ page.permalink }}a>
<span class="copy-path" title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="{{ page.permalink }}" aria-label="复制成功!">i>span>
p>
<p><span>许可协议:span><i class="fa fa-creative-commons">i> 转载请保留原文链接及作者。p>
div>
<script>
var clipboard = new Clipboard('.fa-clipboard');
$(".fa-clipboard").click(function(){
clipboard.on('success', function(){
swal({
title: "",
text: '复制成功',
icon: "success",
showConfirmButton: true
});
});
});
script>
{% endif %}
.my_post_copyright {
width: 85%;
max-width: 45em;
margin: 2.8em auto 0;
padding: 0.5em 1.0em;
border: 1px solid #d3d3d3;
font-size: 0.93rem;
line-height: 1.6em;
word-break: break-all;
background: rgba(255,255,255,0.4);
}
.my_post_copyright p{margin:0;}
.my_post_copyright span {
display: inline-block;
width: 5.2em;
color: #b5b5b5;
font-weight: bold;
}
.my_post_copyright .raw {
margin-left: 1em;
width: 5em;
}
.my_post_copyright a {
color: #808080;
border-bottom:0;
}
.my_post_copyright a:hover {
color: #a3d2a3;
text-decoration: underline;
}
.my_post_copyright:hover .fa-clipboard {
color: #000;
}
.my_post_copyright .post-url:hover {
font-weight: normal;
}
.my_post_copyright .copy-path {
margin-left: 1em;
width: 1em;
+mobile(){display:none;}
}
.my_post_copyright .copy-path:hover {
color: #808080;
cursor: pointer;
}
<div>
{% if not is_index %}
{% include 'my-copyright.swig' %}
{% endif %}
div>
@import "my-post-copyright"
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
hexo clean
hexo s
npm install hexo-wordcount --save
<div class="theme-info">
<div class="powered-by">div>
<span class="post-count">博客全站共{{ totalcount(site) }}字span>
div>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js">script>
<div class="powered-by">
<i class="fa fa-user-md">i>
<span id="busuanzi_container_site_pv">
本站访问量:<span id="busuanzi_value_site_pv">span>次
span>
<span class="post-meta-divider">|span>
<span id="busuanzi_container_site_uv">
本站总访客量:<span id="busuanzi_value_site_uv">span>人
span>
div>
// 文章内链接文本样式
.post-body p a{
color: #0593d3; //原始链接颜色
border-bottom: none;
border-bottom: 1px solid #0593d3; //底部分割线颜色
&:hover {
color: #fc6423; //鼠标经过颜色
border-bottom: none;
border-bottom: 1px solid #fc6423; //底部分割线颜色
}
}
在主题文件下的 _config.yml 配置文件中,定位到 busuanzi_count,把 enable 的值修改为 true。
# Show Views / Visitors of the website / page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi
busuanzi_count:
enable: true
total_visitors: true
total_visitors_icon: user
total_views: true
total_views_icon: eye
post_views: true
post_views_icon: eye
# LiveRe comments system
# You can get your uid from https://livere.com/insight/myCode (General web site)
livere_uid: MTAyM8888888888DI3OQ==
git config --global user.name空格+你的码云的名字
git config --global user.email空格+你的码云的邮箱
npm install hexo-deployer-git --save
hexo g
hexo deploy
hexo clean
hexo g
hexo d
https://www.jianshu.com/p/13f5e4d7099d
http://theme-next.iissnan.com/theme-settings.html#rss
https://www.jianshu.com/p/9f0e90cc32c2
https://www.simon96.online/2018/10/12/hexo-tutorial/