栏目分类:
子分类:
返回
终身学习网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
终身学习网 > IT > 软件开发 > 后端开发 > Java

Hexo搭建个人博客

Java 更新时间:发布时间: 百科书网 趣学号

引用:https://blog.csdn.net/yin188103/article/details/104545544
他用的gitee ,但是gitee需要实名认证,果断放弃

windows上安装Hexo

Hexo需要提前安装
node.js 和git

npm install -g hexo-cli
设置镜像
npm config set registry https://registry.npm.taobao.org
npm info underscore
新建一个空目录,并cd进目录执行初始化
hexo init
init完成后执行
npm install
安装完成后,hexo server 启动服务器
localhost:4000 访问

新建博客

hexo new  [layout]
</pre> 
<p>生成网页文件</p> 
<pre class='brush:php;toolbar:false'>hexo generator
</pre> 
<p>启动服务器</p> 
<pre class='brush:php;toolbar:false'>hexo server
</pre> 
使用icarus主题 
<p>主题地址:https://github.com/ppoffice/hexo-theme-icarus<br /> 下载icarus主题,将主题解压到themes文件夹,,<br /> <br /> 修改配置文件 _config.yml 将主题改为icarus,并定义站点的基本信息</p> 
<pre class='brush:php;toolbar:false'># Site
title: waterkid  
subtitle: 'hexo博客'
description: '个人技术博客'
keywords: java,web
author: chenjie
language: zh-CN
timezone: Asia/Shanghai
</pre> 
<p>在icarus主题的配置文件 _config.yml 中设置博客头像,昵称签名等:</p> 
<pre class='brush:php;toolbar:false'>## Navigation bar link settings
# Navigation bar link settings
navbar:
    # Navigation bar menu links
    menu:
        主页: /
        归档: /archives
        分类: /categories
        标签: /tags
        关于: /about
 
 
article:
    # Code highlight settings
    highlight:
        # Code highlight themes
        # https://github.com/highlightjs/highlight.js/tree/master/src/styles
        theme: atom-one-light
        # Show code copying button
        clipboard: true
        # Default folding status of the code blocks. Can be "", "folded", "unfolded"
        fold: unfolded
    # Whether to show article thumbnail images
    thumbnail: true
 
 
# Share plugin settings
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share
share:
    # Share plugin name
    type: sharejs
 
 
# Sidebar widget settings
# https://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/
widgets:
    -
        # Widget name
        type: profile
        # Where should the widget be placed, left or right
        position: left
        # Author name to be shown in the profile widget
        author: waterkid
        # Title of the author to be shown in the profile widget
        author_title: 人之所以能,是相信能
        # Author's current location to be shown in the profile widget
        location: 成都
        # Path or URL to the avatar to be shown in the profile widget
        avatar: /images/1.png
</pre> 
<p>写博客设置分类,标签</p> 
<pre class='brush:php;toolbar:false'>title: 第一篇博客
date: 2021-09-20 21:40:52
thumbnail: /images/1.png
tags: java
categories: hello
</pre> 
将博客和github绑定在一起 
<p>在github上开启网页展示项目:</p> 
<p>在配置文件中设置远程地址:<br /> </p> 
<pre class='brush:php;toolbar:false'># URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://water-kid.github.io
root: /blog
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

</pre> 
<p>访问:<br /> </p> 
<hr /> 
<p>给博客绑定自己的域名:<br /> 设置为cname,,将以前的网站指定到这个网站<br /> <br /> 配置文件修改为现在的域名:<br /> </p> 
<p>在github上设置你要绑定自己的域名:<br /> <br /> </p></div>
<div style="clear: both;"></div>
<div class="author-info fl">
<div><span class="gray">转载请注明:</span>文章转载自 <a href="http://www.051e.com/" class="blue">www.051e.com</a></div>
<div><span class="gray">本文地址:</span><a href="http://www.051e.com/it/270141.html" class="blue">http://www.051e.com/it/270141.html</a></div>
</div>
<div class="prev fl">
<p>   <a style='text-align:left;' class='center-block text-center glyphicon glyphicon-collapse-down' href="http://www.051e.com/it/270132.html">上一篇  详解 八大排序</a>
 </p>
