Skip to content
Bright Themes

How to install, set up and customize the Dashi 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 (set your Ghost site URL to open it in your Ghost Admin).

To upload the theme:

  1. Log in to Ghost Admin at yoursite.com/ghost/.
  2. Choose Upload theme and select dashi.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.
  3. 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.

Settings › Site › Theme › Change theme

Upload routes.yaml

Upload the theme's routes.yaml in Settings › Advanced › Labs (set your Ghost site URL to open it in your Ghost Admin), 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. 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.

Settings › Advanced › Labs › Beta features
routes.yaml
## routes.yaml
routes:

collections:
  /:
    permalink: /{slug}/
    template: index
    order: featured desc, published_at desc

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, which you change in Ghost Admin without code. Open Settings › Site › Design & branding (set your Ghost site URL to open it in your Ghost Admin) 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 (set your Ghost site URL to open it in your Ghost Admin).

Settings › Site › Design & branding › Theme

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

SettingGroupWhat it does
Secondary colorSite wideThe second color of the logo gradient and the paid label
Color schemeSite wideThe color scheme visitors see first; they can change it in the left column
UI font familySite wideThe font of the interface: navigation, buttons, labels and post info
Enable sticky headerSite wideKeep the header at the top of the page as it scrolls
Use portal linksSite wideOpen sign in and sign up in Ghost's Portal popup instead of the theme's pages
Post feed styleSite wideThe layout of the post lists; visitors can switch it with the grid and list buttons
Enable image lightboxPostShow post images larger, in a lightbox, when a reader selects one
Default post templatePostThe layout of posts on Ghost's default template; a post's own Template setting picks another

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. More in keeping your design settings.

Homepage

The homepage is defined in home.hbs (its later pages in index.hbs) and is laid out like a dashboard. Besides the header, the left column and the footer, it has two parts:

  • the welcome panel, on your accent color, which changes with the reader’s access
  • Latest: the topics, the grid and list buttons and your posts, with Load more posts

The welcome panel and the topics read pages with their own slugs, and each shows only when its page is published. Without the home-welcome page, the welcome panel shows your site’s title and description, and Subscribe for visitors. Leave these pages out of your navigation: their own URL still works, but they’re there for the homepage.

Page slugPartWhat to put in it
home-welcomeThe welcome panelThe title is the small label above the text (for example, Welcome), the feature image the image beside it. In the content, one Call to action card per audience, each with its visibility set: visitors, free members or paid members. Callout cards are the figures under it
home-topicsThe topics, in the left column and above LatestThe page’s tags are the topics, in the page’s order. The page’s content isn’t shown

To create one, open Pages in Ghost Admin, choose New page, set the Page URL in the page settings to the slug above and choose Publish.

Welcome panel

The welcome panel shows the page with the slug home-welcome, on your accent color:

  • The title is the small label above the text, such as Welcome.
  • The feature image shows beside the text on larger screens and above it on phones. A landscape image, at least 900px wide, works at every size.
  • The content is what the reader sees, and it follows who they are: add one Call to action card for each audience and set the card’s visibility to visitors, free members or paid members. Ghost leaves out the cards a reader isn’t meant to see, so a visitor reads a call to subscribe, a free member a call to upgrade and a paid member a welcome back.

In each Call to action card:

  • the first line, in bold, is the headline
  • the rest is the text
  • the card’s button is the action, such as Subscribe for visitors or Upgrade for free members
  • a last line that is only a link shows as a second, outline button beside it, such as a link to the membership page

The panel sets the cards’ colors and buttons itself, on the accent color, so the card’s own background color and image aren’t shown.

Callout cards in the same page show as a line of figures under the text: an emoji and a short text each, such as 📬 A new post every week. Without callouts, there are no figures. Show only figures you can stand behind.

Without the page, the panel shows the site’s title and description (from Settings › General settings (set your Ghost site URL to open it in your Ghost Admin)), and a Subscribe button for visitors.

Latest

Latest lists your posts, featured posts first, then the newest. The theme’s routes.yaml sets this order (order: featured desc, published_at desc), so upload it (see Upload routes.yaml).

