Skip to content
offirmo edited this page Oct 16, 2017 · 14 revisions

Générateur de sites web statique. Le plus souvent utilisé en combinaison avec GitHub#hébergement-pages. Voir aussi ruby, bundler...

Site officiel : https://jekyllrb.com/

Introduction

Doc officielle :

Intro (pas super claire) par GitHub pour hébergement dans "pages" :

Installation

Utiliser directement la gemme de GitHub : https://github.com/github/pages-gem

sudo apt-get install libgmp3-dev
rvm install ruby-2.3.0
/bin/bash --login
rvm use ruby-2.3.0
gem install bundler --no-rdoc --no-ri
git clone xyz...

1ère install :

git checkout gh-pages
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'github-pages', group: :jekyll_plugins" >> Gemfile

Puis dans tous les cas :

bundle install
// not mandatory on GitHub, will do it itself
// but needed to preview site locally
bundle exec jekyll new . --force
bundle exec jekyll serve --host 0.0.0.0 --baseurl '' --incremental
rm -rf _site && bundle exec jekyll serve --host 0.0.0.0 --baseurl '' --incremental --verbose

then http://localhost:4000

plugins

Dans config.xml:

gems:
   - jekyll-mentions
   - jemoji
   - jekyll-redirect-from
   - jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem
   - jekyll-feed # Create an Atom feed using the official Jekyll feed gem
   - jekyll-seo-tag # Search engine optimization

Keeping up to date:

bundle update

Doc officielle d'installation : https://jekyllrb.com/docs/installation/

Utilisation

dev

bundle exec jekyll build
bundle exec jekyll build --watch
bundle exec jekyll serve
bundle exec jekyll serve --detach
bundle exec jekyll serve --no-watch
ps aux | grep jekyll

404

https://help.github.com/categories/customizing-github-pages/

thèmes

http://jekyllthemes.org/

Bons thèmes :

Installer un thème :

  • faire un diff...
 _includes
 _layouts

i18n

Avancé

liquid

jekyll utilise un moteur de templating appelé "liquid" https://github.com/Shopify/liquid/wiki

Problèmes rencontrés

Clone this wiki locally