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
Post not shown if title contains : (colon) #549
Comments
An instant solution to this is to encode it yourself. A colon is: See: http://stackoverflow.com/questions/10963002/jekyll-new-posts-not-being-generated |
+1 |
The problem is it's hard to find which page contains colon. Jekyll produces exception:
|
When I use quotes around a title, the site is generated correctly. |
I had this problem when importing from a tumblr. To fix colons in titles (with python; I'm sure there's some one-liner to do this, but it works): import re
import glob
colon = re.compile(r"title:(.*:.*)")
for file in glob.glob("_posts/tumblr/*.html"):
with open(file) as f:
lines = f.readlines()
for i, line in enumerate(lines):
match = colon.match(line)
if match:
lines[i] = "title:" + match.group(1).replace(":", ":") + "\n"
with open(file, "w") as f:
print "updating ", file
for line in lines:
f.write(line) |
Instant help! Yay. |
Unfortunately, Jekyll can't do much about this. It's really a YAML problem. |
Can Jekyll not even do anything useful about the error message? A meaningful error message would be really helpful. |
@nottrobin On master, it looks like we give a more helpful error. Did you test on 1.0.0.beta2? |
👍 |
I'm using jekyll 2.5.3 and I'm still getting an unhelpful error:
line 3 contains the title of the post which has a colon in it. |
@gideonite We asked about this here, check it out: dtao/safe_yaml#54 |
Also using jekyll 2.5.3 and the workaround I prefer, is to use the "non-specifig tag" YAML syntax.
This allows me to use colon, double quotes, and pretty much any special char. |
The syntax suggested by @caioproiete works for me. |
I use |
This issue is more than three years old; I would hope everything works fine. |
Quotes worked |
in the YAML front matter, if I have
title: "Post title : Part 1"
the post is not shown by Jekyll.
The text was updated successfully, but these errors were encountered: