在执行 gem install jekyll报错了
C:\Sites> gem install jekyll
ERROR: Could not find a valid gem ‘jekyll’ (>= 0) in any repository
解决方法$ gem sources --remove RubyGems.org
$ gem sources -a RubyGems.org
$ gem install jekyll 我是这么解决的
然后,我又遇到了两个安装包没有安装的问题
D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/
resolver.rb:354:in `block in verify_gemfile_dependencies_are_found!': Could not
find gem 'minima (~> 2.0) x86-mingw32' in any of the gem sources listed in your
Gemfile or available on this machine. (Bundler::GemNotFound)
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/resolver.rb:330:in `each'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/resolver.rb:330:in `verify_gemfile_dependencies_are_found!'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/resolver.rb:199:in `start'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/resolver.rb:183:in `resolve'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/definition.rb:198:in `resolve'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/definition.rb:137:in `specs'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/definition.rb:182:in `specs_for'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/definition.rb:171:in `requested_specs'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/environment.rb:18:in `requested_specs'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler/runtime.rb:13:in `setup'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2
/lib/bundler.rb:92:in `setup'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/jekyll-3.3.0/l
ib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
from D:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/jekyll-3.3.0/e
xe/jekyll:9:in `<top (required)>'
from D:/RailsInstaller/Ruby2.2.0/bin/jekyll:23:in `load'
from D:/RailsInstaller/Ruby2.2.0/bin/jekyll:23:in `<main>'
直接执行gem install minima就行了,还有一个包是gem install jekyll-feed。
Jekyll目录结构解读
这是其他人的目录结构
blog
.sass-cache
_includes
footer.html
head.html
header.html
icon-github.html
icon-github.svg
icon-twitter.html
icon-twitter.svg
_layouts
default.html
page.html
post.html
_posts
2016-06-26-welcome-to-jekyll.markdown
_sass
_site
css
main.scss
.gitignore
_config.yml
about.md
feed.xml
index.html
我的和其他人的不太一样,不过我对比了下其他的首页,一样的,那就没有问题;
.sass-cache
sass的编译缓存文件。
_include
网页模块包含文件。可以方便的把这些文件加载到你的布局或者文章中,进行重用。他们都代表了最终生成的网页中的一部分。可以用这个标签:
来把_include 目录下的文件file.ext包含进来。
_layouts
存放包裹在网页外部的模板。为网站所有网页提供一个基本模板。每个网页只需关注自己的内容。例如 default.html 文件:
这个文件中包含的就是所有网页文件所共有的东西,每个页面的内容会被填充下面这行代码中:
在需要使用这个模板的页面中,用YAML头信息进行引用:
图中 index.html 文件的头部:
---
layout: default
---
作用是通过 layout 告诉Jekyll生成 index.html 时,要在_layouts 目录下找 default.html 文件,然后把当前文件解析后添加到 default.html 的content 的部分,组成最终的 index.html 文件。
附上github education福利。对 Github 个人主页最重要的礼包是 namecheap一年免费域名。当然 Digital ocean 100刀的福利也是棒棒的,ATOM编辑器也是写网站的不二选择。
https://education.github.com/
感觉各位前辈
http://www.ezlippi.com/blog/2015/03/github-pages-blog.html 利用github-pages建立个人博客
http://pwnny.cn/original/2016/06/26/MakeBlog.html Jekyll和Github搭建个人静态博客
http://www.winseliu.com/blog/2014/03/14/windows-install-jekyll/在windows操作系统安装jekyll服务
http://ytysj.github.io/blog/myblog3
http://www.alonemonkey.com/2016/05/20/blog-by-jekyll-hexo/
http://www.jianshu.com/p/4fd3cb0a11da苹果电脑
hexo感谢
模仿http://moxfive.xyz/?qqdrsign=00d3b
http://jiji262.github.io/2016/04/15/2016-04-15-hexo-github-pages-blog/
https://wsgzao.github.io/post/hexo-guide/
https://xuanwo.org/2015/03/26/hexo-intor/
http://blog.fens.me/hexo-blog-github/
https://segmentfault.com/a/1190000000458953
http://sunwhut.com/2015/10/30/buildBlog/