Termux搭建hexo博客并部署到GitHub

安装

termux-change-repo
apt update
apt install git && nodejs && vim
apt update
npm install hexo -g
mkdir hexo
hexo init hexo
cd hexo
hexo server

部署到GitHub

安装sah

apt install openssh

生成ssh key

ssh-keygen -t rsa -C "你注册Github用的邮箱"

然后回车

ssh-keygen -t rsa -C "你的邮箱"
# Creates a new ssh key using the provided email
Generating public/private rsa key pair.
Enter file in which to save the key (/your_home_path/.ssh/id_rsa):

再回车

Enter passphrase (empty for no passphrase): [你的密码]

Enter same passphrase again: [你的密码]
你输入的内容是不会显示的

输密码

确认密码

然后查看key的内容

 vim ~/.ssh/id_rsa.pub

把内容全部复制下来,打开https://github.com/settings/keys

点new

title随便填

key就填你ssh key里的内容

然后

npm install hexo-deployer-git --save

然后

vim _config.yml

在里面找到并修改

deploy:
type: git
repo: git仓库项目地址
branch: 分支

还有

url: https://用户名.github.io/
root: /

点ESC输:wq退出来

然后

git config --global user.name "GitHub用户名"
git config --global user.email "GitHub注册邮箱"

然后

hexo clean
hexo g
hexo d

输个ssh key密码就可以了上传到Github了

然后是主题配置

毕竟原主题实在丑

cd themes
git clone https://gitee/fak3adm1n/fexo.git
cd fexo
vim _config.yml

根据注释自己自定义一下就行

