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. 建立资源的方法(Project)

    <Project2016 企业项目管理实践>张会斌 董方好 编著 终于,进入第5章资源计划编制了,所以就不能还在任务工作表里厮混了是吧,那就先进入资源工作表吧:[任务]>[甘特图]& ...

  2. CF1461A String Generation 题解

    Content 构造一个仅由 a,b,c 三个字符组成,且最长回文子串长度不超过 \(k\) 的长度为 \(n\) 的字符串. 数据范围:数据组数 \(\leqslant 10\),\(1\leqsl ...

  3. props 使用场景 及 布局提升

    一对一一边写html 一边写css一小块为单位html csscss html整块单位html csscss html react/first-react/src/views/Wk/index.jsx ...

  4. Visual Studio之__cplusplus版本

    1. 默认值 Visual Studio(下文简称VS)中__cplusplus宏的默认值一直是: 199711L 可以用下面的代码查看 __cplusplus 的输出结果: #pragma once ...

  5. win10使用照片查看器查看图片

    1.关于 演示环境: win10 1909 2.习惯win7的照片查看器 如果你习惯使用win7的照片查看器在win10查看照片,可以通过下面的注册表代码实现.方法:1.创建 后缀名为 .reg的文件 ...

  6. 【LeetCode】662. Maximum Width of Binary Tree 解题报告(Python)

    [LeetCode]662. Maximum Width of Binary Tree 解题报告(Python) 标签(空格分隔): LeetCode 题目地址:https://leetcode.co ...

  7. JSON(JS 对象简谱,一种数据交换格式)

    JSON(JavaScript Object Notation, JS 对象简谱) 是一种轻量级的数据交换格式 存储和表示数据的文本格式 层次结构清晰.简洁 JSON是一个序列化的对象或数组 1.js ...

  8. AUGMIX : A SIMPLE DATA PROCESSING METHOD TO IMPROVE ROBUSTNESS AND UNCERTAINTY

    目录 概 主要内容 实验的指标 Dan Hendrycks, Norman Mu,, et. al, AUGMIX : A SIMPLE DATA PROCESSING METHOD TO IMPRO ...

  9. [Guide]Google Python Style Guide

    扉页 项目主页 Google Style Guide Google 开源项目风格指南 - 中文版 背景 Python 是Google主要的脚本语言.这本风格指南主要包含的是针对python的编程准则. ...

  10. Java初学者作业——使用eclipse简单的输出(打印)游戏菜单

    返回本章节 返回作业目录 需求说明: 使用eclipse创建Java项目,在Java程序中输出游戏菜单. 为 Java 程序添加单行和多行注释. 实现思路: 在 eclipse 中创建项目及Java类 ...