Minima theme build shows "Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences"
Asked Answered
A

2

11

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.

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?

Assist answered 11/11, 2022 at 21:7 Comment(1)
The minima theme is going through some backward-compatibility changes. I've more or less gotten the information I was looking for. The solution(s) and other info can be found here: minima-social-icons.html breaks jekyll buildAssist
A
15

The problem is 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" }
Ajax answered 14/11, 2022 at 4:53 Comment(3)
Is that necessary to update at both locations (remote_theme and social_links)? I tried on the local environment, updating at social_links like you suggest above may already be sufficient.Carrigan
It's good to update and lock the remote_theme only if you don't want any other breaking changes to break the site (but then will have to occasionally update that commit whenever you want to include the latest features). Otherwise, for now, only the social_links update should fix the issue.Ajax
remote_theme: jekyll/minima@<296bf6b872b8450529bee1e48d0ca9be200a4be5 Fixing to this commit works for me! Thanks!Olmos
B
6

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/" }
Balboa answered 13/11, 2022 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.