Google Jekyll 放大模板中的 AMP 加速移动页面
Google AMP Accelerated Mobile Pages in Jekyll amplify template
我想利用 Google 的加速移动页面:
https://www.ampproject.org/ describing https://github.com/ampproject/amphtml
ICYMI,它用 Google 替换了一些 HTML 标签以超快地传送页面。
更具体地说,我想了解如何让 Jekyll 库使用 AMP。
所以我下载了:https://github.com/ageitgey/amplify
捆绑后,我收到以下消息:
```
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/hitimes-1.2.2.gem)
Using colorator 0.1
Using ffi 1.9.10
Installing sass 3.4.15
Installing rb-fsevent 0.9.5
Using kramdown 1.9.0
Using liquid 3.0.6
Using mercenary 0.3.5
Using rouge 1.10.1
Using safe_yaml 1.0.4
Using jekyll-paginate 1.1.0
Using bundler 1.11.2
An error occurred while installing hitimes (1.2.2), and Bundler cannot continue.
Make sure that `gem install hitimes -v '1.2.2'` succeeds before bundling.
```
我安装 hitimes 后,在尝试 jekyll serve 时收到此消息:
```
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/mac/gits/jekyll/amplify/_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/!
```
奇怪的是我确实用这个命令安装了它:
gem install jekyll-paginate
_config.xml 文件包含:
gems:
- jekyll-paginate
知道如何解决这个问题吗?
将 jekyll-paginate 目录从 ruby 安装复制到您站点的 _PLUGINS 目录。
或使用此命令构建和服务
bundle exec jekyll serve
嗨,我给你我的步骤
git clone https://github.com/ageitgey/amplify.git
cd amplify
bundle install
bundle update
bundle exec jekyll build --incremental
bundle exec jekyll serve --incremental -- watch
按上面的步骤做,现在你在 AMP 中得到了你的 Jekyll
我想利用 Google 的加速移动页面: https://www.ampproject.org/ describing https://github.com/ampproject/amphtml
ICYMI,它用 Google 替换了一些 HTML 标签以超快地传送页面。
更具体地说,我想了解如何让 Jekyll 库使用 AMP。 所以我下载了:https://github.com/ageitgey/amplify 捆绑后,我收到以下消息:
```
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/hitimes-1.2.2.gem)
Using colorator 0.1
Using ffi 1.9.10
Installing sass 3.4.15
Installing rb-fsevent 0.9.5
Using kramdown 1.9.0
Using liquid 3.0.6
Using mercenary 0.3.5
Using rouge 1.10.1
Using safe_yaml 1.0.4
Using jekyll-paginate 1.1.0
Using bundler 1.11.2
An error occurred while installing hitimes (1.2.2), and Bundler cannot continue.
Make sure that `gem install hitimes -v '1.2.2'` succeeds before bundling.
```
我安装 hitimes 后,在尝试 jekyll serve 时收到此消息:
```
WARN: Unresolved specs during Gem::Specification.reset:
jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/mac/gits/jekyll/amplify/_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/!
``` 奇怪的是我确实用这个命令安装了它:
gem install jekyll-paginate
_config.xml 文件包含:
gems:
- jekyll-paginate
知道如何解决这个问题吗?
将 jekyll-paginate 目录从 ruby 安装复制到您站点的 _PLUGINS 目录。
或使用此命令构建和服务
bundle exec jekyll serve
嗨,我给你我的步骤
git clone https://github.com/ageitgey/amplify.git
cd amplify
bundle install
bundle update
bundle exec jekyll build --incremental
bundle exec jekyll serve --incremental -- watch
按上面的步骤做,现在你在 AMP 中得到了你的 Jekyll