安装前提

参考博客:http://blog.csdn.net/gdutxiaoxu/article/details/53576018#t5(写的很好,不用看我的了.....)

这篇:http://www.cnblogs.com/liuxianan/p/build-blog-website-by-hexo-github.html

安装 Hexo 相当简单。然而在安装前,您必须检查电脑中是否已安装下列应用程序:

 hexo 文档(https://hexo.io/zh-cn/docs/) 

可以通过

node -v 

git -v 查看是否安装

安装hexo:

$ npm install -g hexo-cli

新建hexo_site 站点并进入:

hexo init hexo_site

以下操作在hexo_site文件夹中进行:

新建一篇文章。如果没有设置 layout 的话,默认使用 _config.yml 中的 default_layout 参数代替。如果标题包含空格的话,请使用引号括起来。

next主题官网: http://theme-next.iissnan.com/getting-started.html

hexo 中文文档:https://hexo.io/zh-cn/docs/index.html

github和hexo关联关键:

同样在_config.yml文件中,找到Deployment,然后按照如下修改:

deploy:
type: git
repo: git@github.com:yourname/yourname.github.io.git
branch: master

如果没有执行者行命令,将会提醒

deloyer not found:git

  • 1)注意需要提前安装一个扩展:
npm install hexo-deployer-git --save
 

使用 Hexo 插件插入音乐/视频

两个好用的hexo插件:

**hexo-tag-aplayer:https://github.com/grzhan/hexo-tag-aplayer)

**hexo-tag-dplayer: https://github.com/NextMoe/hexo-tag-dplayer

切换到hexo目录,运行:


1
npm install hexo-tag-aplayer@2.0.1

这里直接运行npm install hexo-tag-aplayer只会安装2.0.0,这个版本会出现以下错误:


1
2
FATAL Cannot find module '/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/hexo-tag-aplayer'
Error: Cannot find module '/Users/hechao/Documents/TechBlog/CniceToUpp/nod

aplayer
播放视频的dplayer 使用npm安装:
npm install hexo-tag-dplayer 在markdown内添加以下代码: {% dplayer "url=http://home.ustc.edu.cn/~mmmwhy/GEM.mp4" "pic=http://home.ustc.edu.cn/~mmmwhy/GEM.jpg" "loop=yes" "theme=#FADFA3" "autoplay=false" "token=tokendemo" %}

迁移hexo 博客 参考网址:
https://www.cnblogs.com/study-everyday/p/8902136.html
1. 查看远程分支: git branch -a

2. 查看本地分支: git branch 

3. 切换分支: git checkout -b origin/source
拉取本地不存在的远程分支:、
git checkout -b 本地分支名 origin/远程分支名
git checkout -b source origin/source

这个将会自动创建一个新的本地分支,并与指定的远程分支关联起来

 
 

Hexo+Github 搭建属于自己的博客(Mac下安装 其他操作系统大同小异)的更多相关文章

  1. 使用Hexo+Github搭建属于自己的博客(进阶)

    主题的配置:这里以NexT主题作为题材 1.安装NexT,在其文件夹中鼠标右键,点击Git Base Here.输入命令:git clone https://github.com/iissnan/he ...

  2. 使用Hexo+Github搭建属于自己的博客(基础)

    前言 hexo是一个台湾人做的基于Node.js的静态博客程序,优势是生成静态文件的速度非常快,支持markdown, 我最终选定它的原因是它速度快而且不容易出错,并且可以一键部署到github或者其 ...

  3. 使用Hexo+Github搭建属于自己的博客

    工具:Visual Studio Code/MarkdownPad技术:Hexo+Github 创建Github项目 Github账户注册和新建项目,项目必须要遵守格式:账户名.github.io,不 ...

  4. 使用Hexo & Github,搭建属于自己的博客

    经过在网上各种找资料,踩过各种坑,终于搭建好了hexo,直接与gitbub一起使用,搭建起自己的免费的博客. 关于Hexo Hexo是一款基于Node.js的静态博客框架. Hexo特性 风一般的速度 ...

  5. HEXO+Github,搭建属于自己的博客

    摘录自:http://www.jianshu.com/p/465830080ea9 1. github的准备 账号 密码 建立Repository建立与你用户名对应的仓库,仓库名必须为[your_us ...

  6. 手把手教你使用Hexo+GitHub搭建自己的个人博客网站

    安装nodejs环境 这个直接搜索安装即可,安装完成之后,通过如下命令检测环境变量是否安装成功: λ node -v # 输出版本号 v12.13.1 正确输入版本号即可. 安装cnpm cnpm是淘 ...

  7. 使用Github+Hexo框架搭建部署自己的博客

    前言 Hexo 是一个快速.简洁且高效的博客框架.Hexo 使用 Markdown (或其他渲染引擎 )解析文章, 在几秒内,即可利用靓丽的主题生成静态网页. 安装 安装前提 安装 Hexo 相当简单 ...

  8. github+hexo+themes搭建简易个性主题博客

    0x00  install Node.js and git 安装Node.js:http://www.runoob.com/nodejs/nodejs-install-setup.html 安装git ...

  9. hexo + Github Page 0元建立博客攻略

    传送门: 5分钟 0元搭建个人独立博客网站(一):https://mp.weixin.qq.com/s/69isJE191WV2gaVbjrwTtw 5分钟 0元搭建个人独立博客网站(二):https ...

随机推荐

  1. Jquery loading 效果

    function showLoad(tipInfo) { var eTip = document.createElement('div'); eTip.setAttribute('id', 'tipD ...

  2. Codeforces 617 E. XOR and Favorite Number

    题目链接:http://codeforces.com/problemset/problem/617/E 一看这种区间查询的题目,考虑一下莫队. 如何${O(1)}$的修改和查询呢? 令${f(i,j) ...

  3. Mac系统配置JDK环境变量

    1.安装 因为并非所有用户都用得着 Java ,所以在默认状态下 OS X 不预装 Java , 如果你需要的话可以手动安装. 到 Oracle 下载最新版的 Java 8 JDK 安装,安装目录可通 ...

  4. C# 整理DotNetBar中SuperGridControl的一些基础属性

    //控制表格只能选中单行 superGridControl1.PrimaryGrid.MultiSelect = false; superGridControl1.PrimaryGrid.Initia ...

  5. Spring中JdbcTemplate使用RowMapper

    package com.cxl.demo.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.util. ...

  6. zzulioj 1206 字符串的修改 (字符串修改)

    不难,理解一下直接过,代码如下: #include<stdio.h> #include<string.h> #include<math.h> #include< ...

  7. [原][unreal][UE][spark]分析unreal engine 虚幻引擎的粒子编辑器:Cascade

    参考:https://www.raywenderlich.com/270-unreal-engine-4-particle-systems-tutorial (使用了一个飞机射击游戏的粒子来展示,全英 ...

  8. 力扣(LeetCode) 771. 宝石与石头

    给定字符串J 代表石头中宝石的类型,和字符串 S代表你拥有的石头. S 中每个字符代表了一种你拥有的石头的类型,你想知道你拥有的石头中有多少是宝石. J 中的字母不重复,J 和 S中的所有字符都是字母 ...

  9. sort-归并排序

    void sort_merge(vector<int> &v,int left,int right) { if(left>=right) return; int mid=(l ...

  10. PCB板的三种敷铜方法解析

    1 do not pour over all same net objects:仅仅对相同网络的焊盘进行连接,其他如覆铜.导线不连接. 2 pour over all same net objects ...