How do I turn off smart quotes and apostrophes in Jekyll? It is breaking my gulp spellcheck process.
I want words like doesn't
to stay with a single straight quote. Instead Jekyll is converting them to smart quotes like doesnt’
and I need them to stay single quoted for spell checking.
This is what I tried in my _config.yml:
kramdown:
smartquotes: ["apos", "rsquo", "ldquo", "rdquo"]
I'm using kramdown.
Here is my whole config:
name: Bitcoin Bulls
markdown: kramdown
timezone: America/Detroit
highlighter: pygments
author: David Smith
safe: true
lsi: false
permalink: none
url: http://www.bitcoinbulls.net
exclude: [CNAME, Gemfile, Gemfile.lock, '*.less', gruntfile.js, custom_css, node_modules, README.md, '*.svg', '*.docx']
include: [glyphicons-halflings-regular.svg]
kramdown:
smart_quotes: ["rdquo", "rsquo", "ldquo", "rdquo"]
relative_permalinks: false
defaults:
-
scope:
path: "" # empty string for all files
values:
layout: "default"
-
scope:
path: "" # empty string for all files
type: post
values:
layout: "post"
is_post: true
The underscore in smart_quotes
is missing and the second array item needs to be apos
to completely turn off smart-quotes for apostrophes.
kramdown:
smart_quotes: ["apos", "apos", "ldquo", "rdquo"]
To turn off smart-quotes for both apostrophes/single-quotes and double quotes, use this:
kramdown:
smart_quotes: ["apos", "apos", "quot", "quot"]
That's what is know as the "Programmer's world compliant config".
More details:
By default kramdown transforms apos and quot into typographic quotes. That is:
The default config provides guidance:
kramdown:
# smart_quotes:
#
# first parameter : how an opening apostrophe is transformed
# or apostrophe like in "I'm"
# default : ' -> ‘ (lsquo)
# apos : ' -> '
#
# second parameter : how a closing apostrophe is transformed
# default : ' -> ’ (rsquo)
# apos : ' -> '
#
# third parameter : how an opening double quote is transformed
# default : " -> “ (ldquo)
# quot : " -> "
#
# fourth parameter : how a closing double quote is transformed
# default : " -> ” (rdquo)
# quot : " -> "
#
# Default kramdown config
# smart_quotes: ["lsquo", "rsquo", "ldquo", "rdquo"]
#
# Programmer's world compliant config :
# smart_quotes: ["apos", "apos", "quot", "quot"]
Where:
Kramdown's documentation provides other options that may be of interest. The Wikipedia Quotation Mark page provides lots of details on the complications of interpretation and how things changed when Unicode was introduced.