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

Including CSS stylesheets in Jekyll pages

The Jekyll way to do this is to take whichever layout you are going to use for the final page (for example _layouts/posts.html) and create your HTML document skeleton there (i.e. html, head, and body tags). In the head of the layout HTML, put {% include blog-head.html %}. This blog-head.html file is where we are … 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 %}

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