Above the posts:

  • the topics: All and the tags of the page with the slug home-topics, in the page’s order. The same topics show in the left column, each with its color as a dot and its post count. To set a tag’s color, open Tags in Ghost Admin, open the tag and set its Color. Without the page, or without tags on it, neither shows.
  • the grid and list buttons: readers pick how the posts are laid out, and their choice is saved in their browser.

Each post is a card with its feature image, its first tag, the title, the excerpt and one line with the access (Free, Members or Paid, always written out, each in its own color), the reading time, the date and a Save button (see Saved).

Load more posts under the cards adds the next page of posts to the list. Without JavaScript, it opens the next page.

In Settings › Site › Design & branding › Theme › Site wide (set your Ghost site URL to open it in your Ghost Admin):

  • Post feed style — how the post lists look until a reader picks with the buttons: grid (default) or list. It applies to the homepage, the tag and author pages and the Saved page.

Note

Before 3.0, the welcome section came from the Hero headline, Hero description, Hero CTA text, Hero CTA link and Hero stats settings, and the homepage had a featured posts slider, a tag filter and a sidebar. 3.0 builds the welcome panel from the home-welcome page and puts featured posts first in Latest (see Upgrade to v3).

On large screens, Dashi has a left column beside the page and a header above it:

Below large screens, the header shows the logo, the search button, the bell and the menu button, and stays at the top of the page. The menu opens from the right, under the header: it’s the left column, with Subscribe and Sign in, or Account and Sign out, added.

In Settings › Site › Design & branding › Theme › Site wide (set your Ghost site URL to open it in your Ghost Admin):

  • Enable sticky header — keeps the header at the top of the page on large screens as readers scroll (off by default)
  • Use portal links — the sign-up, sign-in and account links open Ghost’s Portal instead of the theme’s pages (off by default; see Portal links)

The search is Ghost’s own: it works with no setup. For other ways to add search to a Ghost theme, see search options for Ghost themes.

The logo’s height is set by the theme; to change it, see Code snippets.

The navigation items in the left column can have icons. Turn on Ghost’s Navigation icons beta in Settings › Advanced › Labs (set your Ghost site URL to open it in your Ghost Admin), then upload an icon for each item in Settings › Site › Navigation (set your Ghost site URL to open it in your Ghost Admin). The icons show as you upload them, before the labels. With the beta off, the navigation shows labels only.

An item with an icon and no label is named by its icon’s file name, for screen readers, so give the file a name that says where the link goes, such as membership.svg.

To draw every icon in one color, black in the light color schemes and white in the dark ones, add this in Settings › Advanced › Code injection › Site header (set your Ghost site URL to open it in your Ghost Admin) (what code injection is):

HTML
<style>
  [data-nav-icon] { filter: brightness(0); }
  :is([data-color-scheme="dark"], [data-color-scheme="midnight"]) [data-nav-icon] { filter: brightness(0) invert(1); }
</style>

Note

Before 3.0, the menu icons came from the theme’s menu-icons.svg file, matched by the slug of each navigation item, and the side menu had settings of its own. 3.0 uses Ghost’s navigation icons, and the left column is always open on large screens (see Upgrade to v3).

The footer shows the copyright line, with “Published with Ghost & Dashi”, and the social links. Below large screens it shows the secondary navigation from Settings › Site › Navigation (set your Ghost site URL to open it in your Ghost Admin) too; on large screens, the secondary navigation is in the left column (see Header).

Announcements

Announcements are pages behind the bell in the header. They’re pages, not posts, so they stay out of your post lists.

To add one:

  1. Open Pages in Ghost Admin and choose New page.
  2. Write the announcement, and add the internal tag #announcement in the page settings.
  3. Choose Publish. Leave the page out of your navigation.

The bell shows when you have at least one published page with the #announcement tag. When a reader opens it, it lists the five latest, each with its title and date, linking to its page. A dot on the bell shows while there’s an announcement newer than the last time the reader opened the list; this is kept in their browser.

To change the number of announcements, edit limit="5" in partials/announcements.hbs.

Note

Before 3.0, announcements were posts with the #announcement tag, and the bell listed three. Posts tagged #announcement no longer show behind the bell: move them to pages (see Upgrade to v3).

Templates

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

