Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy action fails when news title contains apostrophe (') #2876

Closed
2 tasks done
IBzerbasteln opened this issue Dec 5, 2024 · 5 comments · Fixed by #2879
Closed
2 tasks done

Deploy action fails when news title contains apostrophe (') #2876

IBzerbasteln opened this issue Dec 5, 2024 · 5 comments · Fixed by #2879
Labels

Comments

@IBzerbasteln
Copy link

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

I've added an inline announcement that contains an apostrophe which prevents the install and build action.

How to reproduce the bug

  1. Add a news entry that contains an apostrophe. Mine is:
---
layout: post
date: 2024-10-18 10:38:00+0100
inline: true
related_posts: false
---

Invitation to speak at the Muséum National d'Histoire Naturelle (Paris).
  1. Commit to main and push.
  2. GitHub "Deploy site" action should be failing, specifically the "Install and Build" job.

Error messages and logs

Error: Process completed with exit code 1.

What operating system are you using?

Windows

Where are you seeing the problem on?

Running locally without Docker

More info

Things I've tried

Based on the information from this page, I've tried to replace the ' with different HTML encodings (' and ') and with escape syntax (\') but that didn't resolve the issue.

@george-gca
Copy link
Collaborator

I just tested and it worked fine. Are you using a recent version of the template?

A simple inline announcement with Markdown's emoji! :sparkles: :smile:

image

@IBzerbasteln
Copy link
Author

That's odd---I've tried adding an apostrophe to the news entry that you modified as well, and that also keeps my page from being built. I've only forked the template repository on 6 November 2024 so I'd say I'm using a fairly recent version...

@george-gca
Copy link
Collaborator

Just checked your code and your _includes/news.liquid is almost identical as ours _includes/news.liquid.

Looking further into your error here, it is a uglifier error. Uglifier is run only when JEKYLL_ENV=production, which we set when the code is being deployed to GitHub sites.

So I tried to reproduce it locally with JEKYLL_ENV=production bundle exec jekyll serve and indeed it failed. Looking for a fix, since it actually failed while generating the search data.

george-gca added a commit that referenced this issue Dec 6, 2024
Fix #2876 

Weirdly enough, we already escape the title a few lines above the
changed one, but had to escape it again here.

Signed-off-by: George Araújo <george.gcac@gmail.com>
@george-gca
Copy link
Collaborator

Check if this solves for you @IBzerbasteln.

@IBzerbasteln
Copy link
Author

Works like a charm, thank you so much for solving this so quickly!

raishish pushed a commit to raishish/raishish.github.io that referenced this issue Dec 15, 2024
Fix alshedivat#2876 

Weirdly enough, we already escape the title a few lines above the
changed one, but had to escape it again here.

Signed-off-by: George Araújo <george.gcac@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants