赞
踩
使用以下命令安装 Jekyll。
$ gem install jekyll
在中国可能需要使用代理软件。然后,请等待并学习如何使用它。
或者,您可以使用 rails 替代 Jekyll。
如果您使用的是 Mac,请使用以下命令。
$ sudo gem install jekyll
您需要了解如何使用 Git。
有时候工作需要,会使用 windows 系统。如果对于 blog 进行编辑,想看到效果十分麻烦。因此尝试在 windows 下安装 jekyll.
一、Download
Download the fit installer for your computer;
二、Install
安装时勾选上 Add Ruby executables to your PATH
;
三、Version
命令行输入如下
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
一、Download
Download the fit installer for your computer;
选择匹配的软件。本次选择 DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
,
For use with Ruby 2.0 to 2.3 (x64 - 64bits only)
二、UnZip
下载并解压文件至路径如D:\Devkit下:
三、Run
$ cd d:\Devkit
[D:\Devkit]$ ruby dk.rb init
[INFO] found RubyInstaller v2.3.3 at D:/Ruby23-x64
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
查看 config.yml
应该有如下内容
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- D:/Ruby23-x64
四、Review & Install
[D:\Devkit]$ ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
D:/Ruby23-x64
[D:\Devkit]$ ruby dk.rb install
[INFO] Updating convenience notice gem override for 'D:/Ruby23-x64'
[INFO] Installing 'D:/Ruby23-x64/lib/ruby/site_ruby/devkit.rb'
一、Ensure gem has install
[D:\Devkit]$ gem -v
2.5.2
二、Install jekyll
use
$ netstat -ano
$ tasklist /svc /FI "PID eq ${pid}"
pid is the result of thread who occupy localhost:4000; Use task manager to kill this thread;
I have tried times, but also failed. Luckily, jekyll is still work well.
Configuration file: /Users/houbinbin/blog/houbb.github.io/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-paginate or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-paginate' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
jekyll 3.1.3 | Error: jekyll-paginate
solve method.
$ sudo gem install jekyll-paginate
我是直接将semantic引用此文件的地方注释掉了。
把这个添加到文件中,就可以生成目录。
* any list
{:toc}
分页功能插件使得 paginator
liquid 对象具有下列属性:
属性 | 说明 |
---|---|
page | 当前页码 |
per_page | 每页文章数量 |
posts | 当前页的文章列表 |
total_posts | 总文章数 |
total_pages | 总页数 |
previous_page | 上一页页码 或 nil(如果上一页不存在) |
previous_page_path | 上一页路径 或 nil(如果上一页不存在) |
next_page | 下一页页码 或 nil(如果下一页不存在) |
next_page_path | 下一页路径 或 nil(如果下一页不存在) |
博客写好之后,直接搜索基本搜索不到。
特殊符号,比如使用 vue 学习的时候,就会用到双边花括号,但是这个是 jekyll 的内置符号。
解决方案如下:
{% raw %}
{% comment %} 这里是各种包含奇怪花括号 {{{0}}} 的地方 {% endcomment %}
{% endraw %}
has done!
$ gem install jekyll-sitemap
ERROR: Could not find a valid gem 'Jekyll-sitemap' (>= 0), here is why:
Unable to download data from https://gems.ruby-china.org/ - bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
日志
https://gems.ruby-china.com/ added to sources
source https://rubygems.org/ not present in cache
sudo gem install jekyll-sitemap
日志
Fetching: jekyll-sitemap-1.2.0.gem (100%)
Successfully installed jekyll-sitemap-1.2.0
Parsing documentation for jekyll-sitemap-1.2.0
Installing ri documentation for jekyll-sitemap-1.2.0
Done installing documentation for jekyll-sitemap after 0 seconds
WARNING: Unable to pull data from 'https://gems.ruby-china.org/': bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
1 gem installed
site:https://houbb.github.io/
如果提示说:找不到和您查询的“site:https://houbb.github.io/”相符的内容或信息,说明未被收录。
如果搜索结果中你第一眼就看到了你的博客站点,说明已被收录,不用再继续看下面的内容了。
写了大概3年多的博客,回首看收获了很多。
为了以后博客的更好管理,规定如下标准。
时间:2022-05-29
发现 search 无法工作,debug 发现标题如果出现 "
,会导致 json 的解析失败。
统一采用:
yyyy-MM-dd-${category}-${order}-name-${order}.md
所有名称统一使用小写的形式。
所有同一个类型的博客,放在一起形成一个系列。
除非确定一定不会扩展的内容,建议还是学习所有的知识都是从 00-overview 开始。
常见的 tag 规定如下:
overview 概览
quick-start 快速开始
why-so-fast 为什么速度这么快
why-choose 为什么选择这个技术
project-architecture 项目架构
in-action 实战
summary 总结
sh 新知识(stay-hungry)
sf 旧知识(stay-foolish)
技术分类则根据实际需要
作为技术文章,建议有以下几个部分:
开篇:介绍技术的背景,实际的业务场景
概念理论:
实战测试:
拓展发散:
总结归纳:
http://vdaubry.github.io/2014/10/21/SEO-for-your-Jekyll-blog/
https://crispgm.com/page/48-tips-for-jekyll-you-should-know.html
https://github.com/jekyll/jekyll-seo-tag
http://faso.me/notes/2013/07/27/jekyll-sitemap-without-plugin/index.html
https://www.jianshu.com/p/60f3707cb3ce?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。