hexo cl && hexo g && hexo d
访问用户: 人
访问次数: 次
博客全站共: {{ totalcount(site) }} 字
api.leancloud.cn/1.1/classes/Comment:1 Failed to load resource:net::ERR_CONNECTION_RESET
如果没有收录,可以到此网站提交申请,验证网站,验证成功网站后,我们可以使用自动推送,让百度可以收录我们博客的所有网页
百度收录验证时如果选择第一种方式验证就是把 baidu_verify_6j6lLVHSN7.html放在blog的根目录
但是放在根目录会有一个问题,hexo会为此html自动渲染,添加了不必要的东西,此时,百度验证会不通过,我们要在此html中顶部添加以下内容,hexo才不会为此html自动渲染。
---
layout: false
---
npm install hexo-generator-sitemap --save
npm install hexo-generator-baidu-sitemap --save
# 自动生成sitemap
sitemap:
path: sitemap.xml
baidusitemap:
path: baidusitemap.xml
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: true
{% if theme.baidu_push %}
{% endif %}
这样子的话每次访问博客中的页面会自动向百度提交。
rewrite ^(.*) https://xxx.cn$1 permanent; #重定向https访问
server {
listen 443;
server_name www.xxx.cn;
rewrite ^(.*) https://xxx.cn$1 permanent; #重定向https访问
}
server {
listen 443 default_server ssl;
载入天数...载入时分秒...
//底部爱心小图标跳动
keyframes heartAnimate {
0%,100%{transform:scale(1);}
10%,30%{transform:scale(0.9);}
20%,40%,60%,80%{transform:scale(1.1);}
50%,70%{transform:scale(1.1);}
}
//图标所对应的span中的ID
#heart {
animation: heartAnimate 1.33s ease-in-out infinite;
}
.with-love {
color: rgb(255, 113, 113);
}
https://github.com/MikeCoder/hexo-blog-encrypt/blob/master/ReadMe.md
"hexo-blog-encrypt": "2.0.*"
# Security
encrypt:
enable: true
---
title: testPass
date: 2018-07-26 00:00:00
password: 123456
abstract: 这是一篇加密的文章。
message: enter password to read.
---
'use strict';
var pagination = require('hexo-pagination');
module.exports = function(locals){
var config = this.config;
var posts = locals.posts;
posts.data = posts.data.sort(function(a, b) {
if(a.top && b.top) { // 两篇文章top都有定义
if(a.top == b.top) return b.date - a.date; // 若top值一样则按照文章日期降序排
else return b.top - a.top; // 否则按照top值降序排
}
else if(a.top && !b.top) { // 以下是只有一篇文章top有定义,那么将有top的排在前面
return -1;
}
else if(!a.top && b.top) {
return 1;
}
else return b.date - a.date; // 都没定义按照文章日期降序排
});
var paginationDir = config.pagination_dir || 'page';
return pagination('', posts, {
perPage: config.index_generator.per_page,
layout: ['index', 'archive'],
format: paginationDir + '/%d/',
data: {
__index: true
}
});
};