Giter VIP home page Giter VIP logo

seo-test's Introduction

Hi there, I'm kouhe3! 👋

kouhe3's GitHub Stats

My latest projects

note

Visitor count

seo-test's People

Contributors

kouhe3 avatar

Watchers

 avatar

seo-test's Issues

利用 Termux × GitHub × Hexo 创建免费博客

又是一篇新的教程力(

应该是比较详尽的安装教程辣(

这篇文章主要是利用GitHub × Termux逐步帮你搭建一个hexo的免费博客(

白嫖一个博客岂不妙哉

准备工作

  • 一个装有 Termux 的手机

如果没有,请到 f-droid 下载(推荐)

  • 一个动手能力强,聪明可爱的你(

着手安装

话不多说 我们直接开始吧(
在进行以下步骤前,请确保给予了存储权限!

  1. 安装 git

pkg install git

  1. 安装 npm & node-js (注意是长期支持版本,其它版本是安装不上的)

pkg install nodejs-lts

(这也会将npm安装到termux)

  1. 安装 hexo

npm install hexo-cli -g

如果你觉得速度慢 可以在安装之前更换为国内镜像:

npm config set registry http://registry.npm.taobao.org

  1. 创建一个博客目录
    hexo init blog(此处名字随意)

据说必须是termux自己的目录才可以,否则会报错(故不能输入外部文件夹路径)

  1. 更方便的访问博客目录&编辑配置
    请阅读 上篇教程中的使用 Termux一节,以下会用到它

(当然如果你习惯于vim 编辑器,可以直接进行以下步骤(

  1. 设置 git 部署

在博客目录的_config.yml的最后面deploy部分输入以下内容:

deploy:
  type: git
  repo: https://github.com/username/reponame
  # example, https://github.com/hexojs/hexojs.github.io
  branch: gh-pages

然后保存即可

如果你没有 GitHub 账号,也可以使用码云账号(兼容性未知),或者注册一个(

如果使用码云账号 需要把 repo 链接处改为码云 ( gitee.com )repo链接

建议新建一个repo以确保无问题

同时,你还需要更改网站(#url)处为 你 GitHub Pages 的地址(

如果使用自己的域名,也请同步更改,否则会出现问题

  1. 开始部署
    1> 进入博客目录
    cd blog(也即上面你创建的目录)

2> 输入以下命令
hexo clean && hexo g && hexo d
(不过要保证你的配置文件正确)
之后输入你的 GitHub 账号和密码 即可

  1. 在 GitHub 方面的设置
    打开你部署好的repo,进入它的settings(别问我在哪里,顶上那么多东西自己看看
    找到 Github pages 并启用它(记得使用 gh-pages 的分支)

如果你想设置自己的域名,可以在启用后设置,注意和hexo的配置保持一致!,也可以打开强制https,获得更好体验(

总结

嗯 教程大概到这里就结束了,希望能对你有一些帮助

更详尽的hexo教程烦请看这里辣👇👇
https://github.com/blinkfox/hexo-theme-matery/blob/develop/README_CN.md

我们下个教程见!

好的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.