Home > Software engineering >  Minima theme build shows "Liquid Exception: Invalid syntax for include tag. File contains inval
Minima theme build shows "Liquid Exception: Invalid syntax for include tag. File contains inval

Time:11-14

Here's a link to my website Facey's Thoughts and here's a link to the GitHub Pages project.

Cloning the (working) repository to my local machine and trying to run jekyll build fails with this error:

Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: social-icons/.svg Valid syntax: {% include file.ext param='value' param2='value' %} in assets/minima-social-ico.html

The Jekyll version is still the same as what's specified in my Gemfile: jekyll 4.3.1. I have no idea what's changed.

I've tried removing the minima-social-ico.svg file; I've tried removing the posts that I was trying to add; I've tried searching Online for something similar to this issue without luck.

I tried jekyll build with local files, cloning my GitHub pages repo to a new directory, and that repo for sure built last night, and I've tried removing any new .markdown files that I made since the last time it successfully built.

Now, I tried the following:

If I comment out social_links from my _config.yml file, it will build, I assume because it's not using the minima_social_icons.svg file. Why did it work and now it doesn't?

I found a solution:

In case other people search for the same issue, see my comment for a link to the GitHub issue.

CodePudding user response:

Updating social links to be more explicit solved it for me:

  social_links:
    - { platform: rss, user_url: "/feed.xml" }
    - { platform: github, user_url: "https://github.com/yshmarov/" }
    - { platform: twitter, user_url: "https://twitter.com/yarotheslav" }
    - { platform: linkedin, user_url: "https://www.linkedin.com/in/yshmarov/" }

CodePudding user response:

Thank you! had the same issue. The problem was more with using the remote theme without locking to a specific commit/tag. (Since the v3.0 is still in development, any breaking change added to the main branch will break the build as well, if we refer to the latest changes always.)

One can lock to a specific commit/tag as: (in _config.yml file)

remote_theme: jekyll/minima@<insert-commit-hash_or_tag>

This time the breaking change was #686. Using social links more explicitly, as mentioned by Yshmarov should resolve the issue.

minima:
  social_links:
    - { platform: github,  user_url: "https://github.com/jekyll/jekyll" }
    - { platform: twitter, user_url: "https://twitter.com/jekyllrb" }
  • Related