Ускоренные мобильные страницы Google AMP в шаблоне Jekyll amplify

Я хотел бы воспользоваться ускоренными мобильными страницами Google: https://www.ampproject.org/ с описанием https://github.com/ampproject/amphtml

ICYMI заменяет некоторые HTML-теги тегами Google для сверхбыстрой доставки страниц.

В частности, я хотел бы посмотреть, как заставить библиотеки 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

Есть идеи, как это исправить?


person Wilson Mar    schedule 30.03.2016    source источник


Ответы (2)


Привет, я дам тебе свой шаг

  1. git clone https://github.com/ageitgey/amplify.git
  2. cd amplify
  3. bundle install
  4. bundle update
  5. bundle exec jekyll build --incremental
  6. bundle exec jekyll serve --incremental -- watch

выполните шаг за шагом выше, теперь вы получаете свой Jekyll в AMP

person Denny Rakhmad Widi Ashari    schedule 20.03.2017

скопируйте каталог jekyll-paginate из установки ruby ​​в каталог _PLUGINS вашего сайта.

или используйте эту команду для создания и обслуживания

bundle exec jekyll serve
person LearnPainLess    schedule 09.04.2016