Termux搭建hexo博客并部署到GitHub
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的更多相关文章
- 史上最详细“截图”搭建Hexo博客并部署到Github
		
http://jingyan.baidu.com/article/d8072ac47aca0fec95cefd2d.html 大家也搭建过博客,很多时候,按着教程来做就可以了,但是我当时为了搭建Hex ...
 - 搭建hexo博客并部署到github上
		
hexo是由Node.js驱动的一款快速.简单且功能强大的博客框架,支持多线程,数百篇文章只需几秒即可生成.支持markdown编写文章,可以方便的生成静态网页托管在github上. 感觉不错. 前端 ...
 - 搭建Hexo博客并部署到Github
		
参考: http://www.jianshu.com/p/a67792d93682 http://jingyan.baidu.com/article/d8072ac47aca0fec95cefd2d. ...
 - Linux下使用 github+hexo 搭建个人博客02-hexo部署到Github Pages
		
之前的这篇文章<Linux下使用 github+hexo 搭建个人博客01-hexo搭建>,相信大家都知道怎么搭建 hexo ,怎么切换主题,并且完成了一篇博文的创建,以及 MarkDow ...
 - 使用Hexo快速搭建一个博客,并部署到github
		
本文旨在记录一下我在通过hexo搭建一个博客,并将其部署在github上面的过程,也供我自己在以后的使用过程中能够快速学习和参考.需要看更详细或者官方文档的可以点击Hexo官方文档进行查看. 安装前提 ...
 - 使用Hexo搭建个人博客并部署到GitHub或码云上全过程
		
一.前言 如上图所示:GitHub有Github Pages,而码云也有码云 Pages 1.Github Pages或Gitee Pages是什么呢? Github Pages或者Gitee Pag ...
 - Hexo瞎折腾系列(6) - 将博客同时部署到Github和Coding
		
前言 由于本人只是将Hexo博客同时部署到 Github 和 Coding.net ,所以这里只介绍怎么同时部署到这两个网站的pages. 之所以选择这两个网站,是因为国外用户可以访问 Github, ...
 - 基于Hexo搭建博客并部署到Github Pages
		
基于Hexo搭建博客并部署到Github Pages 之前在简书上写东西,觉得自己还是太浮躁.本来打算用Flask自己写一个,以为是微框架就比较简单,naive.HTML.CSS.JS等都要学啊,我几 ...
 - 史上最详细“截图”搭建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 ...
 
随机推荐
- odoo views中html的奇怪问题
			
在我创建了字段类型为 fields.Html 以后,确出现了两种不同的情况 下图中,content是此类型的,可以正常显示不需要加widget(小部件)="html" <fo ...
 - HTML标签一览
			
html标签属性大全 嵌套的html窗口<iframe > <iframe src="https://www.baidu.com"></iframe& ...
 - Java高级:条件队列与同步器Synchronizer的原理+AQS的应用
			
14.构建自定义的同步工具 类库中包含了许多存在状态依赖性的类,例如FutureTask,Semaphore和BlockingQueue等.在这些类中的一些操作中有着基于状态的前提条件,例如,不能从一 ...
 - 【九度OJ】题目1473:二进制数 解题报告
			
[九度OJ]题目1473:二进制数 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1473 题目描述: 大家都知道,数据在计算机里中存 ...
 - LeetCode解题报告汇总! All in One!
			
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 把自己刷过的所有题目做一个整理,并且用简洁的语言概括了一下思路,汇总成了一个表格. 题目 ...
 - 【LeetCode】855. Exam Room 解题报告(Python)
			
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址: https://leetcode.com/problems/exam-roo ...
 - YAPTCHA(hdu2973)
			
YAPTCHA Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
 - 2021 年终总结:内推40人、全网15万粉、Code Runner 3000万下载、发扬WLB、进军视频领域
			
时光飞逝,岁月如梭,蓦然回首,已是年底. 感觉写 2020 年终总结还是在不久之前.转眼间,2021 已经接近尾声了.是时候来写写 2021 年的年终总结了. 内推 40 人 2019 年,内推了 2 ...
 - RabbitMQ学习笔记六:RabbitMQ之消息确认
			
使用消息队列,必须要考虑的问题就是生产者消息发送失败和消费者消息处理失败,这两种情况怎么处理. 生产者发送消息,成功,则确认消息发送成功;失败,则返回消息发送失败信息,再做处理. 消费者处理消息,成功 ...
 - elementUI表单嵌套表格并对每行进行校验
			
elementUI表单嵌套表格并对每行进行校验 elementUI 表单嵌套表格并进行校验. 目录 效果展示 代码链接 关键代码 完整代码 效果展示 先看看这是不是需要的效果^_^  如图,Elem ...