# Blog info
blog_name: Forsigner
slogan: Find the bug of the world
url: http://www.forsigner.com # Set avatar (Absolute url and relative url)
avatar: /images/avatar.jpg # Set favicon
favicon: /favicon.ico # For seo
keywords: forsigner,前端,设计,Hexo主题,前端开发,用户体验,设计,frontend,design,nodejs,JavaScript home_nav:
- name: Blog
url: /archives
target_blank: false #不在新页面打开
- name: Project
url: /project/
target_blank: true #在新页面打开
- name: Github
url: https://github.com/forsigner
target_blank: true
- name: Twitter
url: https://twitter.com/forsigner
target_blank: true # config page nav
page_nav:
- name: 博客
url: /archives/
target_blank: false # 不在新页面打开
- name: 分类
url: /category/
target_blank: false
- name: 标签
url: /tag/
target_blank: false
- name: 友链
url: /link/
target_blank: false
- name: 关于
url: /about/
target_blank: false
- name: RSS
url: /atom.xml
target_blank: true # 在新页面打开
- name: 搜索
url: /search/
target_blank: false # 在新页面打开 page_nav_style: CIRCLE # CIRCLE|ROUND_RECT # 面包屑
breadcrumb:
isShow: true # true|fase # 盒子
toolbox:
isShow: true # true|fase
text: 盒子 search_slogan:
isShow: true # true|fase
text: Can you find the bug of world ~ link_slogan:
isShow: true # true|fase
text: 交换友链可以邮件 forsigner@gmail.com # set backtop show or hide
backtop:
home: false
archive: false
category: true
tag: true
post: true
link: false
about: false donation:
show: true
btn_text: 支持一下
tip: 扫一扫,支持forsigner
items:
- type: 微信
text: 微信扫一扫
imgUrl: /images/qr-wechat.png
- type: 支付宝
text: 支付宝扫一扫
imgUrl: /images/qr-alipay.png post:
header_align: CENTER # LEFT|CENTER
showToc: true # true|false
showComments: true
open_in_new_window: false
show_prev_next: true # =========================================================
# 个性化设置
# ========================================================= # Custom CSS style, 推荐把样式文件放在blog源码文件夹,而不是主题里面
personal_style: /css/personal-style.css # 这个值取决于你得背景图片是深色还是浅色,深色用dark,浅色用light
home_background_scheme: light # dark、light # custom font-family 暂时只支持这3种英文字体,你可以完全自定义字体(看文档)
blog_name_font_familiy: calligraffittiregular
# blog_name_font_familiy: Lobster-Regular
# blog_name_font_familiy: PoiretOne-Regular init_page_content: HOME_NAV # HOME_NAV | POST # =========================================================
# 第三方服务
# =========================================================
# Stats
google_analytics: UA-38189205-1
baidu_analytics: 57e94d016e201fba3603a8a2b0263af0 # Comment service # disqus_shortname: forsigner
# hypercomments_id: 89821
# gentie_key: d16a7241e7cd4b389584ed8db2a4e8bc #有言用户编号
# uyan_key: # 畅言, doc: http://changyan.kuaizhan.com/
changyan:
enable: false # true | false 这里开启
changyan_appid:
changyan_appkey: # gitalk评论组件,把下面的配置换成你的,官方文档: https://gitalk.github.io/
gitalk:
enable: true # 如果使用 gitalk,请设置改之为true
clientID: 277317290454635afa73
clientSecret: 78223c859304da5e8d71bfce136d436c6ff95c37
repo: blog-comment
owner: forsigner
admin: forsigner # gitment comment service
gitment:
enable: false # true | false 这里开启
owner: # Your GitHub ID. Required.
repo: # The repository to store your comments. Make sure you're repo's owner. Required.
oauth: # An object contains your client ID and client secret. Required.
client_id: # GitHub client ID. Required.
client_secret: # GitHub client secret. Required.
id: # An optional string to identify your page. Default location.href.
title: # An optional title for your page, used as issue's title. Default document.title.
link: # An optional link for your page, used in issue's body. Default location.href.
desc: # An optional description for your page, used in issue's body. Default ''.
labels: # An optional array of labels your want to add when creating the issue. Default [].
theme: # An optional Gitment theme object. Default gitment.defaultTheme.
perPage: # An optional number to which comments will be paginated. Default 20.
maxCommentHeight: # An optional number to limit comments' max height, over which comments will be folded. Default 250. # Valine comment system https://valine.js.org
valine:
enable: false # 如果使用valine,请设置改之为true
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
placeholder: Just go go # comment box placeholder
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size # 不算子,文章访问量统计和显示
busuanzi: true # =========================================================
# 页面内容设置
# =========================================================
about:
- type: me
icon: icon-user
text_value:
- "Scut,1991,Spring."
- "喜欢设计,擅长编程,喜欢睡懒觉."
- "前端开发工程师,常用 HTML / CSS / JavaScript."
- type: Github
icon: icon-github
text_key: Github
text_value: "@forsigner"
text_value_url: https://github.com/forsigner
- type: weibo
icon: icon-weibo
text_key: 微博
text_value: "@forsigner"
text_value_url: http://weibo.com/u/1847075964
- type: mail
icon: icon-mail
text_key: Gmail
text_value: "forsigner@gmail.com"
- type: location
icon: icon-location
text_value: 珠海 link:
- name: 织网
info: 身体和灵魂,总有一个在路上
url: http://zheng-ji.info/
avatar: https://avatars3.githubusercontent.com/u/1414745?v=3&s=100
- name: Dongyado
info: 生命不止,折腾不息
url: http://dongyado.com/
avatar: https://avatars0.githubusercontent.com/u/6274940?v=3&s=100
- name: OrangeCoder
info: android ffmpeg nodejs gradle
url: http://orangecoder.com/
avatar: https://avatars0.githubusercontent.com/u/2263785?v=3&s=100
- name: EverET
info: 好记性不如烂笔头
url: http://everet.org/about-me/
avatar: https://avatars1.githubusercontent.com/u/1559563?v=3&s=100
- name: 题叶
info: FP, GUI, Writing
url: http://tiye.me/
avatar: https://avatars2.githubusercontent.com/u/449224?v=3&s=100
- name: McChen
info: Stay Hungry, Stay Foolish
url: https://chenjiahao.xyz
avatar: https://avatars0.githubusercontent.com/u/8033333?v=3&s=100 project:
- type: personal
name: fexo
url: https://github.com/forsigner/fexo
intro: A minimalist design theme for hexo
# - type: company
# name: Fexo
# url: https://github.com/forsigner/fexo
# intro: A minimalist design theme for hexo
- type: personal
name: beside
url: https://github.com/forsigner/beside
intro: I need you beside me
- type: personal
name: web-fontmin
url: https://github.com/forsigner/web-fontmin
intro: 字体子集化,在线提取你需要的字体
- type: personal
name: magic-check
url: https://github.com/forsigner/magic-check
intro: Beautify Radio and Checkbox with pure CSS
- type: personal
name: nice-bar
url: https://github.com/forsigner/nice-bar
intro: A nice and lightweight scrollbar
- type: personal
name: angular-nice-bar
url: https://github.com/forsigner/angular-nice-bar
intro: A nice and lightweight scrollbar in Angular
- type: personal
name: fo-popover
url: https://github.com/forsigner/fo-popover
intro: A nice popover for Angular
- type: personal
name: fo-tooltip
url: A nice tooltip for Angular
intro: https://github.com/forsigner/fo-tooltip
- type: personal
name: fo-modal
url: https://github.com/forsigner/fo-modal
intro: A nice modal for Angular
- type: personal
name: mocer
url: https://github.com/forsigner/mocer
intro: Setup a mock server easily
- type: personal
name: node-pngdefry
url: https://github.com/forsigner/node-pngdefry
intro: Repairing iPhone fried PNGs using Node.js
- type: personal
name: ng-simditor
url: https://github.com/forsigner/ng-simditor
intro: Angular directive for simditor