A post opens with its first tag, the title, the excerpt and the byline: the author’s photo, their name, the access (Free, Members or Paid), the reading time and the date. Beside the byline, Save keeps the post on the reader’s Saved page, and Share opens Ghost’s share window (the post’s link to copy and the networks to share it on). The feature image and its caption follow. After the content, a post shows its tags, its authors with their bios, the comments and Read next: three posts with the same first tag, or the three latest. A bar at the top of the window shows how far the reader is through a post.

Post templates

Dashi includes 2 post templates in addition to the default. You choose one in Post settings › Template; they work for pages too:

  • Post With Sidebar (custom-post-with-sidebar.hbs) — a sidebar beside the post content (on large screens), with a box to subscribe for visitors or to upgrade for free members, and up to four featured posts; the sidebar is partials/sidebar.hbs
  • Post With Table Of Contents (custom-post-with-table-of-contents.hbs) — a table of contents built from the post’s headings (h2 and h3), beside the content on extra large screens; it shows only when the post has headings

The table of contents uses the Tocbot (opens in a new tab) library, included in the theme. It marks the heading being read. To change it, edit partials/toc.hbs.

Note

Before 3.0 these templates were named custom-with-…. A post that used one shows the default layout until you pick a template again (see Upgrade to v3).

The page templates (Signup, Membership, Saved…) are described under Pages.

Post settings

In Settings › Site › Design & branding › Theme › Post (set your Ghost site URL to open it in your Ghost Admin):

  • Default post template — the layout of posts that use Ghost’s default template: default, sidebar or table of contents, the same as the templates above. A post’s own Template still picks another.
  • Enable image lightbox — images in image and gallery cards open larger when a reader selects them (on by default). An image with a link opens its link instead.

To hide the comments on a post, add the internal tag #nocomment to it.

Members-only and paid posts

On a post a reader can’t read in full, the free part is followed by a panel on your accent color: a free member is asked to upgrade, a visitor to subscribe (or to see the plans, on a paid post), with a link to sign in.

Tag and author pages

Tag pages show the tag’s image, its name with its color as a dot, its description and post count; author pages the author’s photo, name, bio and post count. Their posts follow as cards, with the grid and list buttons and Load more posts, as on the homepage.

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. 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 URLTemplateWhat it shows
signupTemplate Signup (custom-template-signup.hbs)The sign-up form, with the page’s feature image and content in a panel beside it
signinTemplate Signin (custom-template-signin.hbs)The sign-in form
accountTemplate Account (custom-template-account.hbs)The signed-in member’s details, subscription, newsletters and emails
membershipTemplate Membership (custom-template-membership.hbs)Your tiers, with their prices and benefits
savedTemplate Saved (custom-template-saved.hbs)The posts the reader saved
tagsTemplate Tags (custom-template-tags.hbs)Your public tags, by post count
recommendationsTemplate Recommendations (custom-template-recommendations.hbs)The sites you recommend

The theme links to /signup/, /signin/, /account/ and /membership/, so create those four when your site has members, and the left column’s Saved links to /saved/. To use Ghost’s Portal instead of the members pages, turn on Use portal links (see Portal links).

Sign-up and sign-in pages

The sign-up and sign-in pages show a card with the page’s title and excerpt and the form. On the sign-up page, a feature image shows in a panel on your accent color beside the form, with the page’s content under it: a good place for what members get. When the site has more than one newsletter, the sign-up form lists them. When sign-up is for paid members only, the sign-up page links to the membership page instead of showing the form, and a signed-in member is pointed to their account.

Account

The account page lets a signed-in member change their name, the expertise shown beside it on comments and their email address, see their subscription, choose their newsletters (one at a time or all at once), turn comment notifications on and off, and fill in the custom fields you set up in Settings › Membership (set your Ghost site URL to open it in your Ghost Admin) (Ghost 6.78 or newer). When Ghost has stopped emailing a member whose emails bounced, the page offers to turn their emails back on.

Membership

The membership page shows your tiers with a monthly and yearly choice, then the page’s own content, so you can add text below them in the editor. The tier names, prices and benefits come from Settings › Membership › Tiers (set your Ghost site URL to open it in your Ghost Admin). A signed-in member sees their current plan marked.

Saved

