Jekyll: Uncaught SyntaxError: unexpected token: identifier

11 Dec 2021 - David Baker

Tags: jekyll code

If you encounter this in Jekyll where a blog post seemingly is not working when clicking on it, it might be because you have an apostraphe in the file name, like this:

_posts
    ...
    2021-12-11-Books-I've-Read-In-2021.md
    ...

Change it to something like this:

_posts
    ...
    2021-12-11-Books-Ive-Read-In-2021.md
    ...

Then in your actual Post, use override the title in the front matter:

---
layout: post
author: David
tags: books
title: "Books I've Read in 2021"
---