搭建个人博客

2019-11-05  本文已影响0人  Mokingc

申请Github账号

创建博客仓库

环境安装

配置SSH

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

将公匙添加到github上

安装hexo

初探hexo

# 生成静态页面
hexo generate
# 开启本地服务器
hexo s

将hexo博客部署到github上

title: Moking's Blog
subtitle: 副标题
description: 网页描述
author: Moking
language: zh-CN
deploy:
  # 类型
  type: git 
  # 仓库
  repo: git@github.com:Moking1997/Moking1997.github.io.git 
  # 分支
  branch: master

发表文章

hexo new "测试文章"

---
title: 测试文章
date: 2018-05-27 11:03:44
tags:
---
这是一篇测试文章,欢迎关注作者博客[1]: https://moking1997.github.io/
# 清空静态页面
hexo clean
# 生成静态页面
hexo generate
# 开启本地服务器
hexo server
# 部署 
hexo deploy

常见问题

hexo g:hexo generate      # 生成静态页面
hexo c:hexo clean       # 清空静态页面
hexo s:hexo server      # 开启本地服务器
hexo d:hexo deploy      # 部署
# 清除、生成、启动
hexo clean && hexo g -s
# 清除、生成、部署
hexo clean && hexo g -d
上一篇 下一篇

猜你喜欢

热点阅读