Ghost Theme Customization: Editing the Ruby Theme in a Local macOS Dev Environment

How to customize the Ruby theme of a Ghost blog on macOS — the whole process from building a local dev environment with nvm and Node.js to applying the Pretendard font, setting up robots.txt, and packaging and applying the theme.

Customizing the Ghost Ruby theme on macOS

Starting Ghost Theme Customization

After installing the Ghost blog, I decided to try modifying the theme myself. Rather than making lots of changes, the goals were to understand the structure, swap the default font for Pretendard (which suits Korean text well), and add a robots.txt file for search crawler settings. Like WordPress, the fonts Ghost provides are mostly suited to English, so I consider this step essential for a Korean blog.

1. Setting Up a Local Ghost Dev Environment

To modify a theme, you first need a Ghost development environment. For this I installed the following tools on macOS:

  • nvm: for easy Node.js version management
  • Node.js: the version Ghost recommends (currently v20.x)
  • yarn: the package manager needed for Ghost theme development

I covered this in a previous post.

2. Checking That Ghost Is Running

In the terminal, move to the Ghost install directory.

cd ~/ghost-dev

Check the status of the installed Ghost instance.

ghost ls
┌─────────────┬──────────────┬─────────┬─────────┬─────┬──────┬─────────────────┐
│ Name        │ Location     │ Version │ Status  │ URL │ Port │ Process Manager │
├─────────────┼──────────────┼─────────┼─────────┼─────┼──────┼─────────────────┤
│ ghost-local │ ~/ghost-dev  │ 5.129.1 │ stopped │ n/a │ n/a  │ n/a             │
└─────────────┴──────────────┴─────────┴─────────┴─────┴──────┴─────────────────┘

Ghost isn't running right now. If it's stopped, start it.

ghost start

After starting, open http://localhost:2368/ghost/ in Chrome or another browser to go to the admin page.


3. Downloading and Applying the Theme

Ghost ships with the ruby theme built in, but because of a yarn-related issue I decided to download it manually from GitHub.

Remove the previously installed default ruby theme, since it can cause confusion.

rm -rf ~/ghost-dev/content/themes/ruby

Then, in the Ghost admin page, go to
Settings icon > Design > Theme > Upload
and upload the downloaded ZIP file to apply the theme.


4. Moving to the Theme Folder and Setting Up the Dev Environment

cd ~/ghost-dev/content/themes/ruby
yarn install

Node.js and yarn must be installed beforehand.

If yarn isn't installed, install it globally.

npm install -g yarn

Run the build tool for local development in the theme folder (/ghost-dev/content/themes/ruby):

yarn dev

This command reflects changes in real time, and the built result is generated as assets/built/screen.css.


5. Ruby Theme Directory Structure

├── assets
├   ├─ built
├   ├─ css
├   ├─ fonts
├   ├─ images
├   └──js
├── dist
├── node_modules
├── partials
├── author.hbs
├── default.hbs
├── gulpfile.js
├── index.hbs
├── LICENSE
├── page.hbs
├── post.hbs
├── README.MD
└── tag.hbs

You need to edit the CSS files in assets>css. With yarn dev running, editing the CSS files in the assets>css folder automatically merges and minifies them into built's screen.css.


6. Applying the Pretendard Font

Edit the font definition file.

In an IDE like VS Code, open assets/css/general/font.css, delete everything, and add only the following:

@import url("https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard-dynamic-subset.min.css");

Open assets/css/general/basics.css, where the font is applied, and change the existing font setting as follows:

--font-sans: Pretendard, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;

This setting applies globally to every page.


7. Search Crawler Settings (robots.txt)

Create a robots.txt file in the theme's root folder.

User-agent: *
Allow: /
Disallow: /ghost/
Sitemap: https://mangobox.co.kr/sitemap.xml

8. Packaging and Uploading the Theme

When you're done, stop yarn dev:

Ctrl + C

Then package the theme as a zip file.

yarn zip

A packaged theme file is automatically created in the dist folder.

├── assets
├── dist
├   └──ruby.zip

Upload this file to the admin page of your live Ghost site and the customizations are applied.


These are simple edits, so even a plain text editor works, but using an IDE is recommended for convenience. Typical options:

  • VS Code (light and familiar)
  • Cursor (a modern AI-based editor)
  • WebStorm (a professional IDE from JetBrains)

Wrapping Up

Now I understand the theme's structure, I've changed the font, and I've finished the search settings.
Ghost has a simpler structure than you'd expect, and once you're used to it, it's an easy platform to customize.
It was a good enough start for decorating a blog in my own style.