Liquid syntax error in href

Do you know why Jekyll keeps returning Liquid Warning: Liquid syntax error (line 10): Unexpected character in "{{ app.url }}" in applications.md ?

applications.md:

---
title: Applications
layout: applications
---

<div class="grid-apps">

  {% for app in site.data.applications %}

  <div class="card">
    <img class="card-img-top" src="" alt="Card image cap">
    <div class="card-body">
      <h4 class="card-title">{{ app.name }}</h4>
      <p class="card-text">{{ app.description }}</p>
      <a href="{{ app.url }}" class="btn btn-primary">Visit</a>
    </div>
  </div>

  {% endfor %}

</div>

applications.yml:

- name: app 1
  description: blablabla 1
  url: http://inwardmovement.fr/1

- name: app 2
  description: blablabla 2
  url: http://inwardmovement.fr/2

And Sublime text console:

OSError: [Errno 22] Invalid argument: 'C:\\laragon\\www\\inwardmovement.github.io\\applications.md*'

Looks like your indents are off for description and url lines. They should be lined up with name.

- name: app 1
  description: blablabla 1
  url: http://inwardmovement.fr/1

- name: app 2
  description: blablabla 2
  url: http://inwardmovement.fr/2

Also might want to put the urls in quotes just in case there is something going on with how Liquid is processing those strings.

It was only a layout thing here, the indentation is good (I edited my message).
I also tried with quotes but nothing changes…

What if you try getting rid of the spaces insite the brackets in {{ app.url }}?

I found out that Liquid does not like non breakable spaces inside brackets, I configured my IDE to show invisible characters to spot any non standard spaces.

1 Like

Hey Frank you were right! Thanks. I just deleted these spaces and rewrote them, then no error. I just discovered it’s pretty common as the alt + combination can fire an undesirable non-breakable space, but it seems specific to french keyboards.

Just installed Unicode character highlighter for Sublime Text, it should help haha.

image

Have a great day folks and thanks again.