Jekyll Paginator not working

Pagination in Jekyll only works in an index.html file. If you have other pages in the root of your project folder (say, about.html, poems.html) pagination will NOT work in them. To have pagination work in another page other than your index.html, create a new folder for that page (say, poems/) and change what would have … Read more

Jekyll — Change layout if page is a post?

Since Jekyll 2.0, you can use Front Matter Defaults: defaults: – scope: path: “” # empty string for all files type: posts # limit to posts values: is_post: true # automatically set is_post=true for all posts then you can use {{ page.is_post }} to check whether the page is post. No idea why Jekyll doesn’t … Read more

How to list files in a directory with Liquid?

You can use this plugin. Copy and paste this code in a file inside the _plugins directory at the root of your Jekyll project. https://gist.github.com/jgatjens/8925165 Then to use it just add the lines below {% loop_directory directory:images iterator:image filter:*.jpg sort:descending %} <img src=”https://stackoverflow.com/questions/17446472/{{ image }}” /> {% endloop_directory %}

Include jekyll / liquid template data in a YAML variable?

Today I ran into a similar problem. As a solution I created the following simple Jekyll filter-plugin which allows to expand nested liquid-templates in (e.g. liquid-variables in the YAML front matter): module Jekyll module LiquifyFilter def liquify(input) Liquid::Template.parse(input).render(@context) end end end Liquid::Template.register_filter(Jekyll::LiquifyFilter) Filters can be added to a Jekyll site by placing them in the … Read more

How to adjust Jekyll post order?

There is an example in the official Jekyll documentation how to create a basic post archive page: Displaying an index of posts Bonus: For a prettier archive page (grouped by year or year/month), see this answer. You’re right, I can’t find anything in the docs where it says how the posts are ordered, but in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)