<p>   <a style='text-align:left;' class='center-block text-center glyphicon glyphicon-collapse-down' href="http://www.051e.com/it/270139.html">下一篇  大数据学习——Hadoop单机模式的搭建(超详细)</a>
  </p>
</div>
<div class="new_tag fl">
</div>
</div>
<div class="new_r fr" style="border-radius:10px;">
<div class="tui fl">
<h3>Java相关栏目本月热门文章</h3>
<ul>
  <li><span>1</span><a href="http://www.051e.com/it/1077902.html" title="JPA+QueryDSL">JPA+QueryDSL</a></li>
  <li><span>2</span><a href="http://www.051e.com/it/1077892.html" title="Cookie、Session、Token之间的区别到底在哪?">Cookie、Session、Token之间的区别到底在哪?</a></li>
  <li><span>3</span><a href="http://www.051e.com/it/1077888.html" title="springBoot使用自定义注解实现复杂校验">springBoot使用自定义注解实现复杂校验</a></li>
  <li><span>4</span><a href="http://www.051e.com/it/1077899.html" title="Mybatis-plus学习笔记---乐观锁、逻辑删除、代码自动生成器等">Mybatis-plus学习笔记---乐观锁、逻辑删除、代码自动生成器等</a></li>
  <li><span>5</span><a href="http://www.051e.com/it/1077896.html" title="反射Field、Method、Constructor">反射Field、Method、Constructor</a></li>
  <li><span>6</span><a href="http://www.051e.com/it/1077885.html" title="Servlet+mybatis整合Web项目">Servlet+mybatis整合Web项目</a></li>
  <li><span>7</span><a href="http://www.051e.com/it/1077884.html" title="SLF4j的介绍与使用+SpringBoot日志配置">SLF4j的介绍与使用+SpringBoot日志配置</a></li>
  <li><span>8</span><a href="http://www.051e.com/it/1077880.html" title="MybatisPlus【SpringBoot】 2 入门案例">MybatisPlus【SpringBoot】 2 入门案例</a></li>
  <li><span>9</span><a href="http://www.051e.com/it/1077898.html" title="IntelliJ IDEA 2022免费激活码正规申请方法(IDEA官方激活注册码)">IntelliJ IDEA 2022免费激活码正规申请方法(IDEA官方激活注册码)</a></li>
  <li><span>10</span><a href="http://www.051e.com/it/1077894.html" title="Qt多线程编程简介">Qt多线程编程简介</a></li>
  <li><span>11</span><a href="http://www.051e.com/it/1077890.html" title="商品管理模块微服务demo">商品管理模块微服务demo</a></li>
  <li><span>12</span><a href="http://www.051e.com/it/1077883.html" title="移动开发技术作业2">移动开发技术作业2</a></li>
  <li><span>13</span><a href="http://www.051e.com/it/1077875.html" title="SpringCloud 之OpenFeign 自定义配置和使用/自定义拦截器">SpringCloud 之OpenFeign 自定义配置和使用/自定义拦截器</a></li>
  <li><span>14</span><a href="http://www.051e.com/it/1077897.html" title="关于前端安全性那些事">关于前端安全性那些事</a></li>
  <li><span>15</span><a href="http://www.051e.com/it/1077895.html" title="JSP超市管理系统myeclipse定制开发SQLServer数据库网页模式java编程jdbc">JSP超市管理系统myeclipse定制开发SQLServer数据库网页模式java编程jdbc</a></li>
  <li><span>16</span><a href="http://www.051e.com/it/1077889.html" title="java---数位dp---计数问题(每日一道算法2022.10.21)">java---数位dp---计数问题(每日一道算法2022.10.21)</a></li>
  <li><span>17</span><a href="http://www.051e.com/it/1077886.html" title="在javaweb项目中进行添加的时候,下拉框选中的数据怎末进行保存呢">在javaweb项目中进行添加的时候,下拉框选中的数据怎末进行保存呢</a></li>
  <li><span>18</span><a href="http://www.051e.com/it/1077879.html" title="移动开发课程-作业二">移动开发课程-作业二</a></li>
  <li><span>19</span><a href="http://www.051e.com/it/1077876.html" title="基本数据类型转换(java)">基本数据类型转换(java)</a></li>
  <li><span>20</span><a href="http://www.051e.com/it/1077871.html" title="Spring Boot工程配置多数据源,Cannot resolve configuration property dynamic">Spring Boot工程配置多数据源,Cannot resolve configuration property dynamic</a></li>
