Questions tagged [liquid]

Liquid is an open-source template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. Liquid has been in production use at Shopify since 2006 and is now used by many other hosted web applications.

Liquid is a templating engine for creating web pages. From the Liquid website:

Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.

Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

It was developed to for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

In addition, Liquid is also used as the main templating engine on GitHub pages through the Jekyll static site generator.

3995 questions
1
vote
3 answers

Skip Add to Cart process and direct redirect to Checkout Page from Product Detail Page clicking a button, in Shopify

I am developing a project in Shopify with Brooklyn Theme for a client. Our client has only three products to show with 4 variants for each product. As per the requirement, we don't have to redirect on Cart page just have to redirect to the Checkout…
Amitabha Ghosh
  • 73
  • 1
  • 2
  • 12
1
vote
1 answer

Github public site with Jekyll does not update anymore

Excuse me again for seeking help for my site at meredithhu.github.io. All the codes are here: https://github.com/meredithhu/meredithhu.github.io. As you can see the updated codes never get updated any more, for instance, the About page here…
shenglih
  • 879
  • 2
  • 8
  • 18
1
vote
1 answer

Jekyll extracting filename from url with Ruby

I'm trying to extract the file name from a url on Jekyll using this ruby snippet: {% assign filename = page.url.split('/')[-1] | replace: '.html', '.md' %} If I just use: {% assign filename = page.url | replace: '.html', '.md' %} I get back the…
Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225
1
vote
2 answers

Can you iterate a front matter collection variable in Jekyll?

I'm trying to see if it's possible to iterate a variable in Jekyll for a testimonial block I'm implementing for a Jekyll site. Basically, I'd like to have an icon be multiplied by the number dictated in my collection. Is this even possible with…
Sean Kelly
  • 901
  • 7
  • 27
1
vote
1 answer

Jekyll "Liquid syntax error" with limit

I can't figure out what's going wrong here, I have several other pieces of code with the same structure yet they don't return this error. Here is the liquid code within the HTML file (item.html) that I'm having trouble with: {% assign…
greystash
  • 319
  • 1
  • 18
1
vote
1 answer

Jekyll Liquid Template: Use Variable of Layout in Page

i have the following files: _layouts/twoPointLayout.html --- layout: documentationLayout --- {% assign col = site.interfaceServer | where:"neededTopCollectionItem", page.topCollectionItem | sort: "order" %}
1
vote
1 answer

Permalink to External Site with YAML Front Matter

Is it possible to set a permalink to an external site within YAML front matter? I am currently using Jekyll, and I am not finding any information using my Google-Fu. --- layout: full-width title: TEST permalink:…
Kahn
  • 149
  • 1
  • 10
1
vote
1 answer

Navbar links are working wrong in Jekyll

I added a simple navbar with 3 nav tabs using twitter bootstrap on Github pages, but I don't know why it is behaving strange.
1
vote
1 answer

Set Meta Title and Description for Blog Tags in Shopify

I'm starting to migrate my blog from wordpress to shopify. I'm trying to use the blog tags to split posts into categories. The problem is the meta titles for tags are auto generated, and the meta description is auto copied from the blog pages meta…
1
vote
1 answer

Liquid warning syntax error

Liquid Warning: Liquid syntax error (line 40): Expected end_of_string but found string in "{{page.title | truncate '110' | cgi_escape }}" in /_layouts/post.html Liquid Exception: undefined method line_number for "":String in…
1
vote
1 answer

Highlighting Jekyll Itself

I want to write {{ site.url }} on the code snippet of my Jekyll blog. But unfortunately it shows my username.github.io in the code snippet. How can I avoid this problem and show {{ site.url }} in the code snippet?
Arun
  • 343
  • 3
  • 12
1
vote
1 answer

How to reverse the chronological order of pages?

I use page.previous and page.next to create links to neighbor pages. The problem is that the "next" page is the one which is chronologically earlier. In other words, my latest page has one link, page.next (linking to an older page) Is it possible…
WoJ
  • 27,165
  • 48
  • 180
  • 345
1
vote
2 answers

Shopify liquid, add multiple products to cart

So I used shopify liquid to add a collection page, in this collection page, there is multiple products. A button named "Add all" will add all products from this collection to shopping cart when click. How can I achieve this in shopify liquid…
harryfeng
  • 523
  • 6
  • 20
1
vote
1 answer

Jekyll Liquid : does post_url accept variable?

this works fine: {% post_url 2017-06-14-Home %} but this doesn't: {% assign mypost = '2017-06-14-Home' %} {% post_url {{mypost}} %} Why? This seems to be pretty straightforward... EDIT OK, so finally I ported my site to Pelican. Now it works just…
tnorgd
  • 1,580
  • 2
  • 14
  • 24
1
vote
2 answers

Calculate how much has been donated from total spent in Shopify

So I'm working on a website where the owner donates a certain percentage of every order to a charity. At the bottom of the user's account page is a section that shows the customer how much donations has been made from all of their orders. So…
ConduciveMammal
  • 455
  • 7
  • 20
1 2 3
99
100