Git Product home page Git Product logo

hexo's Introduction

Github + Hexo + Wikitten主题 项目

仓库说明:

1、准备工作

  • Node.js (下载安装)
  • Git 环境
  • Github仓库(创建仓库 username.github.io 。例如:navanccc.github.io)

2、安装Hexo

  • 创建本地目录
  • 安装hexo:npm install hexo-cli -g
  • 初始化 hexo:Hexo init
  • 生成博客 hexo:hexo g
  • 启动本地服务:hexo s

3、修改主题

首先下载这个主题:

cd /f/Workspaces/hexo/
git clone https://github.com/zthxxx/hexo-theme-Wikitten themes/Wikitten

修改 _config.yml 中的 theme: landscape 改为 theme: Wikitten,然后重新执行 hexo g来重新生成。

3、上传到github

如果你一切都配置好了,发布上传很容易,一句hexo d就搞定,当然关键还是你要把所有东西配置好。

首先,ssh key肯定要配置好。

其次,配置_config.yml中有关deploy的部分:

正确写法:

deploy:
	type: git
	repository: [email protected]:NavanCcc/navanccc.github.io.git  
	branch: master

Hexo 常用命令

Hexo 基本命令:

hexo init 	# hexo 初始化
hexo clean 	# 清理环境
hexo new "newFile"	# 创建新文章,名为 newFile.md
hexo g 		# 生成博客
hexo s 		# 启动本地服务
hexo d 		# 发布博客到git(需_config.yml中配置好git)

常见命令

hexo new "postName" #新建文章
hexo new page "pageName" #新建页面
hexo generate #生成静态页面至public目录
hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭server)
hexo deploy #部署到GitHub
hexo help  # 查看帮助
hexo version  #查看Hexo的版本

缩写:

hexo n == hexo new
hexo g == hexo generate
hexo s == hexo server
hexo d == hexo deploy

组合命令:

hexo s -g #生成并本地预览
hexo d -g #生成并上传

参考

hexo + github 搭建免费个人博客

Hexo:

Wikitten:

hexo's People

Watchers

James Cloos avatar ccc avatar

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.