最后的最后

新建文章是hexo new post 文章标题

hexo clean
hexo g
hexo d

Termux搭建hexo博客并部署到GitHub的更多相关文章

  1. 史上最详细“截图”搭建Hexo博客并部署到Github

    http://jingyan.baidu.com/article/d8072ac47aca0fec95cefd2d.html 大家也搭建过博客,很多时候,按着教程来做就可以了,但是我当时为了搭建Hex ...

  2. 搭建hexo博客并部署到github上

    hexo是由Node.js驱动的一款快速.简单且功能强大的博客框架,支持多线程,数百篇文章只需几秒即可生成.支持markdown编写文章,可以方便的生成静态网页托管在github上. 感觉不错. 前端 ...

  3. 搭建Hexo博客并部署到Github

    参考: http://www.jianshu.com/p/a67792d93682 http://jingyan.baidu.com/article/d8072ac47aca0fec95cefd2d. ...

  4. Linux下使用 github+hexo 搭建个人博客02-hexo部署到Github Pages

    之前的这篇文章<Linux下使用 github+hexo 搭建个人博客01-hexo搭建>,相信大家都知道怎么搭建 hexo ,怎么切换主题,并且完成了一篇博文的创建,以及 MarkDow ...

  5. 使用Hexo快速搭建一个博客,并部署到github

    本文旨在记录一下我在通过hexo搭建一个博客,并将其部署在github上面的过程,也供我自己在以后的使用过程中能够快速学习和参考.需要看更详细或者官方文档的可以点击Hexo官方文档进行查看. 安装前提 ...

  6. 使用Hexo搭建个人博客并部署到GitHub或码云上全过程

    一.前言 如上图所示:GitHub有Github Pages,而码云也有码云 Pages 1.Github Pages或Gitee Pages是什么呢? Github Pages或者Gitee Pag ...

  7. Hexo瞎折腾系列(6) - 将博客同时部署到Github和Coding

    前言 由于本人只是将Hexo博客同时部署到 Github 和 Coding.net ,所以这里只介绍怎么同时部署到这两个网站的pages. 之所以选择这两个网站,是因为国外用户可以访问 Github, ...

  8. 基于Hexo搭建博客并部署到Github Pages

    基于Hexo搭建博客并部署到Github Pages 之前在简书上写东西,觉得自己还是太浮躁.本来打算用Flask自己写一个,以为是微框架就比较简单,naive.HTML.CSS.JS等都要学啊,我几 ...

  9. 史上最详细“截图”搭建Hexo博客——For Windows

    http://angelen.me/2015/01/23/2015-01-23-%E5%8F%B2%E4%B8%8A%E6%9C%80%E8%AF%A6%E7%BB%86%E2%80%9C%E6%88 ...

随机推荐

  1. 选择…Select…(Power Query 之 M 语言)

    选择行: 筛选Table.SelectRows-文本与数值 筛选Table.SelectRows-日期与时间 保留错误行:= Table.SelectRowsWithErrors( 表, {" ...

  2. CF248A Cupboards 题解

    Content 在一个走廊上有 \(2n\) 扇门,排成两列分居左右.有个人很无聊,随意地开关了一些门,使得这些门看起来十分乱.现在请开关一些门,使得这些门恢复原来整齐的状态(要么都开.要么都关.要么 ...

  3. signal 信号

    python学习笔记--信号模块signal 阅读目录(Content) 1 signal基本信号名 2 常用信号处理函数 2.1 设置发送SIGALRM信号的定时器 2.2 设置信号处理函数 3 常 ...

  4. 使用容器挂载NFS

    https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistent-volumes nfs 标准协议 v2 v3 v4 ...

  5. 复杂SQL案例:用户退款信息查询

    供参考: select t3.course_id 课程id, t3.user_id 用户ID, u.user_full_name 姓名, -- u.phone, concat(u.company,' ...

  6. IDEA报错 Error:(24, 35) java: 常量字符串过长

    修改设置

  7. JAVA获取当前请求的URL地址,包含请求链接中的参数

    /** * 获得当前访问的URL路径 * @param request * @return */ public static String getLocation(HttpServletRequest ...

  8. 【LeetCode】922. Sort Array By Parity II 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 使用奇偶数组 排序 奇偶数位置变量 日期 题目地址: ...

  9. 【LeetCode】706. Design HashMap 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 日期 题目地址:https://leetcode.c ...

  10. hdu 1528-Card Game Cheater(贪心算法)

    题意不讲,怕说不清,自己一点点看吧. 思路是贪心,将每个人的牌按从小到大或(从大到小),我是从小到大排的, 然后每次从第二摞排中找比第一摞排的那张大且相差最小的就可以了,每次找到就sum++: 最后s ...