Organize your blog, newsletter or content site with Array10% OFF

Tuuli Documentation

Tuuli theme documentation, covering theme installation, routes setup, custom settings, theme development and more.
Last update: Mar 13, 2024

Theme compatibility

Tuuli v1.3.0 for Ghost 5.x

100/100

Install the theme

Follow the steps below to upload the theme:

  1. Log in to your publication admin section at yoursite.com/ghost/
  2. Go to Settings > Design ( yoursite.com/ghost/#/settings/design/ )
  3. Click Change theme ( yoursite.com/ghost/#/settings/design/change-theme )
  4. Click Upload theme and select the tuuli.zip file.
  5. After the upload is complete, under Installed themes click Activate
arrow-leftDesign  /  Change theme
Installed themes
tuuliActive
1.3.0
source (default)
1.2.3
Ghost - upload theme

Routes setup

Caution

For the theme to function properly you must upload the routes.yaml file. The file is located inside the tuuli.zip

Follow the steps below to upload the routes.yaml file (this is a separate step from theme upload)

  1. Log in to your publication admin section at yoursite.com/ghost/
  2. Go to Settings > Labs ( yoursite.com/ghost/#/settings/labs )
  3. Under Beta features click on Upload routes file button and select the file from the root directory of the theme.
Labs

This is a testing ground for new or experimental features. They may change, break or inexplicably disappear at any time.

RedirectsConfigure redirects for old or moved content,
more info in the docs
Download current redirects
RoutesConfigure dynamic routing by modifying the routes.yaml file
Download current routes

Custom settings

The theme comes with custom design settings, which are accessible from the Ghost Admin panel. To view and edit these settings go to Settings > Design & Branding ( yoursite.com/ghost/#/settings/design/)

Custom settings are defined in the package.json file. These settings are placed under three categories:

  1. Site-wide settings
  2. Homepage settings
  3. Post settings

Here's a preview of the available settings:


Homepage

The homepage layout is defined in the index.hbs file and has the following sections (besides the header and footer):

  • hero
  • posts
  • featured tags
  • subscribe CTA

Hero

The hero section can be completely customized from the Ghost Admin, including the title, description, and style.

By default the title and description will be the {{@site.title}} and {{@site.description}} (from Settings > General > Title & Description), and the image will be the {{@site.cover_image}} (from Settings > Desgin > Brand > Publication cover )

If you want a more flexible description, with links and other Ghost editor elements, you have to set the Hero source page slug in Settings > Design > Homepage. You have to add the slug of an existing page, and when you do that, the hero title will be your page title, the hero description will be your page content and the hero image will be your page feature image. (For example, in the demo, the value in settings is homepage, which means that the title, description, and image, will be taken from the /homepage/ page).

To change the style of the hero section you have to set the Home page layout in Settings > Design > Homepage. You can choose from the following options:

Posts

First of all, you can enable a separate featured posts section, simply by toggling the Featured posts section in Settings > Design > Homepage.

To change the style, you have to set the Post feed layout in Settings > Design > Homepage. You can choose from the following options:

  • list-with-images - post feed with post cards appearing as a list, including the feature image
  • list - post feed with post cards appearing as a list, without the feature image
  • grid-with-images - post feed with post cards appearing as grid items, including the feature image
  • grid - post feed with post cards appearing as grid items, without the feature image

The Post feed layout setting will apply to both the 'Featured posts' and 'Latest posts' as well as the 'Tag' and 'Author' templates.

The pagination is in classic style allowing you to navigate to each page separately, but you can change this style by changing the partials/pagination.hbs template.

To highlight some tags of your choosing, you just have to provide the tag slugs, separated by a comma in Featured tags slugs in Settings > Design > Homepage.

You can add any number of tags, but ideally, it should be a multiple of 4. For example, in the demo, the value of the custom setting: growth, balance, health, focus This means that the tags with slug 'growth', 'balance', 'health', and 'focus' will be fetched and rendered.

Subscribe CTA

The subscribe section right above the footer uses the {{@site.title}} and {{@site.description}}, for the headline and the description, but you can easily change it with the CTA Headline and CTA description in Settings > Design > Site-Wide.

Additionally, the Background accent in Settings > Design > Homepage provides different predefined background-color options for the CTA section.


Custom Pages

As explained in the routes setup, the theme comes with a couple of custom pages, which need some actions from your side to be activated.

Uploading the routes.yaml file is a key requirement for these custom pages.

By default, that is the only requirement, but if you want even more control over the pages then you should activate the data property and create the page with the correct slug.

To create a Page:

  1. Log in to your publication admin section at yoursite.com/ghost/
  2. Go to Pages ( yoursite.com/ghost/#/pages/ )
  3. Click New page and set the Title and Page URL
  4. Finally, click Publish

Archive

The archive page is implemented in the archive.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/archive/:
  template: archive
  data: page.archive # When active data will be taken from the  "/archive/" page

If you activated the data property, you also have to create the page with the archive slug.

Signup

The signup page is implemented in the signup.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/signup/:
  template: signup
  data: page.signup # When active data will be taken from the  "/signup/" page

If you activated the data property, you also have to create the page with the signup slug. Additionally, the feature image of this page will appear on the side full-width.

Signin

The signin page is implemented in the signin.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/signin/:
  template: signin
  data: page.signin # When active data will be taken from the  "/signin/" page

If you activated the data property, you also have to create the page with the signin slug. Additionally, the feature image of this page will appear on the side full-width.

Account

The account page is implemented in the account.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/account/:
  template: account
  data: page.account # When active data will be taken from the  "/account/" page

If you activated the data property, you also have to create the page with the account slug.

Membership

The membership page is implemented in the membership.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/membership/:
  template: membership
  data: page.membership # When active data will be taken from the  "/membership/" page

If you activated the data property, you also have to create the page with the membership slug.

The membership tier names, prices, and benefits can all be changed in the Admin, by going to Settings > Membership ( /ghost/#/settings/members). Edit existing tiers or add new ones under the Membership Tiers section.

By default the native Ghost search is active, but you can change it from the custom settings: Search type in Settings > Design > Site-wide.

The options are:

  • Native - the Ghost native search function will be used
  • Custom - the custom search function will be used
  • None - deactivate the search and the icon will not be displayed

Both the native and custom search functions, work out of the box, you don't need to configure anything (besides uploading the routes file for the custom search).

The custom search is implemented in the search.hbs template and it's based on the fuse.js library To customize how the custom search works, you can edit the template.

Custom search demo

Authors

The authors page is implemented in the authors.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/authors/:
  template: authors
  data: page.authors # When active data will be taken from the  "/authors/" page

If you activated the data property, you also have to create the page with the authors slug.

Tags

The tags page is implemented in the tags.hbs template.

If you want to control the meta properties for this page, you have to activate the data property:

/tags/:
  template: tags
  data: page.tags # When active data will be taken from the  "/tags/" page

If you activated the data property, you also have to create the page with the tags slug.


Custom templates

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

The theme comes with several custom templates, which can be selected for both posts and pages, in the Post Settings menu.

Custom templates:

  • custom-with-background-image.hbs - template with feature image in the background
  • custom-with-full-width-background-image.hbs - template with feature image being a full-width background
  • custom-with-image-on-side.hbs - template with feature image being on the side (on desktop)
  • custom-with-narrow-image.hbs - template with a narrow image format (same width as the post content)
  • custom-with-sidebar.hbs - template with sidebar beside the post content (on desktop), sidebar template is partials/sidebar.hbs
  • custom-with-table-of-contents-and-sidebar.hbs - template with table of contents on the left and sidebar on the right side of the post content

If you want to edit the templates these are in the root directory of the theme.


Color customization

The most important CSS configurations of the theme are defined as custom CSS properties, so you can easily overwrite them from Code Injection to change background colors, text colors, and more.

The theme comes with 5 different color schemes, the default one can be set in the admin using the Default color scheme in Settings > Design > Site-Wide.

The included color schemes:

  • light
  • dark
  • midnight
  • ivory
  • skyblue

The default option is system which will be either the dark or light theme, depending on the user's preference.

It's possible to change the color schemes by changing the properties. This can be done by adding the following in Code Injection and adjusting the values.

To change the light theme:

<style>
  :root {
    /* color configuration */
    --color-text: hsl(0 0% 15%);
    --color-text-acc: hsl(0 0% 25%);
    --color-text-reverse: hsl(0 0% 85%);
    --color-bg: hsl(0 100% 100%);
    --color-bg-acc: hsl(0 0% 97%);
    --color-bg-reverse: hsl(0 0% 15%);
    --color-bg-base: 0 0% 100%;
    --color-bg-base-reverse: 0 0% 0%;
    --color-neutral: hsl(0 0% 50%);
    --color-border: hsl(0 0% 92%);
  }
</style>

To change the dark theme:

<style>
  html[data-color-scheme='dark'] {
    --color-text: hsl(0 0% 85%);
    --color-text-acc: hsl(0 0% 75%);
    --color-text-reverse: hsl(0 0% 15%);
    --color-bg: hsl(0 100% 100%);
    --color-bg-acc: hsl(0 0% 97%);
    --color-bg-reverse: hsl(0 0% 15%);
    --color-bg-base: 0 0% 100%;
    --color-bg-base-reverse: 0 0% 0%;
    --color-neutral: hsl(0 0% 50%);
    --color-border: hsl(0 0% 20%);
  }
</style>

To change the midnight theme:

<style>
  [data-color-scheme='midnight'] {
    --color-text: hsl(250 63% 90%);
    --color-text-acc: hsl(250 63% 85%);
    --color-text-reverse: hsl(250 63% 10%);

    --color-bg: hsl(250 63% 10%);
    --color-bg-acc: hsl(250 63% 20%);
    --color-bg-reverse: hsl(250 63% 90%);
    --color-bg-base: 250 63% 0%;
    --color-bg-base-reverse: 250 63% 100%;

    --color-neutral: hsl(250 63% 50%);
    --color-border: hsl(250 63% 25%);
  }
</style>

To change the ivory theme:

<style>
  [data-color-scheme='ivory'] {
    --color-text: hsl(34 36% 10%);
    --color-text-acc: hsl(34 36% 15%);
    --color-text-reverse: hsl(34 36% 90%);

    --color-bg: hsl(34 36% 90%);
    --color-bg-acc: hsl(34 36% 85%);
    --color-bg-reverse: hsl(34 36% 10%);
    --color-bg-base: 34 36% 100%;
    --color-bg-base-reverse: 34 36% 0%;

    --color-neutral: hsl(34 36% 50%);
    --color-border: hsl(34 36% 75%);
  }
</style>

To change the midnight theme:

<style>
  [data-color-scheme='skyblue'] {
    --color-text: hsl(210 100% 10%);
    --color-text-acc: hsl(210 100% 15%);
    --color-text-reverse: hsl(210 100% 90%);

    --color-bg: hsl(210 100% 92%);
    --color-bg-acc: hsl(210 100% 88%);
    --color-bg-reverse: hsl(210 100% 10%);
    --color-bg-base: 210 100% 50%;
    --color-bg-base-reverse: 210 100% 50%;

    --color-neutral: hsl(210 100% 50%);
    --color-border: hsl(210 100% 86%);
  }
</style>

Some useful tools for choosing colors and gradients:

You can even define your color schemes, but that would require changing the theme files. Steps to define new color schemes:

  1. Change the package.json file, adding a new option under the color_scheme property.
  2. Add the new color scheme to the dropdown editing the partials/color-scheme-dropdown.hbs
  3. Add the CSS, either in Code Injection (using the previous code blocks as a template) or in the CSS files.

Syntax Highlighting

The theme comes with prism.js integration by default, to activate syntax highlighting just add the internal tag #syntax-highlight to your post.

Why is this necessary? In short, for performance. To avoid loading the library when it's not necessary. If you don't add the tag, the library will not load at all.

If you are someone who shares code regularly and wants to have the plugin on all your posts, without having to add the tag, you can do so by changing the partials/syntax-highlight.hbs file. Simply remove the condition checking for the tag.

Additionally, in this partial file, it's defined which version of the prism library is loaded as well as the components, languages, and theme. So you can easily customize it, add new languages, or a different code highlighting the theme without having to go into theme development.


Table of Contents

Table of contents are generated using the TocBot library and this is integrated into the theme by default. You can use the ToC functionality in two ways:

  1. Using the With Table Of Contents And Sidebar template.
  2. Using the internal tag #toc.

With the first option, you get a fixed Table of Contents on the left side next to the post content and also a sidebar on the right. (You can select this template for any post in the Post Settings menu in the Admin).

With the second option, you get a floating ToC on the top-right part of the website, with this option you can add a Table of Contents to any template you are using.

If you want to make changes to the ToC layout or the TocBot library configuration, you can edit the partials/toc.hbs file.


Fonts

You can set the font family from the Admin section, going to Settings > Design > Site-wide and under Font family select one of the options.

The theme comes with the following options:

  • System font - the default value, loads the system font (no requests to Google Fonts)
  • Literata & Inter - Literata for headings and Inter for the body font
  • Inter - Inter for both headings and body
  • Bitter - Bitter for both headings and body font
  • Outfit - Outfit for both headings and body font
  • Space Grotesk - Space Grotesk for both headings and body font
  • Inconsolata - Inconsolata for both headings and body font

With the System font option, you can avoid requests to the Google servers in case GDPR is a concern.

If you still want to use Google fonts and want to self-host the font files check out this guide for self-hosting Google Fonts.


Ghost config

Some configurations in Ghost themes can be defined in the package.json file, including Posts per page, Image sizes, and Custom settings.

Posts per page

The posts_per_page defines the number of posts that appear in your collections until it's paginated. For example, the value of posts_per_page is used on the home page, tag, and author templates.

You can change it in the package.json file:

"config": {
  "posts_per_page": 12
}

Image sizes

Ghost can handle responsive image sizes, and this is defined in the package.json file, under the image_sizes property. You can change the default configuration by editing this file before uploading the theme.

"image_sizes": {
  "xxs": {
    "width": 30
  },
  "xs": {
    "width": 100
  },
  "s": {
    "width": 320
  },
  "m": {
    "width": 640
  },
  "l": {
    "width": 960
  },
  "xl": {
    "width": 1280
  },
  "xxl": {
    "width": 2000
  }
}

The sizes defined will be used to generate copies of images at the specified sizes when uploading images in your Ghost Admin.


Comments

The theme uses the native Ghost comment feature. The Native Comment System requires at least Ghost v5.9.0, you have to enable it from Settings > Membership > Access > Commenting.

Here are the options you can choose from:

  • All members - Logged-in members
  • Paid-members only - Only logged-in members with an active subscription
  • Nobody - Disable commenting completely

Icons

The icons used in the theme are from Tabler Icons, the library consists of 5000+ icons. Only the icons used in the theme are included in the partials/icons directory in separate .hbs files.

Here are the steps to add new icons:

  1. Go to Tabler Icons and click on the Icon you want to add, this will copy the code to your clipboard.
  2. Go into the partials/icons directory and create a new file: your-icon.hbs
  3. Open the new file and paste the copied code from the clipboard.
  4. Save the file.

For using the icons inside the theme files, there is a special partial file partials/icon.hbs which accepts name and size as parameters.

Let's see an example and try to add a new icon. Assuming we want to add the icon camera and by clicking on the icon on the website, we get this code:

<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-camera" width="24" height="24" viewBox="0 0 24 24" strokeWidth="1.5" stroke="#2c3e50" fill="none" strokeLinecap="round" strokeLinejoin="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>

The next step is to create a new file: partials/icons/camera.hbs and paste the copied code in the file. The new file must be of .hbs type, so we can use it into the theme files:

{{>icon name="camera"}}

Social links are shown in the footer and by default, the theme comes with:

  • Facebook (Settings > General > Social accounts)
  • Twitter (Settings > General > Social accounts)
  • RSS

To add other links you need to edit the partials/social-links.hbs file. There are several other links in there already, you just have to uncomment the relevant parts and add your link in the href attribute.


Social sharing

Social sharing is part of the post layout and the following is included:

  • X(Twitter)
  • Facebook
  • Linkedin
  • Email
  • Copy to clipboard

To add other social sharing options you need to edit the partials/social-share.hbs file.


Translations

By default, everything is in English (en.json), additionally, the theme comes with translations in:

  • 🇩🇪 German (de.json)
  • 🇪🇸 Spanish (es.json)
  • 🇫🇷 French (fr.json)
  • 🇮🇹 Italian (it.json)
  • 🇳🇱 Dutch (nl.json)
  • 🇵🇹 Portuguese (pt.json)

Note

For a translation to apply, you have to set the language in Settings > General Settings > Publication language.

If you want to edit the translation in a specific language, you have to edit the corresponding translation file. The files are stored in the locales directory (inside the theme zip).

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

If the language file for your language doesn't exist, you have to create it (make sure to use the correct language code) The best way is to copy the content en.json file in your new language file, then change the translations.


Theme development

If you want to make more advanced changes to the theme, or you want to develop your components, the theme comes with a developer-friendly setup. You can take advantage of the Gulp tasks that are set up for compiling Javascript and PostCSS.

All the assets are combined and minified for better speed and performance. To customize the theme make sure you have Node.js and npm installed.

Follow the official guide for installing Ghost locally. After you have installed Ghost and put the theme directory inside the content/themes/ directory, run the following commands in the theme directory:

npm install

This will install all the dependencies for the theme

Then run:

gulp

This will compile PostCSS and javascript and will watch for changes. So when you edit a .hbs, .css or .js file the change will trigger the gulp watch task and this will compile the assets whenever you change a file.

If you want to compile just CSS:

gulp css

If you want to compile just JS:

gulp js

Code Snippets

Frequently asked questions and useful snippets you can use to make some quick changes to your site.

  • How to resize the header logo?

    Go to the Admin, Settings > Code Injections and in the Site Header add (adjust the height value depending on your preference):

    <style>.header__brand img { height: 42px; }</style>
    
  • How to resize the footer logo?

    Go to the Admin, Settings > Code Injections and in the Site Header add (adjust the height value depending on your preference):

    <style>.footer__brand img { height: 50px; }</style>
    
  • How to remove the color scheme dropdown?

    Go to the Admin, Settings > Code Injections and in the Site Header add:

    <style>.color-scheme { display: none; }</style>
    
Ghost Pro Hosting

Get the best managed Ghost CMS hosting and focus on bringing value to your audience.