在创建github page之前,最好阅读、了解ruby及相关命令和markdown,yaml,jekyll,liquid相关知识概念,再操作。
在搭建github page博客前,最后先看看别人如何搭建的 :
利用 GitHub Pages 快速搭建个人博客
Github Pages + Jekyll 独立博客一小时快速搭建&上线指南
搭建一个免费的,无限流量的Blog----github Pages和Jekyll入门
创建github.io blog仓库,进入仓库主页,点击Settting,进入仓库配置界面,然后修改主题: change themes
jeckyll主题选择,Creating a GitHub Pages site with the Jekyll Theme Chooser:
creating-a-github-pages-site-with-the-jekyll
architect主题: architect
选择主题时可以选择fork,或选择下载主题包,放到自己本地的github.io项目中。
先按照下面链接安装ruby和ruby开发包及jekyll,注意不要忘了安装ruby开发包
Running Jekyll on Windows
如果有插件不存在,可以参考下面的文章
Jekyll With Usefule Plugins
启动项目出现以下错误时
donald@donaldHP MINGW64 /f/github.io/Donaldhan.github.io (master)
$ jekyll serve
D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/resolver.rb:288:in \`block in verify_gemfile_dependencies_are_found!': Could not find gem 'github-pages x64-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/resolver.rb:256:in \`each'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/resolver.rb:256:in \`verify_gemfile_dependencies_are_found!'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/resolver.rb:48:in \`start'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/resolver.rb:22:in \`resolve'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/definition.rb:257:in \`resolve'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/definition.rb:170:in \`specs'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/definition.rb:237:in \`specs_for'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/definition.rb:226:in \`requested_specs'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:108:in \`block in definition_method'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:20:in \`setup'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/site_ruby/2.3.0/bundler.rb:107:in \`setup'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in \`require_from_bundler'
from D:/Ruby23-x64/Ruby23-x64/lib/ruby/gems/2.3.0/gems/jekyll-3.6.2/exe/jekyll:11:in \`<top (required)>'
from D:/Ruby23-x64/Ruby23-x64/bin/jekyll:23:in \`load'
可以按照如下做法:
整理Ruby相关的各种概念(rvm, gem, bundle, rake, rails等)
遇到如下问题:
GitHub Metadata: No GitHub API authentication could be found. Some fields ma
做法如下:
This is what I did to resolve this problem:
I also wrote a blog post about this case here.
出现如下问题:
F:\github.io\Donaldhan.github.io>bundle exe jekyll serve --incremental
Configuration file: F:/github.io/Donaldhan.github.io/\_config.yml
Source: F:/github.io/Donaldhan.github.io
Destination: F:/github.io/Donaldhan.github.io/\_site
Incremental build: enabled
Generating...
Liquid Exception: Invalid Repository. Use user/repo format. in /\_layouts/default.html
则修改_config.yml文件,中的github常量为:
github.repository_url: Donaldhan.github.io.git
repository: Donaldhan/Donaldhan.github.io.git
Jekyll & Liquid: Output category list with post count?
下面一个是第二种展示category的方式,我没有试过,我是以上面的一个连接为准。
3 Simple steps to setup Jekyll Categories and Tags
How to create a category/tags page in Jekyll without a list of posts for that tag?
An opinionated guide to common Jekyll design patterns and anti-patterns.
Liquid官网
Liquid中文简介
Jekyll/Liquid API 语法文档
Liquid 语言基础
在拥有上面所列的知识,我们可以尝试添加一个静态的全文搜索功能,可以参照如下链接:
Jekyll search组件
使用Tapir为Jekyll博客实现全局搜索
Jekyll + lunr jsblocks 强大的全文搜索,使用Javascript,在浏览器中搜索Jekyll静态网站
indextank-jquery is a bunch of little building blocks to make your search UX better
基于liquid的Jekyll Tipue Search
建议使用基于liquid的Jekyll Tipue Search,这个上手速度快,jekyll-lunr-js-search也不错,不过要安装 jekyll-lunr-js-search插件,这个要看运气了。
###Python 2.7.14
Python download
Python2.7教程
一个基于 Github Issue 和 Preact 开发的评论插件 gitalk
gitalk github项目地址
本身想用多说呢,但多说已死。 gitment与gitalk非常相似,建议使用gitalk。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。