Readers save a post with the Save button on its card or beside its byline, and find it again on the Saved page. The saved posts are kept in the reader’s browser: no account is needed, and they aren’t shared between devices or browsers. The page shows them as cards, with the grid and list buttons, and the left column shows how many there are.

Tags

The tags page lists your public tags by post count, each with its color as a dot.

Recommendations

The recommendations page shows the sites you recommend in Settings › Growth › Recommendations (set your Ghost site URL to open it in your Ghost Admin), when recommendations are turned on there.

Note

Before 3.0, the sign-up, sign-in, account and recommendations pages were routes in routes.yaml, the membership, tags and bookmarks pages used templates picked by their slug, and the theme had archive and contact pages. 3.0 makes them all page templates, renames the bookmarks page to Saved (/saved/), and drops the archive and the contact page (see Upgrade to v3).

Dashi has its own pages for members: sign-up (/signup/), sign-in (/signin/), account (/account/) and membership (/membership/), each a page with its template.

To use Ghost’s Portal instead, turn on Use portal links in Settings › Site › Design & branding › Theme › Site wide (set your Ghost site URL to open it in your Ghost Admin) (off by default). Then Subscribe, Sign in and Account in the header and the menu, the welcome panel’s Subscribe (when there’s no home-welcome page), the upgrade box of the sidebar template and the panel on members-only and paid posts open Portal instead of the theme’s pages.

The buttons of the tiers on the membership page always open Portal, and the subscribe form in the sidebar template signs visitors up directly.

Note

To see the Portal links, open Settings › Membership › Signup portal (set your Ghost site URL to open it in your Ghost Admin), choose Customize, then the Links tab. They work in the buttons of your own Call to action cards too, such as those in the welcome panel.

Color customization

You can change the accent color in Settings › Site › Design & branding › Brand (set your Ghost site URL to open it in your Ghost Admin). The theme picks black or white text for it, whichever reads better. The welcome panel, the buttons and the panels on members-only posts use it.

Dashi has four color schemes: Light, Dark, Whitesmoke (warm paper) and Midnight (deep violet). Readers pick theirs in the color scheme picker at the foot of the left column (in the menu on phones), which shows each scheme’s colors; their choice is saved in their browser. Light and Dark use your accent color and Secondary color. Whitesmoke and Midnight have their own: coral and teal for Whitesmoke, magenta and yellow for Midnight.

