How can I use smart quotes in the Ghost editor?

I managed to set this up last night, with some help from the (excellent) customer service in Ghost (Pro). Will share their response here:

  • download your active theme first from within Ghost Admin, in the Settings > Themes area.
  • Once downloaded, unzip the theme, and include the smartquotes.js file (available for download here) and add it to your /asset/js/ folder.
  • Once added, you need to reference the fine within your theme’s default.hbs template using the asset helper, before the closing to reference the file, as well as initialize the script, like this:

<script src="{{asset "js/smartquotes.js"}}"></script>

<script>smartquotes();</script>

When you’ve finished editing your theme, and including the file, you can rezip the entire theme folder for upload back to your site for use.

I’m not a programmer either, so a tip that might save you some trouble: if you have a Mac, don’t use TextEdit to edit the file, because it garbles it. I used Atom.

If you follow the steps, smart quotes work fine. Though I was expecting them to change in the editor and actually they just change in the resulting post/preview :). Still, it’s the result that counts. Good luck.

2 Likes