liupeng's blogs
环境搭建
版本环境:hexo3.8.0 + node12.17.0
https://www.cnblogs.com/fengxiongZz/p/7707219.html 搭建
https://www.cnblogs.com/fengxiongZz/p/7707568.html 进阶
https://www.cnblogs.com/chengxs/p/7496265.htmlhttps://www.cnblogs.com/sun-haiyu/p/7027093.html 美化
示例:
https://github.com/saucxs/saucxs.github.iocd blog2
npm config set registry https://registry.npm.taobao.org
npm config set registry http://registry.cnpmjs.org
npm info underscore (如果上面配置正确这个命令会有字符串response)
npm config get registrycnpm install hexo -g
hexo -v
hexo initnpm update
npm install
npm cache verify
hexo g
hexo s
hexo server -p 端口号 --》改变端口号hexo官网上下载自己喜欢的theme
新建一篇博客,并生成网页和部署到本地与服务器
npm rebuild node-sass
//npm install hexo-deployer-git --save //安装部署插件
npm install cnpm -g
cnpm install hexo-deployer-git --save
hexo new post "你好,Hexo"
hexo d -g //部署到github,并生成网页hexo clean //清理缓存
hexo g
gulp //静态资源压缩
hexo d //部署到本地cname文件配置
cnpm install hexo-generator-cname --save
在_config.yml中添加一条
url:https://liupeng2018.xyz
Plugins:
- hexo-generator-cname标签搜寻:
cnpm i hexo-generator-json-content --save
在_config.yml中添加一条
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true
搜索引擎收录
cnpm install hexo-generator-sitemap --save
cnpm install hexo-generator-baidu-sitemap --save
开启博客评论
<!-- 来必力City版安装代码 --> <div id="lv-container">创作不易,小小的支持一下吧!![]()
![]()