In Settings › Site › Design & branding › Theme › Site wide (set your Ghost site URL to open it in your Ghost Admin):

  • Secondary color — the second color of the text logo’s gradient (when the site has no logo), the Paid label and the dot on the announcements bell (default #ce4b08)
  • Color scheme — the color scheme readers see first: system (default) follows the reader’s device setting, light or dark; or light, dark, whitesmoke or midnight

Change the colors

The theme’s colors are CSS custom properties, so you can override them in Settings › Advanced › Code injection › Site header (set your Ghost site URL to open it in your Ghost Admin) (what code injection is). Add the following and adjust the values.

For the Light color scheme:

HTML
<style>
  :root {
    --color-light-typ: #1A1A1F;    /* text */
    --color-light-bgr: #F5F6F9;    /* page background */
    --color-typ-tone: #5B5F6B;     /* muted text */
    --color-typ-content: #26272D;  /* the text of posts */
    --color-bgr-tone: #ECEDF4;     /* hover and the current item */
    --color-card: #FFFFFF;         /* cards, the left column */
    --color-brd: #E3E5EC;          /* borders */
  }
</style>

For the Dark color scheme, set its text and background on :root too, and the other colors under a second selector, which applies whenever the site shows Dark, whether the reader chose it or their device did:

HTML
<style>
  :root {
    --color-dark-typ: #ECEDF1;
    --color-dark-bgr: #16161C;
  }
  [data-color-scheme="dark"]:root {
    --color-typ-tone: #9EA1AC;
    --color-typ-content: #DCDDE3;
    --color-bgr-tone: #2A2B37;
    --color-card: #1F2029;
    --color-brd: #2E3040;
  }
</style>

The values above are the theme’s defaults. The text and background are set once per scheme (--color-light-…, --color-dark-…), so the picker’s swatches follow your colors. Whitesmoke and Midnight work the same way, with --color-whitesmoke-typ, --color-whitesmoke-bgr, --color-midnight-typ and --color-midnight-bgr, and their accent and secondary colors are --color-whitesmoke-brand, --color-whitesmoke-secondary, --color-midnight-brand and --color-midnight-secondary. Their other colors go under [data-color-scheme="whitesmoke"]:root and [data-color-scheme="midnight"]:root.

The access labels have colors of their own: --color-free for Free (#2B7049); Members uses the accent color and Paid the secondary color, each mixed to read well as text in every color scheme.

A tag’s own color, set in Tags in Ghost Admin, shows as a dot beside it in the topics, on its cards and on the tags page.

Some tools for choosing colors: Fuel HSL color picker (opens in a new tab), Coolors contrast checker (opens in a new tab).

Note

Before 3.0, the color schemes were set in COLOR_SCHEMES in the theme’s config file, the colors were --color-text, --color-bg and so on, and the setting was Default color scheme. 3.0 renames them: the table is under Upgrade to v3.

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.

By default the theme uses Jost (opens in a new tab) for headings, body text and the interface, loaded from Bunny Fonts (opens in a new tab). To use other fonts, set them in Ghost’s own typography settings, in Settings › Site › Design & branding › Brand › Typography (set your Ghost site URL to open it in your Ghost Admin): they take over when set.

UI font family in Settings › Site › Design & branding › Theme › Site wide (set your Ghost site URL to open it in your Ghost Admin) sets the font of the interface (the navigation, buttons, labels and post info):

  • body (default) — the body font
  • heading — the heading font
  • system — the reader’s system font, with nothing to download
  • serif — the reader’s system serif font
  • mono — the reader’s system monospace font

To serve the font from your own server, see self-hosting Google Fonts.

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 (set your Ghost site URL to open it in your Ghost Admin) (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.

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.

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": 12
}

Image sizes

Ghost makes copies of every uploaded image at the sizes the theme asks for (opens in a new tab), 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": {
  "w100": {
    "width": 100
  },
  "w320": {
    "width": 320
  },
  "w640": {
    "width": 640
  },
  "w960": {
    "width": 960
  },
  "w1280": {
    "width": 1280
  },
  "w2000": {
    "width": 2000
  }
}

Comments

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

The theme uses Ghost’s native comments. Turn them on in Settings › Membership › Access (set your Ghost site URL to open it in your Ghost Admin), 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 (opens in a new tab). 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 (opens in a new tab) 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):

Handlebars
{{>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).

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 (set your Ghost site URL to open it in your Ghost Admin).

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 (set your Ghost site URL to open it in your Ghost Admin) (what code injection is). 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 (opens in a new tab), the library our guide to syntax highlighting in Ghost 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)
  • Portuguese (pt.json)
  • Turkish (tr.json)

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

Text
|__ 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.

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, you can work on the theme’s source. The theme is built with Tailwind CSS (opens in a new tab) and Alpine.js (opens in a new tab), and its assets are compiled and minified with Vite (opens in a new tab).

You need Node.js (opens in a new tab) and a local install of Ghost. 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 (opens in a new tab), 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 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.

Code snippets

Short snippets for common changes. Add them in Settings › Advanced › Code injection › Site header (set your Ghost site URL to open it in your Ghost Admin) (what code injection is). They use the theme’s CSS custom properties and data-* attributes, which stay the same across updates.

The logo is 32px tall on phones and 40px on larger screens, in the header on phones and in the left column on large screens. Change the heights to your preference:

HTML
<style>
  :root {
    --logo-h-mobile: 36px;
    --logo-h-desktop: 48px;
  }
</style>

--logo-w-mobile and --logo-w-desktop set the width instead (auto by default), for a wide logo; it’s at most 192px wide, to fit the left column.

How to change the site width or the corners?

HTML
<style>
  :root {
    --container-site: 1280px;    /* the width of the content beside the left column (1200px) */
    --container-content: 720px;  /* the width of post text (680px) */
    --radius-theme: 8px;         /* the corners of cards (14px) */
    --radius-panel: 8px;         /* the corners of panels: the welcome panel, the tag and author heads, the tiers (16px) */
    --radius-img: 6px;           /* the corners of images (10px) */
    --radius-btn: 8px;           /* the corners of buttons, fields and tag pills (round) */
  }
