美文网首页
Hexo-hexo+github创建个人博客

Hexo-hexo+github创建个人博客

作者: playman | 来源:发表于2018-06-24 21:42 被阅读0次

本文通过Hexo+github以及腾讯云搭建一个个人博客

1、GitHub账户

2、腾讯云账号以及域名

3、Node.js环境

4、Windows 下 Git环境

本文操作环境为 Win7 64bit

GitHub账号

1、官网注册——https://github.com/
注册页面
2、创建仓库
创建仓库
命名

选择一个主题


选择设置
选择主题

之后保存【save】就可以了
然后访问 你的github用户名.github.io 就可以看到

腾讯云账号以及域名

1、注册腾讯云——https://dnspod.qcloud.com/?from=qcloud/
2、购买域名
域名购买

按照流程一步一步走下来即可

安装Node.js环境

1、官网下载——https://nodejs.org/en/
Node.js官网
2、安装

双击安装,一路【next】


Node.js安装

安装Git环境

1、官网下载Git——https://git-scm.com/
Git官网
2、安装

一样,一路【next】


Git安装

恭喜,没有出错就准备工作做好了~~~


正文

安装Hexo

1、创建一个文件夹(英文命名)

创建空的文件夹

2、启动 GitBsah

启动命令框
命令框

3、安装Hexo

  • 切换源(换成淘宝的源)
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
  • 执行安装
$ cnpm install -g hexo-cli
$ cnpm install hexo --save

验证一下

$ hexo -v
Hexo版本
  • 初始化
$ hexo init
  • 安装生成器,保存到本地文件夹
$ cnpm install
  • 运行
$ hexo s -g

打开浏览器 http://localhost:4000/

默认页面
【Ctrl】+【c】 停止运行
  • 配置博客
    打开【_config.yml】 文件
#博客名称
title: 我的博客
#副标题
subtitle: 一天进步一点
#简介
description: 记录生活点滴
#博客作者
author: ben boss
#博客语言
language: zh-CN
#时区
timezone:
#博客地址,与申请的GitHub一致
url: http://username.github.io
root: /
#博客链接格式
permalink: :year/:month/:day/:title/
permalink_defaults:
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: true
tab_replace:
default_category: uncategorized
category_map:
tag_map:
#日期格式
date_format: YYYY-MM-DD
time_format: HH:mm:ss
#分页,每页文章数量
per_page: 10
pagination_dir: page
#博客主题,选择其它主题,在这里是要将themes中的文件夹名替换这里的
theme: landscape
#发布设置
deploy:
type: git
#elfwalk改为你的github用户名
repository: https://github.com/username/username.github.io.git

到这里,本地搭建完成


安装主题

主题的介绍页面

https://github.com/hexojs/hexo/wiki/Themes

以hexo-theme-yilia举例——https://github.com/litten/hexo-theme-yilia

看下一篇博客吧~~

Hexo-theme-yilia 简单配置

相关文章

  • Hexo-hexo+github创建个人博客

    本文通过Hexo+github以及腾讯云搭建一个个人博客1、GitHub账户2、腾讯云账号以及域名3、Node.j...

  • 如何创建个人博客

    原文地址:https://blog.csdn.net/gdutxiaoxu/article/details/535...

  • 创建个人静态博客

    思路: 本地使用Hexo生成静态页面(html) 上传到WEB服务器 1、 安装Hexo 及生成静态页面 安装No...

  • 使用Hexo创建个人的博客

    title: 使用Hexo创建个人的博客 这里讲的是git+hexo+github创建个人博客,hexo是一个基于...

  • Mac下使用Hexo搭建GitHub博客

    介绍如何在Github上创建个人博客。例如 - 我的Github博客。 创建GitHub账号 注册Github账号...

  • 第一篇想说的话

    这是我创建个人博客的第一篇文章,说些什么呢,就说说我为什么要创建这个博客,以及博客记录的内容吧。 创建博客的原因 ...

  • githubpage + hexo 创建个人博客

    前言 很久之前就像要一个自己的博客,想在这个浩瀚的网络上,能有一个自己的小家,简单的写写文章,记录一下自己的心路历...

  • 用Hexo创建个人博客

    啊有个好点子呢,想要记下来分享给别人看呢,不如做个博客吧!看看要什么...服务器、域名、博客程序blahblahb...

  • Hugo创建个人博客指南

    最近准备建立一个个人博客网站,对比hexo与hugo后,决定使用Hugo静态页面生成引擎,使用的主题是tranqu...

  • github上创建个人博客

    玩github标准打卡动作就是创建个人博客,今天我们就来创建个博客。偶尔在博客上更新下文章,将来遇到给别人展示自己...

网友评论

      本文标题:Hexo-hexo+github创建个人博客

      本文链接:https://www.haomeiwen.com/subject/aewsyftx.html