1.在Github上创建一个新的Repository

到你的github上 https://github.com去create a new repository命名为 github.myblog

2.本地安装Jekyll-Bootstrap

假设本地centos没有git,使用yum安装

$ yum install git

克隆jekyll-bootstrap

$ git clone https://github.com/plusjade/jekyll-bootstrap.git myblog
$ cd myblog
$ git remote add origin-myblog https://github.com/csuldw/myblog.git
$ git push origin-myblog master #代码传至github

经过上面的代码之后。就能够看到自己的博客了:http://myblog.github.io/

github文件文件夹

3.安装Jekyll

使用以下代码看看是否安装了jekyll

$ git clone https://github.com/plusjade/jekyll-bootstrap.git
$ cd jekyll-bootstrap
$ jekyll serve

依据网址http://localhost:4000. 看是否成功安装

假设没有成功安装,以下再centos中安装jekyll。參考:https://hack0nair.me/2013-10-31-config-jekyll-on-centos/

首先安装ruby:

$ sudo yum install ruby



接着安装jekyll

$ gem install jekyll

然后回到myblog文件夹。运行下列代码检測jekyll是否成功安装

$ jekyll server

假设出现以下情况,表示成功安装

4.创建一个页面

下载rake

$ gem install rake

创建页面

$ rake page name="about.md"

创建一个内部页面

rake page name="pages/about.md"



Create a page with a “pretty” path:

$ rake page name="pages/about"
# this will create the file: ./pages/about/index.html

The rake task automatically creates a page file with properly formatted filename and YAML Front Matter as well as includes the Jekyll Bootstrap “setup” file.

5.公布至github

$ git add .
$ git commit -m "Add new content"
$ git push origin master

附:jekyll支持主题定做 http://jekyllbootstrap.com/usage/jekyll-theming.html

主题文件夹位于:_includes/themes 以下.

Linux-github 搭建静态博客的更多相关文章

  1. github搭建静态博客

    p { margin-bottom: 0.1in; line-height: 120% } 1. 创建Repository 创建一个与自己github用户名对应的Repository,例如:abc.g ...

  2. 【一】Ubuntu14.04+Jekyll+Github Pages搭建静态博客

    本系列有五篇:分别是 [一]Ubuntu14.04+Jekyll+Github Pages搭建静态博客:主要是安装方面 [二]jekyll 的使用 :主要是jekyll的配置 [三]Markdown+ ...

  3. 使用github和hexo搭建静态博客

    获得更多资料欢迎进入我的网站或者 csdn或者博客园 终于写这篇文章了,这是我使用github和hexo搭建博客的一些心得,希望能给大家一点帮助.少走点弯路.刚接触github,只是用来存项目的版本, ...

  4. 在GitHub上使用Hexo搭建静态博客

    搭建静态博客须要一个前提是电脑上有安装git而且有github帐号,这个不懂能够看廖雪峰先生的git教程 1.下载nodejs.在官网上能够下载 2.使用git进入你新建的一个目录,输入命令 npm ...

  5. 使用vuepress搭建GitHub pages静态博客页面

    vuepress官网 vuepress是尤大开发来写文档的静态页面.可以用Markdown 语法,并且也可以使用vue模块化的方式开发页面. vuepress-theme-reco 是另外的开发者开发 ...

  6. Ubuntu+Hexo+Github搭建个人博客

    Ubuntu+Hexo+Github搭建个人博客 目录 目录 目录 1. 简介 环境 2. Git安装及配置 2.1 安装Git 2.2 创建Git仓库 2.3 配置git仓库 2.4 添加公钥 3. ...

  7. 《Hexo+github搭建个人博客》

    <Hexo+github搭建个人博客> 文/冯皓林 完稿:2016.4.22-2016.4.23 注意:本节教程只针对Windows用户.本教程由无人赞助,赞助写出. <Hexo+g ...

  8. windows上使用mkdocs搭建静态博客

    windows上使用mkdocs搭建静态博客 之前尝试过用HEXO搭建静态博客,最近发现有个叫mkdocs的开源项目也是搭建静态博客的好选择,而且它支持markdown格式,下面简要介绍一下mkdoc ...

  9. Mac上基于hexo+GitHub搭建个人博客(一)

    原文地址: http://fanjiajia.cn/2018/11/23/Mac%E4%B8%8A%E5%9F%BA%E4%BA%8Ehexo+GitHub%E6%90%AD%E5%BB%BA%E4% ...

  10. 如何用hexo+github搭建个人博客

    搭建环境 1.安装 Node.js: https://nodejs.org/en/ windows下点击链接,下载安装即可;Linux下更加简单,在终端下输入sudo apt-get install ...

随机推荐

  1. 用固定长度的数组实现stack queue

    package my_basic.class_3; /** * 用数组结构实现大小固定的队列和栈 */ public class Code_01_Array_stack_queue { public ...

  2. Exploded location overlaps an existing deployment解决办法

    项目->properties->MyEclipse->Web->Web Context-root的名字为重命名之后的名字即可

  3. js 漂浮广告

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  4. mysql5.7zip安装

    一.下载mysql zip文件 二.解压.(我的目录A:\mysql\mysql-5.7.23-winx64) 三.配置环境变量   Path后面追加%A:\mysql\mysql-5.7.23-wi ...

  5. Go:channel

    一.channel 在 Go 语言里,不仅可以使用原子函数和互斥锁来保证对共享资源的安全访问以及消除竞争状态,还可以使用 channel,通过发送和接收需要共享的资源,在 goroutine 之间做同 ...

  6. C第12章-----堆

    #include <stdio.h> #include <stdlib.h> //声明Person结构 //struct Person{ //    float heightI ...

  7. POJ 2251-Dungeon Master (三维空间求最短路径)

    Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is co ...

  8. 线性结构4 Pop Sequence

    02-线性结构4 Pop Sequence(25 分) Given a stack which can keep M numbers at most. Push N numbers in the or ...

  9. java中String数组和List的互相转化

    1.List转String数组 方法一: //先准备一个List List<String> testList=new ArrayList<>(); testList.add(& ...

  10. [luoguP1169] [ZJOI2007]棋盘制作(单调栈)

    传送门 和玉蟾宫差不多 ——代码 #include <cstdio> #include <iostream> using namespace std; ; int n, m, ...