</style>
HTML
<script>
  window.THEME_CONFIG.EXTERNAL_LINKS_IN_NEW_TAB = true;
</script>

Links to your own site keep opening in the same tab.

How to remove the color scheme picker?

HTML
<style>[data-color-scheme-picker] { display: none !important; }</style>

Set Color scheme to the scheme you want too, so every reader gets the same one.

How to hide the grid and list buttons?

HTML
<style>[data-feed-style-buttons] { display: none !important; }</style>

Post feed style then sets the layout for every reader, unless they picked one before.

How to hide Saved?

HTML
<style>[data-saved-link] { display: none !important; }</style>

This hides the link in the left column; the Save buttons stay. To leave out the Saved page too, unpublish the page with the slug saved.

How to hide the reading progress bar?

HTML
<style>[data-progress-bar] { display: none !important; }</style>

How to hide the topics?

The topics show in the left column ([data-topics]) and above Latest ([data-topic-links]). To hide both, unpublish the home-topics page (see Homepage); to hide one, add:

HTML
<style>[data-topic-links] { display: none !important; }</style>

Upgrade to v3

What changes when you update a Dashi 2.x site to 3.0, and the steps to move it over.

We rebuilt Dashi for 3.0 on a new codebase, with a refreshed design: a left column with the navigation, Saved, the topics and the color scheme picker, a welcome panel built from a page you write in the Ghost editor, page templates for the members pages, and better keyboard and screen reader access. Almost every file has changed, so if you’ve edited the theme’s files, start from the new version and bring your changes over. These things change for a site that runs 2.x:

  • The welcome panel comes from the home-welcome page. Hero headline, Hero description, Hero CTA text, Hero CTA link and Hero stats are gone: the page’s title is the small label, its Call to action cards, one per audience, the text and buttons, and its Callout cards the figures (see Homepage).
  • Featured posts come first in Latest. The featured posts slider (Featured slider) and the homepage sidebar (Post feed sidebar) are gone; the theme’s routes.yaml orders the homepage featured posts first, then the newest.
  • The topics come from the home-topics page. The tag filter on the homepage and tag pages is gone: the page’s tags show in the left column and above Latest.
  • Post feed style is now in Site wide, and sets every list of posts (the homepage, tag and author pages and Saved). The grid has two columns from small screens up and three on extra large screens; the 2-column option is gone.
  • The theme’s own pages are pages with a template instead of entries in routes.yaml or templates picked by the page’s slug: sign up, sign in, account, membership, tags, saved and recommendations (see Pages). The theme’s routes.yaml keeps only the homepage collection.
  • Bookmarks are now Saved, at /saved/. Readers’ saved posts are kept under a new name in their browser, so bookmarks from 2.x don’t carry over.
  • The archive and the contact page are gone. The homepage lists every post, with Load more posts; old /archive/ links get no redirect. For a contact page, use a page with a form embed (an HTML card from your form tool).
  • The post templates are renamed from custom-with-… to custom-post-with-…, shown in Ghost as Post With Sidebar and Post With Table Of Contents (see Templates). A post that used one shows the default layout until you pick a template again. The new Default post template setting lays out every post that uses the default template.
  • Announcements are pages with the #announcement internal tag, instead of posts, and the bell lists five (see Announcements).
  • The menu icons are Ghost’s navigation icons. The menu-icons.svg file and --global-menu-icons are gone: turn on Ghost’s Navigation icons beta and upload an icon per item (see Navigation icons). The left column is always shown on large screens, so the menu status script and ENABLE_MENU_AUTO_CLOSE are gone too.
  • Default color scheme is now Color scheme, with lowercase values (system, light, dark, whitesmoke, midnight). A site that set it before shows system until you pick it again. Whitesmoke and Midnight now use their own accent and secondary colors (coral and teal, magenta and yellow) in place of yours. The default Secondary color is now #ce4b08.
  • The theme config is gone. CONFIG and COLOR_SCHEMES in partials/theme-config.hbs no longer exist: the color schemes are CSS custom properties (see Color customization), and GHOST_SEARCH_LIMIT, DEFAULT_GRID_COLUMNS, ENABLE_COLOR_SCHEME_PICKER, ENABLE_SCROLL_TO_TOP, ENABLE_FILTER, ENABLE_HYPHENS and ENABLE_PWA are gone with the features they set. The scroll-to-top button, the breadcrumbs and the progressive web app files are gone. Code snippets shows how to hide the color scheme picker.
  • Open external links in new tab is gone. One line of code injection does the same (see Code snippets).
  • The comments are Ghost’s own. The Disqus and Cove options (DISQUS_SHORTNAME, COVE_ID) are gone.
  • The share buttons are gone. A Share button beside the byline opens Ghost’s share window, with the post’s link and the networks to share it on.
  • Code highlighting needs a tag. Dashi 2.x highlighted code blocks on every post; 3.0 loads Prism only on posts and pages with the #syntax-highlight internal tag (see Syntax highlighting).
  • A new setting, UI font family, sets the font of the interface. Jost stays the default font, and Ghost’s typography settings replace it when set (see Typography).
  • Code injection names changed. The CSS custom properties have new names (below), and class names such as js-menu are gone: style the data-* attributes instead, such as [data-header] or [data-color-scheme-picker]. CONFIG is now window.THEME_CONFIG. The icon sprite is gone: each icon is a file in partials/icons/.