</ul>
</div>
</div>
</div>
<!-- 公共尾部 -->
<div class="link main">
<div class="link_tit">
<span class="on">热门相关搜索</span>
</div>
<div class="link_tab">
<div class="link_con">
<a href="http://www.051e.com/TAG_1/beijingyinshuaxueyuanpaiming.html">北京印刷学院排名</a>
<a href="http://www.051e.com/TAG_1/beifanggongyedaxuepaiming.html">北方工业大学排名</a>
<a href="http://www.051e.com/TAG_1/beijinghangkonghangtiandaxuepaiming.html">北京航空航天大学排名</a>
<a href="http://www.051e.com/TAG_1/shoudoujingjimaoyidaxuepaiming.html">首都经济贸易大学排名</a>
<a href="http://www.051e.com/TAG_1/zhongguochuanmeidaxuepaiming.html">中国传媒大学排名</a>
<a href="http://www.051e.com/TAG_1/shoudoushifandaxuepaiming.html">首都师范大学排名</a>
<a href="http://www.051e.com/TAG_1/zhongguodezhidaxue(beijing)paiming.html">中国地质大学(北京)排名</a>
<a href="http://www.051e.com/TAG_1/beijingxinxikejidaxuepaiming.html">北京信息科技大学排名</a>
<a href="http://www.051e.com/TAG_1/zhongyangminzudaxuepaiming.html">中央民族大学排名</a>
<a href="http://www.051e.com/TAG_1/zhongguohuquxueyuanpaiming.html">中国戏曲学院排名</a>
<a href="http://www.051e.com/TAG_1/hebeizhengfazhiyexueyuanpaiming.html">河北政法职业学院排名</a>
<a href="http://www.051e.com/TAG_1/hebeijingmaodaxuepaiming.html">河北经贸大学排名</a>
<a href="http://www.051e.com/TAG_1/tianjinzhongdeyingyongjishudaxuepaiming.html">天津中德应用技术大学排名</a>
<a href="http://www.051e.com/TAG_1/tianjinyixuegaodengzhuankexuejiaopaiming.html">天津医学高等专科学校排名</a>
<a href="http://www.051e.com/TAG_1/tianjinmeishuxueyuanpaiming.html">天津美术学院排名</a>
<a href="http://www.051e.com/TAG_1/tianjinyinlexueyuanpaiming.html">天津音乐学院排名</a>
<a href="http://www.051e.com/TAG_1/tianjingongyedaxuepaiming.html">天津工业大学排名</a>
<a href="http://www.051e.com/TAG_1/beijinggongyedaxuegengdanxueyuanpaiming.html">北京工业大学耿丹学院排名</a>
<a href="http://www.051e.com/TAG_1/beijingjingchaxueyuanpaiming.html">北京警察学院排名</a>
<a href="http://www.051e.com/TAG_1/tianjinkejidaxuepaiming.html">天津科技大学排名</a>
<a href="http://www.051e.com/TAG_1/tielingweishengzhiyexueyuanpaiming.html">铁岭卫生职业学院排名</a>
<a href="http://www.051e.com/TAG_1/shenyangbeiruanxinxizhiyejishuxueyuanpaiming.html">沈阳北软信息职业技术学院排名</a>
<a href="http://www.051e.com/TAG_1/jilinyishuxueyuanpaiming.html">吉林艺术学院排名</a>
<a href="http://www.051e.com/TAG_1/jilintiyoxueyuanpaiming.html">吉林体育学院排名</a>
<a href="http://www.051e.com/TAG_1/baichengshifanxueyuanpaiming.html">白城师范学院排名</a>
<a href="http://www.051e.com/TAG_1/tonghuashifanxueyuanpaiming.html">通化师范学院排名</a>
<a href="http://www.051e.com/TAG_1/jilinnongyedaxuepaiming.html">吉林农业大学排名</a>
<a href="http://www.051e.com/TAG_1/changchundianzikejixueyuanpaiming.html">长春电子科技学院排名</a>
<a href="http://www.051e.com/TAG_1/jilingongyezhiyejishuxueyuanpaiming.html">吉林工业职业技术学院排名</a>
<a href="http://www.051e.com/TAG_1/jilinsifajingguanzhiyexueyuanpaiming.html">吉林司法警官职业学院排名</a>
<a href="http://www.051e.com/TAG_1/jilinjingchaxueyuanpaiming.html">吉林警察学院排名</a>
<a href="http://www.051e.com/TAG_1/changchunjiankangzhiyexueyuanpaiming.html">长春健康职业学院排名</a>
<a href="http://www.051e.com/TAG_1/jilinshuilidianlizhiyexueyuanpaiming.html">吉林水利电力职业学院排名</a>
<a href="http://www.051e.com/TAG_1/daqingshifanxueyuanpaiming.html">大庆师范学院排名</a>
<a href="http://www.051e.com/TAG_1/heilongjiangdaxuepaiming.html">黑龙江大学排名</a>
<a href="http://www.051e.com/TAG_1/haerbinjianqiaoxueyuanpaiming.html">哈尔滨剑桥学院排名</a>
<a href="http://www.051e.com/TAG_1/haerbintiedaozhiyejishuxueyuanpaiming.html">哈尔滨铁道职业技术学院排名</a>
<a href="http://www.051e.com/TAG_1/haerbinyingyongzhiyejishuxueyuanpaiming.html">哈尔滨应用职业技术学院排名</a>
<a href="http://www.051e.com/TAG_1/heilongjiangminzuzhiyexueyuanpaiming.html">黑龙江民族职业学院排名</a>
<a href="http://www.051e.com/TAG_1/qitaihezhiyexueyuanpaiming.html">七台河职业学院排名</a>
<a href="http://www.051e.com/TAG_1/heilongjiangshengtaigongchengzhiyexueyuanpaiming.html">黑龙江生态工程职业学院排名</a>
<a href="http://www.051e.com/TAG_1/huadongshifandaxuepaiming.html">华东师范大学排名</a>
<a href="http://www.051e.com/TAG_1/shanghaijiankangyixueyuanpaiming.html">上海健康医学院排名</a>
<a href="http://www.051e.com/TAG_1/huadongligongdaxuepaiming.html">华东理工大学排名</a>
<a href="http://www.051e.com/TAG_1/shanghaijiaotongdaxuepaiming.html">上海交通大学排名</a>
<a href="http://www.051e.com/TAG_1/tongjidaxuepaiming.html">同济大学排名</a>
<a href="http://www.051e.com/TAG_1/fudandaxuepaiming.html">复旦大学排名</a>
<a href="http://www.051e.com/TAG_1/shanghaishadaxueyuanpaiming.html">上海杉达学院排名</a>
<a href="http://www.051e.com/TAG_1/shanghaihujuxueyuanpaiming.html">上海戏剧学院排名</a>
<a href="http://www.051e.com/TAG_1/shanghaiyinlexueyuanpaiming.html">上海音乐学院排名</a>
</div>
</div>
</div>
<div class="footer">
<div class="dl_con">
<div class="width1200">
<dl>
<dt>学习工具</dt>
<dd><a href="http://www.051e.com/tools/algebra/" title="代数计算器">代数计算器</a></dd>
<dd><a href="http://www.051e.com/tools/trigonometry/" title="三角函数计算器">三角函数</a></dd>
<dd><a href="http://www.051e.com/tools/analytical/" title="解析几何">解析几何</a></dd>
<dd><a href="http://www.051e.com/tools/solidgeometry/" title="立体几何">立体几何</a></dd>
</dl>
<dl>
<dt>知识解答</dt>
<dd><a href="http://www.051e.com/ask/1033/"  title="教育知识">教育知识</a></dd>
<dd><a href="http://www.051e.com/ask/1180/"  title="百科知识">百科知识</a></dd>
<dd><a href="http://www.051e.com/ask/1155/"  title="生活知识">生活知识</a></dd>
<dd><a class="http://www.051e.com/ask/1199/"  title="常识知识">常识知识</a></dd>
</dl>
<dl>
<dt>写作必备</dt>
<dd><a href="http://www.051e.com/zuowen/1128/" title="作文大全">作文大全</a></dd>
<dd><a href="http://www.051e.com/zuowen/1130/" title="作文素材">作文素材</a></dd>
<dd><a href="http://www.051e.com/zuowen/1132/" title="句子大全">句子大全</a></dd>

