# Saaga documentation

Version 2.0.0 · Updated 30 Nov 2026 · Works with Ghost 6 · Changelog: https://brightthemes.com/changelog/saaga

Source: https://brightthemes.com/docs/saaga

How to install, set up and customize the Saaga Ghost theme, from its design settings to theme development.

## Install the theme

Upload the theme to Ghost and activate it, step by step, in **Settings › Site › Theme**.

To upload the theme:

1.  Log in to Ghost Admin at `yoursite.com/ghost/`.
2.  Open **Settings › Site › Theme** and choose **Change theme**.
3.  Choose **Upload theme** and select `saaga.zip`, the file you downloaded. If a theme with the same name is installed, Ghost asks whether to overwrite it: choose **Overwrite** to update it and keep its design settings.
4.  When the upload is done, choose **Activate theme** in the **Upload successful** dialog.

Ghost checks the theme with GScan when you upload it and lists any problems. The full walkthrough, with what to check when something goes wrong, is in [How to install a theme in Ghost](https://brightthemes.com/blog/ghost-theme-install).

*Ghost Admin: Settings › Site › Theme › Change theme*

## Upload routes.yaml

Upload the theme's routes.yaml in **Settings › Advanced › Labs**, so collections and pages work as the theme expects.

> [!CAUTION]
> The theme's `routes.yaml` file is inside the theme's zip, and shown below. When it has more than Ghost's default routes (the `/` collection and the tag and author pages), the theme needs it: upload it, or the theme's extra collections and pages won't work. Uploading it replaces the site's routes, so add any routes of your own to it first.

Uploading `routes.yaml` is a separate step from uploading the theme:

1.  Log in to Ghost Admin at `yoursite.com/ghost/`.
2.  Open **Settings › Advanced › Labs**, choose **Open**, then the **Beta features** tab.
3.  In the **Routes** row, open the menu next to **Edit**, choose **Upload file** and select the `routes.yaml` from the root directory of the theme.

The `routes.yaml` in the zip sets up the URLs the theme expects. For everything routing in Ghost can do (collections, channels, taxonomies and static routes), see [Ghost CMS dynamic routing & routes.yaml](https://brightthemes.com/blog/ghost-routing).

*Ghost Admin: Settings › Advanced › Labs*

```yaml title="routes.yaml"
## routes.yaml
routes:

collections:
  /:
    permalink: /{slug}/
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
```

## Custom settings

Change the theme's design settings in Ghost Admin without code, and keep them when you update the theme.

The theme has its own [design settings](https://brightthemes.com/blog/ghost-custom-theme-settings), which you change in Ghost Admin without code. Open **Settings › Site › Design & branding** and choose **Customize**: the theme's settings are on the **Theme** tab, in up to three groups: **Site wide**, **Homepage** and **Post**. In these docs a setting is written with its group, for example **Settings › Site › Design & branding › Theme › Site wide**.

*Ghost Admin: Settings › Site › Design & branding › Theme*

The theme's settings, defined in its `package.json`:

| Setting | Group | What it does |
|---|---|---|
| Color scheme | Site wide |  |
| UI font family | Site wide | Set the font of the interface: navigation, buttons, labels |
| Footer image | Site wide | A wide image (about 3:1) with a dark sky at the top: it fills the footer, and the text turns white |
| Use portal links | Site wide |  |
| Hero style | Homepage |  |
| Hero headline | Homepage |  |
| Hero description | Homepage |  |
| Hero button text | Homepage |  |
| Hero button link | Homepage |  |
| Featured stories | Homepage |  |
| Featured tags slugs | Homepage |  |
| Post feed style | Homepage |  |
| Post feed toggle | Homepage |  |
| Post card image aspect ratio | Homepage |  |
| Default post template | Post |  |

> [!NOTE]
> To keep your design settings when you update the theme, upload the new version under the same zip file name, or deploy it with the [GitHub action](https://brightthemes.com/blog/ghost-theme-deployment). More in [keeping your design settings](https://brightthemes.com/blog/ghost-theme-settings-update).

## Homepage

The homepage is defined in the `home.hbs` file. The following sections are part of this template:
- [hero](https://brightthemes.com/docs/saaga#hero)
- [featured stories](https://brightthemes.com/docs/saaga#featured-stories)
- [featured topics](https://brightthemes.com/docs/saaga#featured-topics)
- latest stories ([post feed](https://brightthemes.com/docs/saaga#post-feed))

Its settings are in **Settings › Site › Design & branding › Theme › Homepage**.

### Hero

- **Hero style** — the style of the hero section and its image, the publication cover from **Settings › Site › Design & branding › Brand**:
    - `accent-background` — no image, and the hero and the header are on your accent color
    - `image-background` (default) — the cover image in the background, with the header over it; its bottom fades into the page (without a cover image, the accent color)
    - `image-bottom` — the cover image below the hero title and description
    - `image-right` — the cover image next to the hero title and description
    - `no-image` — no cover image

- **Hero headline** — the hero title; empty, it shows the site title. Words in `<em>` elements are shown in italic, for example:

  ```html
  Tell your <em>stories</em> in the most <em>compelling</em> and <em>visual</em> way.
  ```

- **Hero description** — the text under the title; empty, it shows the site description. You can use HTML elements here too, like links or bold text.

- **Hero button link** — where the button goes. The default, `subscribe-form`, shows the subscribe form to visitors who aren't members. Any other link shows a button; leave it empty for no button.

- **Hero button text** — the button's text, on the subscribe form or the link. Empty, it says **Subscribe**.

### Featured stories

**Featured stories** has four options for your featured posts:

- `colored-list` (default) — the featured posts one after the other. As each one crosses the middle of the screen, the section's background takes the accent color of the post's first tag, with black or white text, whichever reads better; a tag without an accent color gives a light tint of the site's accent.

  The feature images zoom in slightly on hover. To turn it off, add the following in **Settings › Advanced › Code injection › Site header** ([what code injection is](https://brightthemes.com/blog/ghost-code-injection)):
  ```html
  <script>window.THEME_CONFIG.FEATURED_IMAGE_ANIMATION = false;</script>
  ```

- `list` — the featured posts one after the other, in a simple list
- `slider` — the featured posts in a slider, with buttons to move through it
- `none` — no featured posts section

The section shows up to 20 featured posts.

> [!NOTE]
> Featured posts are still listed in the latest stories section. To remove them from there, set up a filter in the routes file.

### Featured topics

Add the tag slugs you want as topic tiles to **Featured tags slugs**, separated by commas and no spaces, with no comma after the last item. Each tile shows the tag's image (or its accent color), its name, its description and its number of stories, and links to the tag's page.

> [!CAUTION]
> Do **NOT** use the tag names, but the tag slugs.

> [!NOTE]
> To find a tag's slug, open **Tags** in Ghost Admin, open the tag and check its **Slug** field.

Example from the demo:

```text
moon,venus,jupiter,mars,neptune,uranus,saturn,earth,galaxy
```

### Post feed

The post feed shows the posts ordered by published date.
**Post feed style** sets its layout:

- `alternating-list` (default) — the image on the left on one item and on the right on the next; a post without an image is a full-width text row ([demo](https://saaga.brightthemes.com))
- `grid` — the posts in a grid
- `list` — the posts in a simple list

**Post feed toggle** is on by default: it shows three buttons above the feed, from tablets up, so readers can switch between the layouts. Their choice is saved in their browser. Turn it off to keep every reader on **Post feed style**.

### Post card

The post card markup is defined in `partials/post-card.hbs`: the first tag, who can read the post, the title, the excerpt, the authors, the date and the reading time.
**Post card image aspect ratio** sets the card image's aspect ratio:

- `auto` (default) — keeps the uploaded image's aspect ratio
- `16/9`, `4/3`, `1/1`, `3/4` — that aspect ratio
- `hidden` — no image

## Header

The header shows the publication [logo](https://brightthemes.com/docs/saaga#logo), the primary navigation with [dropdown menus](https://brightthemes.com/docs/saaga#dropdown-menus), a search button, and **Subscribe** for visitors or the account menu for signed-in members.

The navigation shows in the middle of the header on large screens, when it fits between the logo and the buttons. When it doesn't fit, and on smaller screens, a menu button takes its place and the navigation opens in the menu. The menu also holds the secondary navigation from **Settings › Site › Navigation**, so the menu button stays on large screens when you have a secondary navigation.

On the homepage, the header takes the hero's look: on the accent color with the `accent-background` hero style, over the cover image with `image-background`. On posts with the full background image layout, it sits over the feature image.

**Use portal links** in **Settings › Site › Design & branding › Theme › Site wide** is on by default: **Subscribe**, the account link and the upgrade box on members-only posts open Ghost's Portal. Turn it off to use the theme's own [sign-up, sign-in and account pages](https://brightthemes.com/docs/saaga#pages) instead; create those pages first.

The light and dark switch is in the footer, at the bottom of the page (see [Color customization](https://brightthemes.com/docs/saaga#color-customization)).

## Footer

The footer shows the publication [logo](https://brightthemes.com/docs/saaga#logo) or title, the site description and a subscribe form for visitors who aren't members. Beside them are the links: the secondary navigation from **Settings › Site › Navigation**, in two columns, and the [social links](https://brightthemes.com/docs/saaga#social-links), written out. The primary navigation stays in the header. Below a line are the copyright and the light and dark switch.

### Footer image

**Footer image** in **Settings › Site › Design & branding › Theme › Site wide** puts an image at the bottom of every page. The footer takes the color of the top of the image, and the image closes the page below the links. In the dark color scheme, the page fades into it.

The footer's text turns white over the image, so pick an image with a dark top, like a night sky:
- wide, about 3:1 (2000 × 667 pixels works well)
- the top half plain and dark, the subject in the bottom third
- on phones the image keeps its height and is cropped at the sides, from the center

Without a footer image, the footer sits on the muted background of the color scheme.

## Templates

The default post layout is defined by the `post.hbs` template and the default page layout by the `page.hbs` template.

### Post templates

Saaga includes 5 [post templates](https://brightthemes.com/blog/ghost-custom-templates) in addition to the default. You choose one in **Post settings › Template**:

- **Post With Excerpt On The Side** (`custom-post-with-excerpt-on-the-side.hbs`) — the excerpt on the right side
- **Post With Full Background Image** (`custom-post-with-full-background-image.hbs`) — the feature image behind the title
- **Post With Image On The Side** (`custom-post-with-image-on-the-side.hbs`) — the feature image on the right side
- **Post With Narrow Image** (`custom-post-with-narrow-image.hbs`) — a narrow feature image
- **Post With Wide Image** (`custom-post-with-wide-image.hbs`) — a wide feature image

**Default post template** in **Settings › Site › Design & branding › Theme › Post** sets the layout of the posts that use the default template: `With excerpt on the side` (default), `With full background image`, `With narrow image`, `With wide image` or `With image on the side`.

> [!NOTE]
> Before 2.0 these templates were named `custom-with-…`. A post that used one shows the layout of **Default post template** until you pick its template again (see [Upgrade to v2](https://brightthemes.com/docs/saaga#upgrade)).

The page templates (Signup, Archive, Tags…) are described under [Pages](https://brightthemes.com/docs/saaga#pages).

### Post elements

The top of a post shows its first tag and who can read it, the title, the excerpt, the authors, the date and the reading time, with the feature image in the template's layout. At the end of the post:
- the post's tags
- a **Share** button, which opens Ghost's share window: the post's link to copy and the networks to share it on
- the author box, about the primary author
- [comments](https://brightthemes.com/docs/saaga#comments)
- read next: up to 3 posts with the same primary tag, or the latest posts when the post has no tag

### Image lightbox

The image lightbox is off by default. To let readers open the images in a post full size, add the following line in **Settings › Advanced › Code injection › Site header** ([what code injection is](https://brightthemes.com/blog/ghost-code-injection)):

```html
<script>window.THEME_CONFIG.ENABLE_IMAGE_ZOOM = true;</script>
```

It applies to image and gallery cards.

## Pages

The theme's own pages are pages you create in Ghost Admin, each with one of the theme's page templates. Nothing goes in `routes.yaml` for them: the theme's `routes.yaml` is Ghost's default. You get the page's title, excerpt, feature image and SEO fields, and you can add it to your navigation.

To create one:

1.  Log in to Ghost Admin at `yoursite.com/ghost/`.
2.  Open **Pages** and choose **New page**.
3.  Enter the title. In the page settings, set the **Page URL** to the slug below and pick the **Template**.
4.  Choose **Publish**.

| Page URL | Template | What it shows |
|---|---|---|
| `signup` | **Template Signup** (`custom-template-signup.hbs`) | The sign-up form, with the page's feature image beside it |
| `signin` | **Template Signin** (`custom-template-signin.hbs`) | The sign-in form, with the page's feature image beside it |
| `account` | **Template Account** (`custom-template-account.hbs`) | The signed-in member's details and subscription |
| `membership` | **Template Membership** (`custom-template-membership.hbs`) | Your tiers, with their prices and benefits |
| `archive` | **Template Archive** (`custom-template-archive.hbs`) | Every post, newest first |
| `tags` | **Template Tags** (`custom-template-tags.hbs`) | Your public tags, by number of posts |
| `authors` | **Template Authors** (`custom-template-authors.hbs`) | Your authors, by number of posts |
| `recommendations` | **Template Recommendations** (`custom-template-recommendations.hbs`) | The sites you recommend |

The Membership, Archive, Tags, Authors and Recommendations templates show the page's own content after their part, so you can add text below it in the editor.

> [!NOTE]
> The header and the upgrade box on members-only posts link to `/signup/`, `/signin/` and `/account/`. With **Use portal links** on (see [Header](https://brightthemes.com/docs/saaga#header)), those links open Ghost's Portal instead, and these pages are optional.

### Archive

The archive lists the posts by date and title, newest first, 8 at a time (the theme's posts per page). The page's title and excerpt head the list, with the post count.

- **No tags on the page:** it lists every post.
- **Tags on the page:** it lists only the posts with those tags, internal tags too. A page tagged `#newsletter`, for example, is an archive of your newsletter posts, so a site can have several archives, each at its own URL.

Later pages are `?page=2`, `?page=3` and so on, with links under the list. They need JavaScript: without it, the first page shows.

### Sign-up and sign-in pages

Both show without the site's header and footer. Give the page a feature image to show it beside the form; without one, the form is centered.

### Membership

The membership page shows your public tiers with a monthly and yearly choice. The tier names, prices and benefits come from **Settings › Membership › Tiers**: edit the tiers there or add new ones. A signed-in member sees their current plan marked.

### Recommendations

The recommendations page shows the sites you recommend in **Settings › Growth › Recommendations**, and a button that opens the full list in Portal. It shows them when recommendations are turned on there.

## Color customization

You can change the accent color in **Settings › Site › Design & branding › Brand**. The theme picks black or white text for it, whichever reads better, and uses it for the buttons, the hero's **accent-background** style and the links in posts.

**Color scheme** in **Settings › Site › Design & branding › Theme › Site wide** sets the default color scheme of the site:
- `system` (default) — follows the reader's device setting, light or dark
- `light` — the light color scheme
- `dark` — the dark color scheme

Readers can switch between light and dark with the sun and moon button at the bottom of the footer. Their choice is saved in their browser.

### Change the colors

The theme's colors are CSS custom properties, so you can override them in **Settings › Advanced › Code injection › Site header** ([what code injection is](https://brightthemes.com/blog/ghost-code-injection)). Add the following and adjust the values.

For the **light** color scheme:

```html
<style>
  :root {
    --color-typ: hsl(30 10% 15%);        /* text */
    --color-typ-tone: hsl(30 6% 37%);    /* muted text: dates, excerpts */
    --color-typ-content: hsl(30 10% 15%);/* the text of posts */
    --color-bgr: hsl(40 33% 98%);       /* background */
    --color-bgr-tone: hsl(40 27% 95%);  /* muted background: the footer, panels */
    --color-brd: hsl(38 16% 87%);       /* borders */
  }
</style>
```

For the **dark** color scheme, use the same names under a second selector. It applies whenever the site shows dark, whether the reader chose it or their device did:

```html
<style>
  [data-color-scheme="dark"]:root {
    --color-typ: hsl(228 20% 90%);
    --color-typ-tone: hsl(228 12% 69%);
    --color-typ-content: hsl(228 16% 86%);
    --color-bgr: hsl(228 32% 11%);
    --color-bgr-tone: hsl(228 28% 15%);
    --color-brd: hsl(228 20% 24%);
  }
</style>
```

The values above are the theme's defaults: a warm off-white for light, a deep night blue for dark. For plain white and black, use `hsl(0 0% 100%)` and `hsl(0 0% 11%)` as the backgrounds. The reversed colors (`--color-typ-reverse` and `--color-bgr-reverse`, used for code blocks and some hovers) follow the background and text colors by themselves.

For example, a purple palette for both color schemes:

```html
<style>
  :root {
    --color-typ: hsl(275 50% 15%);
    --color-typ-tone: hsl(275 20% 38%);
    --color-typ-content: hsl(275 50% 15%);
    --color-bgr: hsl(275 50% 98%);
    --color-bgr-tone: hsl(275 50% 94%);
    --color-brd: hsl(275 30% 88%);
  }
  [data-color-scheme="dark"]:root {
    --color-typ: hsl(275 50% 90%);
    --color-typ-tone: hsl(275 20% 70%);
    --color-typ-content: hsl(275 40% 86%);
    --color-bgr: hsl(275 40% 8%);
    --color-bgr-tone: hsl(275 40% 12%);
    --color-brd: hsl(275 30% 22%);
  }
</style>
```

> [!TIP]
> Check that your text keeps enough contrast on its background, in both color schemes: aim for a ratio of 4.5:1 or more for text and muted text.

Some useful tools for choosing colors:

- [Fuel HSL color picker](https://fffuel.co/cccolor/)
- [WebAIM contrast checker](https://webaim.org/resources/contrastchecker/)

## Typography

> [!NOTE]
> Ghost has [custom fonts](https://ghost.org/changelog/custom-fonts/) of its own: you set the heading and body fonts in **Settings › Site › Design & branding › Brand › Typography**.

To use the theme's own fonts instead, set both to **Theme default** there.

For a font Ghost doesn't offer (your own files or a Google Font added with code injection), follow [how to add custom fonts in Ghost](https://brightthemes.com/blog/ghost-custom-fonts).

By default the theme uses **Sora** for headings and **Inter** for body text. To use other fonts, pick them in **Settings › Site › Design & branding › Brand › Typography**: Ghost's **Heading font** and **Body font** replace Sora and Inter when they're set.

**UI font family** in **Settings › Site › Design & branding › Theme › Site wide** sets the font of the interface: the header, the footer navigation and the buttons.

- `body` (default) — the body font
- `heading` — the heading font
- `system` — the reader's own system font
- `serif` — the reader's system serif font
- `mono` — the reader's system monospace font

> [!NOTE]
> The theme loads Sora and Inter from Google Fonts on every page, even when Ghost's typography settings replace them. The `system`, `serif` and `mono` UI fonts load nothing more.

To keep a Google font but serve the files from your own site, see [self-hosting Google Fonts](https://brightthemes.com/blog/ghost-google-fonts#self-host-the-font-instead).

## Logo

The publication logo from **Settings › Site › Design & branding › Brand** shows in the header and the footer. Without a logo, the site title shows instead.

The logo's height in the header, and on the sign-up and sign-in pages, is set by CSS custom properties; the footer logo is 48px high. To change it, add the following in **Settings › Advanced › Code injection › Site header** ([what code injection is](https://brightthemes.com/blog/ghost-code-injection)) and adjust the values:

```html
<style>
  :root {
    --logo-h-mobile: 28px;    /* height on phones */
    --logo-h-desktop: 34px;   /* height from tablets up */
  }
</style>
```

The same logo is used for the light and dark color schemes, but you can use CSS filters to change how it looks in some places. The header's logo is inside `[data-brand]` and the footer's inside `[data-footer-brand]`, which also holds the footer links (`:not([data-nav-icon])` leaves out their navigation icons). Add any of these in the same place:

1. Reduce the brightness of the header logo on the homepage only:
   ```html
   <style>.home-template [data-brand] img { filter: brightness(0); }</style>
   ```

2. Increase the brightness and contrast in the dark color scheme only:
   ```html
   <style>[data-color-scheme="dark"] [data-brand] img { filter: brightness(10) contrast(200%); }</style>
   ```

3. Change the footer logo's color with `hue-rotate`:
   ```html
   <style>[data-footer-brand] img:not([data-nav-icon]) { filter: hue-rotate(90deg); }</style>
   ```

4. Invert the footer logo's color in the light color scheme only:
   ```html
   <style>[data-color-scheme="light"] [data-footer-brand] img:not([data-nav-icon]) { filter: invert(1); }</style>
   ```

> [!NOTE]
> Here is the full list of [filters](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) you can apply.
  You can use multiple filters at the same time.

## Dropdown menus

Add dropdown menus to the theme's navigation from Ghost Admin, by starting an item's label with a minus sign.

The theme can show dropdown menus in the header. To make an item a submenu item, start its label with a minus sign (`-`) in **Settings › Site › Navigation** (choose **Customize** to edit the menu).

An item that starts with `-` goes into the dropdown of the item above it. For example, these items make a **Members** menu with three entries. The full walkthrough is in [How to add dropdown menus in Ghost](https://brightthemes.com/blog/ghost-dropdown-menus).

*Ghost Admin: Settings › Site › Navigation*

## Ghost config

Settings in Ghost's config file that the theme can use, such as image sizes and the posts per page.

Some of the theme's configuration lives in its `package.json` file: the posts per page, the image sizes and the [custom settings](https://brightthemes.com/docs/saaga#custom-settings).

### Posts per page

`posts_per_page` is the number of posts a list shows before it's paginated, such as the tag and author pages.

To change it, edit the value in `package.json`. The theme comes with:

```json
"config": {
  "posts_per_page": 8
}
```

### Image sizes

Ghost makes copies of every uploaded image at the [sizes the theme asks for](https://ghost.org/docs/themes/assets/#responsive-images-configuration), so pages can load the right size. They're set under `image_sizes` in `package.json`; edit them before you upload the theme. The theme comes with:

```json
"image_sizes": {
  "xxs": {
    "width": 30
  },
  "xs": {
    "width": 100
  },
  "s": {
    "width": 300
  },
  "m": {
    "width": 600
  },
  "l": {
    "width": 1000
  },
  "xl": {
    "width": 2000
  }
}
```

## Comments

Turn on Ghost's native comments for members, and choose who can comment.

The theme uses [Ghost's native comments](https://brightthemes.com/blog/ghost-comments). Turn them on in **Settings › Membership › Access**, under **Who can comment on posts?**:

- `All members` — every signed-in member
- `Paid-members only` — signed-in members with an active paid subscription
- `Nobody` — comments are off

If the theme has a comments setting of its own (listed in its settings above), set it to Ghost's native comments too.

## Icons

How the theme's icons work and how to add or change one.

The theme's icons are from [Tabler Icons](https://tabler.io/icons). Only the icons the theme uses are included, each as its own `.hbs` file in `partials/icons/`.

To add an icon:

1.  Find the icon on [Tabler Icons](https://tabler.io/icons) and select it: this copies its SVG code.
2.  In `partials/icons/`, create a file named after it, for example `camera.hbs`.
3.  Paste the code into the file and save it.

For example, the `camera` icon copies as:

```html
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-camera" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
  <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  <path d="M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" />
  <circle cx="12" cy="13" r="3" />
</svg>
```

To show an icon in the theme's templates, use the `partials/icon.hbs` partial with the icon's name (and, optionally, Tailwind classes for its size in `icon_class`, such as `size-6`):

```hbs
{{>icon name="camera"}}
```

The CSS only has the Tailwind classes the theme's files already use, so after adding a class the theme doesn't use yet, rebuild the CSS (see Theme development).

## Social links

Add social links to the theme: the networks Ghost supports, and others through code injection.

The theme shows the social accounts you set in **Settings › General settings › Social accounts**.

It can also link these platforms, which Ghost has no field for:
- Discord
- GitHub
- Pinterest
- Reddit
- Telegram
- WhatsApp

To add one, put its link in **Settings › Advanced › Code injection › Site footer** ([what code injection is](https://brightthemes.com/blog/ghost-code-injection)). For example, for GitHub:

```html
<script>
  socials.github = 'https://github.com/brightthemes'
</script>
```

The other names are `discord`, `pinterest`, `reddit`, `telegram` and `whatsapp`.

> [!NOTE]
> For a platform that isn't listed, add its icon (see the Icons section), then add a block for it in `partials/social-links.hbs`, like the ones already there.

## Syntax highlighting

How the theme loads Prism.js only on posts tagged #syntax-highlight, and how to load it everywhere or change languages.

The theme highlights code with [Prism](https://prismjs.com/), the library our guide to [syntax highlighting in Ghost](https://brightthemes.com/blog/ghost-syntax-highlighting) uses too. To turn it on for a post or page, add the internal tag `#syntax-highlight` to it. Posts and pages without the tag don't load Prism at all, so they stay lighter.

To highlight code on every post and page without the tag, edit `partials/syntax-highlight.hbs` and remove the condition that checks for it. The same partial loads Prism (its core, with HTML, CSS and JavaScript) and its color theme from a CDN, so that's also where you change the version or the colors, or add the script of another language or a plugin.

## Translations

Translate the theme's own text into your language with its locale files, and add a language that's missing.

By default, everything is in English (`en.json`). The theme also comes with translations in:

- German (`de.json`)
- Spanish (`es.json`)
- French (`fr.json`)
- Italian (`it.json`)
- Dutch (`nl.json`)
- Portuguese (`pt.json`)

> [!NOTE]
> A translation applies once you set the site's language in **Settings › General settings › Publication language**.

To change a translation, edit its file in the theme's `locales` directory:

```
|__ locales
|   |__ de.json
|   |__ en.json
|   |__ es.json
|   |__ fr.json
```

For a language the theme doesn't have, add a file named with its language code (for example `pl.json`): copy `en.json`, rename it, and translate the values. The full walkthrough is in [How to translate your theme in Ghost](https://brightthemes.com/blog/ghost-theme-translations).

## Theme development

Set up the theme for local development: install the dependencies, run the build, and package the zip.

For changes beyond the design settings and [code injection](https://brightthemes.com/blog/ghost-code-injection), you can work on the theme's source. The theme is built with [Tailwind CSS](https://tailwindcss.com/) and [Alpine.js](https://alpinejs.dev/), and its assets are compiled and minified with [Vite](https://vitejs.dev/).

You need [Node.js](https://nodejs.org/) and a [local install of Ghost](https://brightthemes.com/blog/ghost-install#2-install-ghost-locally). Put the theme's folder in Ghost's `content/themes/` directory, open it in your terminal and run `npm install` to install its dependencies. Then:

1. `npm run dev` — runs the Vite dev server at `localhost:2468`, in front of your local Ghost on port 2368: it rebuilds the assets whenever you change a file and reloads the browser. The Vite configuration is in `vite.config.js`.
2. `npm run build` — builds the assets once, into `assets/built/`.
3. `npm run test` — checks the theme with [GScan](https://gscan.ghost.org/), Ghost's own theme checker.
4. `npm run zip` — makes a zip of the theme in the `dist` directory, ready to upload.

Ghost's own [**Edit code**](https://brightthemes.com/blog/ghost-theme-code-editor) changes the theme's files in Ghost Admin, but it doesn't run this build: use it for templates, and make style and script changes here.

## Upgrade to v2

What changes when you update a Saaga 1.x site to 2.0, and the four steps to move it over.

We rebuilt Saaga from the ground up for 2.0: the same layouts and settings, on a new codebase, so almost every file has changed. If you've edited the theme's files, start from the new version and bring your changes over. Four things change for a site that runs 1.x:

- **The post templates are renamed** from `custom-with-…` to `custom-post-with-…`, shown in Ghost as **Post With Excerpt On The Side** and so on. A post that used one shows the layout of **Default post template** until you pick its template again.
- **The theme's own pages are pages with a template** instead of entries in `routes.yaml`: sign up, sign in, account, membership, archive, tags, authors and recommendations (see [Pages](https://brightthemes.com/docs/saaga#pages)). The theme's `routes.yaml` is now Ghost's default. Old `/archive/page/2/` links don't redirect; the archive's later pages are `?page=2` and so on.
- **The Font headings and Font body settings are gone.** Ghost's own typography settings take their place, with the new **UI font family** setting (see [Typography](https://brightthemes.com/docs/saaga#typography)). A site that picked other fonts there shows Sora and Inter until you set Ghost's typography.
- **Code injection names changed.** `themeGlobal` is now `window.THEME_CONFIG`, and the CSS custom properties have new names (below). Class names such as `.post-card` or `.hero__title` are gone: style the `data-*` attributes instead, such as `[data-post-card]` or `[data-hero]`.

| Before 2.0 | In 2.0 |
|---|---|
| `themeGlobal.imageLightbox` | `window.THEME_CONFIG.ENABLE_IMAGE_ZOOM` |
| `themeGlobal.featuredImageAnimation` | `window.THEME_CONFIG.FEATURED_IMAGE_ANIMATION` |
| `--color-text`, `--color-text-acc` | `--color-typ` |
| `--color-text-muted` | `--color-typ-tone` |
| `--color-bg` | `--color-bgr` |
| `--color-bg-acc` | `--color-bgr-tone` |
| `--color-border` | `--color-brd` |
| `--global-max-width` | `--container-site` |
| `--global-content-width` | `--container-content` |
| `--global-radius` | `--radius-theme` |
| `--font-headings` | `--font-heading` |

### Move a site over

After you upload Saaga 2.0 in **Settings › Site › Theme › Change theme**:

1. Upload the new `routes.yaml` from the theme's zip in **Settings › Advanced › Labs** (see [Upload routes.yaml](https://brightthemes.com/docs/saaga#routes)).
2. In **Pages**, create a page for each slug with the matching **Template** in its page settings: `signup` (Template Signup), `signin` (Template Signin), `account` (Template Account), `membership` (Template Membership), `archive` (Template Archive), `tags` (Template Tags), `authors` (Template Authors) and `recommendations` (Template Recommendations). Create only the ones your site uses.
3. Pick the template again in **Post settings › Template** on the posts that used one of the post templates.
4. If your site used other fonts, set them in **Settings › Site › Design & branding › Brand › Typography**. Update any code injection that uses the old names in the table above.

Something missing or unclear? Ask support: https://brightthemes.com/support
