liquid

Can Jekyll act over css or js files?

本小妞迷上赌 提交于 2019-12-03 14:53:06
问题 I'm using Jekyll for one of my projects and it really seems a very good alternative for developing simple websites but maintaining some processes automated. It's nice how the Liquid Extensions work, so I was wondering if it's possible to make Jekyll act over js and css files too. So I could have my main.css like: @import url("/stylesheets/reset.css?{{site.time | date: '%Y%m%d%H%M%S'}}"); @import url("/stylesheets/config.css?{{site.time | date: '%Y%m%d%H%M%S'}}"); Using some of the helpers I

SpriteKit Liquid (water)

别说谁变了你拦得住时间么 提交于 2019-12-03 11:47:22
How can I get a small amount of liquid in my spriteKit application? I want that liquid in a container, it will be sealed inside but I want it to be able to move around. Is there a better way to implement this? Maybe an option without SpriteKit? EDIT: I was able to simulate water using this tutorial: http://www.raywenderlich.com/85515/liquidfun-tutorial-1 and this sample project I found: https://github.com/safx/liquidfun-ios-sample BUT it requires me to run 2 physics worlds (1 for box2D and 1 with spriteKit). Does anyone know how I can get my particles from box2D into spriteKit? I imagine this

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

拟墨画扇 提交于 2019-12-03 11:33:18
问题 When calling items from and array in a Liquid template, how do you call does not contain or not in array ? 回答1: unless to the rescue ! Create an [A, B, C] array. {% assign input = "A,B,C" | split:"," %} unless print only if constrain is not met. This prints nothing: {% unless input contains 'A' %}No A{% endunless %} This prints " No Z ": {% unless input contains 'Z' %}No Z{% endunless %} 来源: https://stackoverflow.com/questions/30822160/does-liquid-have-a-does-not-contain-or-not-in-array

Outputting Literal curly braces in Liquid templates

不羁的心 提交于 2019-12-03 10:28:36
I'm trying to output the following from within a liquid template: {{ example }} Obviously, Liquid sees this as a variable named example and tries to do substitution. I'm trying to find out how I can output the actual braces. So far, I've found one method that works, but it's incredibly ugly: {{ '{example'|prepend:'{' }}}} Yeah, told you it was gross. Here are other things I've tried: {{{ example }}} # outputs '}' {{{{ example }}}} # outputs '}}' \{\{ example \}\} # outputs '\{\{ example \}\}' Any advice here? What about using the numeric HTML entities { and } for { and } respectively -

How do I use markdownify in Jekyll to show an excerpt on the index

☆樱花仙子☆ 提交于 2019-12-03 09:35:54
I'm looking to show a short excerpt of text from a longer post or page on the index page. I was going to use a custom variable in the Front Matter and grab that, but then I saw the filter for .excerpt I see in the Jekyll docs there's something called {{ page.excerpt | markdownify }} How would I markup the markdown on a page or post in order to use that filter? edit: Or does markdownify take the entire .md document? In the post markdown files you need to first set your excerpt, here is an example from one of my posts layout: post title: A developers toolkit date: Friday 14 December, 2012

Jekyll blog posts on non index.html pages

跟風遠走 提交于 2019-12-03 06:55:08
I have used the below code snippet from the Jekyll website to paginate Jekyll plog posts on my index.html page: <div class="container"> <ul class="post-list"> <!-- This loops through the paginated posts --> {% for post in paginator.posts %} <h1><a href="{{ post.url }}">{{ post.title }}</a></h1> <p class="author"> <span class="date">{{ post.date }}</span> </p> <div class="content"> {{ post.content }} </div> {% endfor %} {% if paginator.total_pages > 1 %} <div class="pagination"> {% if paginator.previous_page %} <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/

Jekyll templates using django-like liquid blocks / inheritance

ぐ巨炮叔叔 提交于 2019-12-03 06:06:42
I'm getting into Jekyll in a big way and would like to use it as a general front-end development platform, but am running up against the limitations of the Liquid templating language, specifically its difference to Django templating. I discovered the liquid-inheritance gem, which adds the all-important Extends and Block syntax from Django. This blog post extends the gem further to suit Jekyll's file system: http://www.sameratiani.com/2011/10/22/get-jekyll-working-with-liquid-inheritance.html The problem is that it doesn't appear to implement blocks in exactly the same way Django does, which

Using liquid to sort posts alphabetically

◇◆丶佛笑我妖孽 提交于 2019-12-03 05:47:49
问题 Is there a way to sort a number of posts alphabetically, using Jekyll? I have something like this now: {% for post in site.categories.threat %} <li><a href="{{ post.url }}">{{ post.title }}</a></li> {% endfor %} It works, but the posts are jumbled up. Would look much nicer if they were sorted alphabetically I think. Thanks 回答1: It can be done without a plugin, which means that it works with Github Pages. You have to use some ugly string manipulation tricks, though. I used a similar approach

Comparing dates in liquid

ε祈祈猫儿з 提交于 2019-12-03 05:39:00
I'm using Liquid with Jekyll to post dates on my band's website (http://longislandsound.com.au) What I want is to automatically hide old dates, so I don't have to go in and delete them again. I think the best way to do it would be to compare the post date to the current date and only display the post if the date is in the future, but I can't figure out how to do this. Here is the current code: <ul id="dates"> {% for post in site.posts reversed %} <a href="{{post.link}}"> <li> <div class="date"> <span class="day">{{post.date | date: "%d"}}</span><br /> <span class="month">{{post.date | date: "

Can Jekyll act over css or js files?

你离开我真会死。 提交于 2019-12-03 04:36:41
I'm using Jekyll for one of my projects and it really seems a very good alternative for developing simple websites but maintaining some processes automated. It's nice how the Liquid Extensions work, so I was wondering if it's possible to make Jekyll act over js and css files too. So I could have my main.css like: @import url("/stylesheets/reset.css?{{site.time | date: '%Y%m%d%H%M%S'}}"); @import url("/stylesheets/config.css?{{site.time | date: '%Y%m%d%H%M%S'}}"); Using some of the helpers I have and also some variables I could create using YML front matter, don't know if it's possible through.