<dd><a href="http://www.051e.com/zuowen/1154/" title="实用范文">实用范文</a></dd>
</dl>
<dl class="mr0">
<dt>关于我们</dt>
<dd><a href="http://www.051e.com/about/index.html" title="关于我们" rel="nofollow">关于我们</a></dd>
<dd><a href="http://www.051e.com/about/contact.html" title="联系我们" rel="nofollow">联系我们</a></dd>
<dd><a href="http://www.051e.com/sitemap/" title="网站地图">网站地图</a></dd>
</dl>
</div>
</div>
<div class="copyright">
<p>终身学习网 版权所有 ©2023-2025  051e.com     ICP备案号:<a href="https://beian.miit.gov.cn" rel="nofollow">京ICP备12030808号</a>
 </p>
</div>
</div>
<!-- 手机端 -->
<div class="m_foot_top">
<img src="http://www.051e.com/foot.gif" width="192" height="27" alt="我们一直用心在做"><br/>
<a href="http://www.051e.com/about/index.html">关于我们</a>
<a href="http://www.051e.com/archiver/">文章归档</a>
<a href="http://www.051e.com/sitemap">网站地图</a>
<a href="http://www.051e.com/about/contact.html">联系我们</a>
<p>版权所有 ©2023-2025  051e.com</p>
<p>ICP备案号:<a href="http://beian.miit.gov.cn/" rel="nofollow">京ICP备12030808号</a></p>
</div>
<div class="to_top" style="display:none;"><img src="http://www.051e.com/skin/sinaskin/kaotop/picture/to_top.png"></div>
<!--广告!-->
<script type="text/javascript" src="http://www.051e.com/skin/sinaskin/kaotop/js/top.js"></script>
<script src="http://www.051e.com/skin/sinaskin/kaotop/js/fixed.js" type="text/javascript"></script>
<!--头条搜索!-->
<script>
(function(){
var el = document.createElement("script");
el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?8e970cc56ab71c9869c17b8be046b3a9faa0a1af957d4e0e671a1c8a287d098bfd9a9dcb5ced4d7780eb6f3bbd089073c2a6d54440560d63862bbf4ec01bba3a";
el.id = "ttzz";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(el, s);
})(window)
</script>
<!--头条搜索结束!-->
<!--百度推送!-->
<script>
(function(){
    var bp = document.createElement('script');
    bp.src = '//push.zhanzhang.baidu.com/push.js';
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<!--百度推送结束!-->
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?debd760bceebed9e0328bf80f349ab68";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</div>
</div>
<script type="text/javascript">
$(".alert_kf").click(function() {
      mantis.requestChat();
 });
</script>
<script type="text/javascript">
var mySwiper_weixin = new Swiper('.pc_swiper_weixin', {
autoplay: 3000, //可选选项,自动滑动
loop: true,
speed: 1000,
pagination: '.swiper-pagination',
paginationClickable: true,
})
</script>
<script type="text/javascript">
$(function() {
$(window).scroll(function() {
if ($(window).scrollTop() > 100) {
$(".to_top").fadeIn(1000);
} else {
$(".to_top").fadeOut(1000);
}
});
$(".to_top").click(function() {
if ($('html').scrollTop()) {
$('html').animate({
scrollTop: 0
}, 300);
return false;
}
$('body').animate({
scrollTop: 0
}, 300);
return false;
});
});
</script>
</body>
</html>