Before 3.0In 3.0
--color-primarythe accent color in Settings › Site › Design & branding › Brand (set your Ghost site URL to open it in your Ghost Admin)
--color-secondarythe Secondary color setting
--color-text--color-typ (--color-light-typ, --color-dark-typ… per scheme)
--color-text-acc-1 and the other --color-text-acc-…--color-typ-tone
--color-text-reverse--color-typ-reverse
--color-bg-body--color-bgr (--color-light-bgr, --color-dark-bgr… per scheme)
--color-bg--color-card
--color-bg-acc-1 and the other --color-bg-acc-…--color-bgr-tone
--color-bg-reverse--color-bgr-reverse
--color-border--color-brd
--global-max-width--container-site
--global-wide-width--container-wide
--global-radius--radius-theme, --radius-panel and --radius-img
--global-radius-round--radius-btn

The other --global-… properties (--global-header-position, --global-hyphens, --global-menu-icons, --global-menu-alignement, --global-breadcrumb, --global-menu-cta and --global-gallery-gap) are gone, with nothing in their place.

Move a site over

After you upload Dashi 3.0 in Settings › Site › Theme › Change theme (set your Ghost site URL to open it in your Ghost Admin):

  1. Upload the new routes.yaml from the theme’s zip in Settings › Advanced › Labs (set your Ghost site URL to open it in your Ghost Admin) (see Upload routes.yaml). It takes out the sign-up, sign-in, account, archive and recommendations routes, and puts featured posts first on the homepage.
  2. In Pages, give the theme’s pages the matching Template in their page settings, or create them: signup (Template Signup), signin (Template Signin), account (Template Account), membership (Template Membership), and if your site uses them, tags (Template Tags) and recommendations (Template Recommendations).
  3. Change the Page URL of your bookmarks page to saved and pick Template Saved, or create the page. Update the link in your navigation if it had one.
  4. Delete the archive page, and take /archive/ out of your navigation. If you had a contact page, put your form in it with an HTML card.
  5. Create a page with the slug home-welcome: a short label as its title, an image as its feature image, and a Call to action card for each audience with its visibility set (your hero headline and description make a good start for visitors). Add Callout cards for figures if you want them.
  6. Create a page with the slug home-topics and add the tags to show as topics, in order. Leave both pages out of your navigation.
  7. For each post tagged #announcement, create a page with the same content and the #announcement internal tag, then remove the tag from the post, or delete the post.
  8. Pick the template again in Post settings › Template on the posts that used one of the post templates, or set Default post template.
  9. Add the #syntax-highlight internal tag to the posts and pages whose code blocks should be highlighted.
  10. If you changed Default color scheme, pick Color scheme again. If you had Open external links in new tab on, add its code injection line. Update any code injection that uses CONFIG, COLOR_SCHEMES or the old names in the table above.

Something missing or unclear? Ask support.

Can’t find what you need?

Ask the person who builds the themes. Tell us what you are trying to do and we will point you the right way.