GitHub+Octopress搭建免费blog
生成github公钥
检查ssh公钥设置:
如果id_rsa*文件不存在,跳到第三步;
$ cd .ssh $ ls备份原来的ssh key:
备份旧数据,备份后删除旧数据;
$ mkdir key_backup $ cp id_rsa* key_backup $ rm id_rsa*生成github ssh key:
$ ssh-keygen -t rsa -C "id@youremail.com" <github 帐号> Generating public/private rsa key pair. Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<回车就好>然后系统会要你输入加密串
Enter passphrase (empty for no passphrase):<github密码> Enter same passphrase again:<再次输入密码>最后看到下面信息就成功了
Your identification has been saved in /Users/xxx/.ssh/id_rsa. Your public key has been saved in /Users/xxx/.ssh/id_rsa.pub. The key fingerprint is: ac:63:ff:c9:67:8f:c7:b7:26:43:77:83:bd:ef:11:be username@gmail.com The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . | | S .| | . ..| | + .o..| | . o . .o*o==| | ..+ooo*EO| +-----------------+添加ssh key到github:
复制id_rsa.pub的内容到github
Account Settings->SSH Keys->add SSH Key->Key
在github上使用octopress
在你本地安装octopress
$ git clone git://github.com/imathis/octopress.git octopress $ cd octopress # If you use RVM, You'll be asked if you trust the .rvmrc file (say yes). $ ruby --version # Should report Ruby 1.9.2 $ gem install bundler # Install dependencies $ bundle install $ rake install # Install the default Octopress theme配置你本地的octopress
创建github repo,名称
username.github.com配置octopress使之与
username.github.com关联$ cd octopress $ rake setup_github_pages Enter the read/write url for your repository (For example, 'git@github.com:your_username/your_username.github.com') Repository url: <git@github.com:yourname/yourname.github.com>
以上执行后会要求 read/write url for repository : git@github.com:yourname/yourname.github.com.git
初始化github
$ rake generate $ rake deploy等待几分钟后,github上会收到一封信:“[yourname.github.com] Page build successful”,第一次发布后等比较久,之后每次都会直接更新
将 source 也加入 git
$ cd octopress $ git add . $ git commit -m 'your message' $ git push origin source更新 Octopress
日后有 Octopress 新版本发布,使用以下指令升级。
$ git pull octopress master # Get the latest Octopress $ bundle install # Keep gems updated $ rake update_source # update the template's source $ rake update_style # update the template's style编写并发布文章
发表新文章:
$ rake new_post["文章名称"]该命令会在你的”octopress/source/_posts”目录下生成对应的”.markdown”文件,用任意文本编辑器编辑,使用markdown语法编写你的文章。
生成:
$ rake generate # generate your blog static pages content according to your input.预览:
$ rake preview # start a web server on "http://localhost:4000", you can preview your blog content.发布:
$ rake deploy # push your static pages content to your github pages repo ("master" branch)生成并发布:
$ rake gen_deploy
GitHub+Octopress搭建免费blog的更多相关文章
- 使用github + Octopress 搭建免费博客 + 碰到问题的解决方法
使用github + Octopress 搭建免费博客,先说碰到的问题,具体创建方法见下面. 问题1, 添加ruby淘宝链接问题,显示无法获取, 解决: source “http://ruby.tao ...
- 在github上搭建免费的博客
github好多年前,大家都开始玩啦,我这个菜鸟近几年才开始.github不仅可以管理项目,还可以搭建博客.技术人员,一般用的博客为博客园,CSDN多一些.看到朋友们都弄一个,我也开始弄起来,先找点资 ...
- 使用jsdelivr + GitHub + PicGo搭建免费图床
前言 之前一直有开通有道云笔记会员,主要是为了会员markdown图片可以在线保存的功能,前一阵子会员到期,考虑这个功能可不可以自己单独实现,从而替代使用有道云会员. 通过网上搜索的方式,查询到了几种 ...
- 教你如何使用github+jsDelivr搭建免费图床
前言 之前写了一篇文章,教你如何使用Typora+PicGo实现图片自动上传到图床 . 这里我用的是七牛图床,七牛图床有一定的免费使用量(没记错的话应该是10个G),如果你的存储量超过这个大小就需要付 ...
- Octopress + GitHub Page 搭建个人博客
Tips:博客已搬家,新地址:http://wanxudong.top 首先说明两个关键术语: Octopress Octopress是基于 Jekyll 的博客框架.他们的关系就像 jQuery 与 ...
- 利用Octopress在Github上搭建博客及后续问题总汇
首先贴一下我的新博客地址: http://findingsea.github.io 用Octopress在GitHub上搭建博客已经不是什么新鲜事了,网上的教程也多了去了,大题的方法什么都差不多,这篇 ...
- 使用Jekyll搭建免费的Github Pages个人博客
一.Git 1.Git概述 Git is a free and open source distributed version control system designed to handle ev ...
- 10分钟教你使用Picgo+GitHub+ jsDelivr搭建CDN加速免费图床
前言 经常写Markdown或者博客的同学,肯定都要用到图床.图床是什么呢?其实相当于一个存储图片的网站,类似百度云这样,不过上传图片到图床后可以直接通过外链进行访问. 比如把本地一张a.jpg上传到 ...
- 记github上搭建独立域名的免费博客的方法过程
前提:拥有github帐号,linux上安装好了git. 全局路线: 1. 设计一个你想要的二级域名,并在git上创建一个以[二级域名.github.com]作为项目名的repository. 过程详 ...
随机推荐
- Python并发(一)
假设我们要从一个网站用Python程序下载5张图片,最传统的思路就是写个for循环挨个挨个下载,但是这样做有个缺点,就是除了第一张,每张图片都必须等待前一张图片下载完毕后,才可以开始下载.由于网络有很 ...
- jenkins 之 Android 打包及上传至蒲公英
准备条件 iMAC,非必须(如果是 安卓 和 苹果 可以在同一台电脑上打包则要 Mac OS 系统的电脑,如果是只是给安卓打包 windows 电脑也是可以的, window 下 需要把 ls 换成 ...
- 【Codeforces Round #476 (Div. 2) [Thanks, Telegram!] C】Greedy Arkady
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 枚举那个人收到了几次糖i. 最好的情况显然是其他人都只收到i-1次糖. 然后这个人刚好多收了一次糖 也即 (i-1)kx + x & ...
- 国内外移动端web适配屏幕方案总结
基础知识点 设备像素:设备像素又称物理像素(physical pixel),设备能控制显示的最小单位,我们可以把这些像素看作成显示器上一个个的点. iPhone5的物理像素是640X1136. PS: ...
- Leetcode 450.删除二叉搜索树的节点
删除二叉搜索树的节点 给定一个二叉搜索树的根节点 root 和一个值 key,删除二叉搜索树中的 key 对应的节点,并保证二叉搜索树的性质不变.返回二叉搜索树(有可能被更新)的根节点的引用. 一般来 ...
- Spring配置文件中使用ref local与ref bean的区别
Spring配置文件中使用ref local与ref bean的区别.在ApplicationResources.properties文件中,使用<ref bean>与<ref lo ...
- Oracle实例和数据库区别
什么是数据库,其实很简单,数据库就是存储数据的一种媒介.比如常用的文件就是一种,在Oracle10G中,数据的存储有好几种.第一种是文件形式,也就是在你的磁盘中创建一批文件,然后在这些文件 ...
- 利用hibernate与struts框架制作简单注册界面
一:配置hibernate 1.导包 hibernate包和jdbc连接mysql数据库的包 2.实用工具生成hibernate配置文件和映射文件 3.做好hibernateUtil生成session ...
- iOS粒子效果
网址链接:http://www.cocoachina.com/bbs/read.php?tid-103257.html http://code.cocoachina.com/view/125060 粒 ...
- 【Luogu】P3746组合数问题(矩阵)
题目链接 哇我一个活人的智商被题目碾压了 可以把问题转化为有nk个物品,问拿i件物品的方案数有多少种,其中i%k=r. 然后矩阵乘法加速DP即可. #include<cstdio> #in ...