Questions tagged [jekyll]

Jekyll is a blog-aware, static site generator written in Ruby. Please refer to https://talk.jekyllrb.com before asking your question.

Jekyll logo

Jekyll is a blog-aware, static site generator written in Ruby.

It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache, the built-in WEBrick server or the web server of your choice. This is also the engine behind GitHub Pages, which you can use to host your project’s page or blog with GitHub.

Jekyll also offers a way to customize it via plugins written in Ruby.


Notable site using it:

Resources:


Latest Release:

Gem Version

5780 questions
57
votes
10 answers

Unable to set favicon using Jekyll and github pages

I am trying to set a favicon.ico for my github page, but it doesn't work. When I serve it locally I see the standard "empty" favicon and when I push it I see the facebook icon. Why is it so? I have the right favicon.ico in the root directory of my…
Dror
  • 9,918
  • 17
  • 70
  • 137
56
votes
7 answers

301 redirect for site hosted at github?

Here's a Github repository of mine: https://github.com/n1k0/casperjs There's a gh-pages branch to hold the project documentation, which is basically the project website: https://github.com/n1k0/casperjs/tree/gh-pages This branch setups the…
NiKo
  • 10,608
  • 5
  • 42
  • 56
56
votes
3 answers

What's the difference between categories and tags in Jekyll?

Both of their elements can be accessed by for..in, and the way of adding categories and tags are the same. So, what's the difference between categories and tags in Jekyll?
jiyinyiyong
  • 4,190
  • 6
  • 39
  • 83
54
votes
3 answers

Iterate over hashes in liquid templates

I'm writing a site in Jekyll, which uses Liquid. I have front matter for pages that I'd like to look like this: --- title: Designing algorithms that scale horizontally speaker: Luke Ehresman, CopperEgg category: notes.mongodallas.talks links: -…
Brian Hicks
  • 5,683
  • 7
  • 48
  • 75
53
votes
1 answer

Jekyll/Liquid - how to add large blocks of text to YAML front matter?

I'm trying to implement a service catalog in Jekyll, in which each of 20 or 30 pages will contain a 7x2 table. The left column will hold labels, e.g. Overview, Available To, etc, while the right column will hold between one line and several…
patrickjmc
  • 539
  • 1
  • 4
  • 3
53
votes
4 answers

Generating a list of pages (not posts) in a given category

I am using Jekyll as a static generator for a website (not a blog), and I want to have an automatically generated list of all pages on my index page. Specifically, I want to have different categories and list all articles in each category…
Mike
  • 1,509
  • 2
  • 14
  • 20
52
votes
2 answers

Does Liquid have a "does not contain" or "not in array" operator?

When calling items from and array in a Liquid template, how do you call does not contain or not in array?
mike
  • 1,508
  • 2
  • 18
  • 27
51
votes
10 answers

Jekyll select current page url and change its class

I've been using Jekyll for a static site (so that its easy to maintain), and have been stuck at the following feature : This is my link bar :
51
votes
6 answers

Jekyll display posts by category

scratching my head over this - help much appreciated. I want to display a list of all my Jekyll posts, organised by category. I know Line 3 isn't correct but I can't figure out what it should be. Any ideas? Thanks! {% for category in…
Alex G
  • 1,516
  • 2
  • 16
  • 18
49
votes
15 answers

Jekyll - command not found

I am trying to get Jekyll running but I have no experience with Ruby. As far as I can tell the installation of Jekyll has succeeded. However: $ jekyll Gives an error: -bash: jekyll: command not found This is the gem env result: - RUBYGEMS…
DADU
  • 5,236
  • 5
  • 38
  • 61
49
votes
5 answers

Switch theme in an existing Jekyll installation

There are many themes for Jekyll, e.g. https://github.com/jekyll/jekyll/wiki/Themes. What is the easiest way to switch to a new theme in an EXISTING Jekyll installation?
majom
  • 7,188
  • 5
  • 50
  • 83
49
votes
8 answers

Jekyll/Liquid Templating: How to group blog posts by year?

I'm rewriting my blog to use Jekyll. Jekyll uses the Liquid templating language so it makes it a little more difficult to learn how to customize. I'd like to group my list of blog posts by year. How would I write the Liquid code to be able to do…
Andrew
  • 196,883
  • 184
  • 487
  • 673
47
votes
2 answers

Liquid templates: even/odd items in for loop

If I have a for loop in Liquid (using Jekyll), how can I target even (or odd) items only? I have tried: {% for item in site.posts %} {% if forloop.index % 2 == 1 %} but that doesn't seem to work. I have also tried: (forloop.index % 2) ==…
Adam Kiss
  • 11,411
  • 8
  • 46
  • 79
47
votes
4 answers

How to customize Jekyll's url?

I would like to use Jekyll to create a site. not a blog. Is there a way to avoid to have the creation date specified in the url and in the page's file name? I think that the idea behind Jekyll is brilliant, but it seems too tied to blog generation…
alexyz78
  • 4,485
  • 6
  • 37
  • 46