学习搭建个人博客

1
2
3
function test(){
console.log("Hello world!");
}

这个需要使用c进行截断,<!-- more -->上面的内容就是显示在主页的摘要,把图片放在<!-- more -->上面就可以了。

1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<html>
<head>
<mate charest="utf-8" />
<title>Hello world!</title>
</head>
<body>
<h1>Hello world!</h1>
</body>
</html>

https://pandao.github.io/editor.md/ 在线md编辑器 比较好用

Hexo 是一个基于nodejs 的静态博客网站生成器,作者是来自台湾的 Tommy Chen

https://www.jianshu.com/p/380290deb8f0 学习搭建 但是在构建的时候有问题

https://www.cnblogs.com/liuxianan/p/build-blog-website-by-hexo-github.html 使用这个构建

https://www.jianshu.com/p/61987cec0fad# 这个也可以构建

https://www.jianshu.com/p/4fbc57269f1b 修改底部样式和文字

http://tc9011.com/2017/02/02/hexo文章添加版权声明及一些特效/

教程

https://www.cnblogs.com/visugar/p/6821777.html

换电脑后 从git拉下来后 依次执行 npm install hexo、npm install、npm install hexo-deployer-git

主题文件可能会丢失 git clone https://github.com/iissnan/hexo-theme-next themes/next

http://blog.csdn.net/ESA_DSQ/article/details/78604943

http://blog.csdn.net/jiaqiangbandongg/article/details/77151699 添加小功能

https://www.jianshu.com/p/5888bd91d070?open_source=weibo_search

添加评论 https://segmentfault.com/a/1190000009544924 添加多功能

1
2
3
hexo clean #清除缓存 网页正常情况下可以忽略此条命令
hexo g #生成静态网页
hexo d #开始部署

也可以一次性执行
hexo clean && hexo g && hexo d

hexo s 运行代码

需要ssh配置 完后需要输入

1
2
git config --global user.name "idrnyu"
git config --global user.email "834999326@qq.com"

使用 ssh 提交的话

1
2
git@github.com:idrnyu/idrnyu.github.io.git  中间的:需要修改为/
git@github.com/idrnyu/idrnyu.github.io.git


Local Search 由 flashlab 贡献
添加百度/谷歌/本地 自定义站点内容搜索

安装 hexo-generator-searchdb,在站点的根目录下执行以下命令:

1
$ npm install hexo-generator-searchdb --save

编辑 站点配置文件,新增以下内容到任意位置:

search:
    path: search.xml
    field: post
    format: html
    limit: 10000

编辑 主题配置文件,启用本地搜索功能:

# Local search
    local_search:
    enable: true
------------- END ---- 感谢您的阅读 -------------