GitHub博客搭建

主要目的是未来能够快速的办理出文档,做一个有效的积累,所以尝试这个博客系统,它是依附于GitHub上的一个免费的博客系统,我个人觉得挺实用,所以分享出来一起学习


演示

drop-shadow:0,5px,10px,rgba(0,0,0,.4) width:900px


目录

  1. 下载vscode 编辑器非常重要
  2. 注册登录
  3. 开始搭建博客
  4. 资源文件(比如说图片,视频,音频)
  5. 代码

访问地址


下载vscode 编辑器非常重要

vscode目前是最好用的代码编辑器,所以建议使用vscode来编辑代码,并且开源免费的


开始搭建博客

  • 先创建一个Repositories
  • 然后给自己的Repositories取一个名字,注意:名称格式最好为:用户名.github.io
  • 创建内容
  • 找到setting
  • 找到Pages (在左侧栏)
  • 看到绿色(如果看到的是蓝色还在更新需要等待一会)
  • 创建子页面
  • 关联子页面

先创建一个Repositories

bg 95% drop-shadow:0,15px,20px,rgba(0,0,0,.4)


然后给自己的Repositories取一个名字,注意:名称格式最好为:用户名.github.io。首页

drop-shadow:0,15px,20px,rgba(0,0,0,.4)


创建内容

bg auto width:1000px drop-shadow:0,15px,20px,rgba(0,0,0,.4)


创建内容 我个人通常这样

echo "# youyongba.github.io" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:youyongba/youyongba.github.io.git
git push origin HEAD

找到setting

bg auto width:1000px drop-shadow:0,15px,20px,rgba(0,0,0,.4)


找到Pages (在左侧栏)

bg auto width:900px drop-shadow:0,15px,20px,rgba(0,0,0,.4)


看到绿色(如果看到的是蓝色还在更新需要等待一会)

bg auto width:1200px drop-shadow:0,15px,20px,rgba(0,0,0,.4)


创建子页面

  • 除了以上第2步不需要变成,不需要xxx.github.io,只需要用普通的仓库名称就可以。
  • 第6步,在Source这个下边的选项将node改成master
  • 成功后会获得到一个地址 比如: https://youyongba.github.io/GitHubBlog/

关联子页面

用vscode 打开首页的源文件


width:800px  drop-shadow:0,15px,20px,rgba(0,0,0,.4)


资源文件(比如说图片)

存储一般大多数都是收费的,但是github有一个免费的方式。可以将图片存在里面。

  • 可以在首页创建一个resources/images的文件夹,将图片放在里面,推送过去

资源文件(比如说图片)

如何访问图片


代码

README.md

首页


web开发笔记,用来记录自己的有效积累
* [介绍](README.md)

目录
* [github博客搭建](github_blog/readme.md)

blog/README.md

子页面需要另外建立一个普通仓库

# github博客搭建
## 访问地址
 - https://github.com/

## 演示
![](https://raw.githubusercontent.com/youyongba/youyongba.github.io/master/resources/images/githubblog.gif '微信扫码交流1')

## 下载vscode 编辑器非常重要
> 下面的网站下载
 - https://code.visualstudio.com/

results matching ""

    No results matching ""