Back to Documentations

Tripoli Documentation

Theme version: 1.0.3 — 02 September 2022 Changelog

Theme Editing & Tools

Edit the theme files mentioned here with a code editor. I recommend Visual Studio Code, Sublime Text, or Atom. Don’t use TextEdit on Mac.

Once you finish, zip the theme files, and upload the final zip file to your Ghost website.

If editing the routes.yaml file, make sure to upload it after every change you make.

Watch the following short video tutorial about theme editing.

If you are looking for Ghost hosting, I recommend Ghost(Pro).

Table of Contents

Theme Installation

The first step is to unzip the downloaded package by double-clicking it on Mac or by right-clicking and selecting “Extract All” in Windows.

Inside the new folder tripoli, you will find the theme file and an online documentation file.

Follow these steps to upload the theme to your website:

  1. Log in to your Ghost website admin (
  2. Click the settings icon ( ) at the bottom of the left-hand side.
  3. Go to Design > Change theme.
  4. Click Upload theme and select the theme file.
  5. Once uploaded, click Activate now to activate Tripoli.

Upload the routes.yaml File (⚑ Required)

The routes.yaml is required for the following reasons:

To upload the file, follow these steps:

  1. Unzip the theme file.
  2. In your Ghost admin, click the settings icon ( ) at the bottom of the left-hand side.
  3. Go to the Labs.
  4. Scroll down to the Routes section and click the Upload routes YAML button.
  5. Select and upload the routes.yaml file inside the theme folder.
Upload a routes file in Ghost

Note: upload routes.yaml after uploading the theme zip

There will already be a default routes.yaml file uploaded to Ghost. You need to upload your theme’s routes.yaml to override the default.

Do this separately after uploading your theme zip file.


The homepage will show a list of content sections.

Hero Section

The homepage hero section will include three columns—two for featured posts and one for the latest posts.

The center and left columns will include the most recent three featured posts. To make a post as featured, you can do that from the post setting by checking the Feature this post checkbox.

The right column will include the most recent six posts. Clicking the Latest header will take you to the Latest page, where you can see all the recent posts.

Tripoli Ghost Theme Custom Homepage Hero

Tags Sections

You can add many tag sections to the homepage; each section will show the recent four posts by the tag. To set this up:

  1. Go to the Ghost admin Settings > Design > Site design > Homepage
  2. In the Tag slugs for home sections input, add all the Tags Slug you want to include separated by (,). No spaces between commas.
Ghost Theme Tag Setting

To get the Tag Slug, you can find it on each Tag page from the admin.

Ghost Theme Tag Setting

You might end up with the Slugs as:


× No spaces between commas.

The Editors’ Picks section will show four posts with the hash-editors-picks tag.

  1. Go to your admin Tags page, and click the top right Internal tags tab.
  2. Click the New tag button.
  3. In the name field, add #editors-picks
  4. Click Save
Ghost Theme Internal Tag Setting

Then, select the #editors-picks from the post Tags setting for each post you want to highlight here.

Ghost Theme Internal Tag Setting


In this section, you will learn about:

  1. Accent color
  2. Dark mode
  3. Changing Colors with CSS Variables

Accent Color

Change the Accent color from the admin Settings > Design > Brand > Accent color.

Tripoli use Accent color throughout the theme in button background, Ghost Portal button background, tag color, quotes border, header navigation links divider, and content link color.

Dark Mode

Tripoli will adapt to the reader operating system mode. The dark mode option is enabled by default. You can also switch between dark and light modes from the header link.

Tripoli has three admin settings from which you can have more control over dark mode.

  1. Disable the dark mode entirely and only keep the website in light mode.
  2. Upload a logo to be visible when the dark mode is active.
  3. Add dark mode Accent color.

Go to your website admin Settings > Design > Site design > Site-wide to show dark mode settings.

Tripoli Ghost CMS Theme Dark Mode Settings

Changing Colors with CSS Variables

This section is for changing all the theme colors; check the Accent color if changing the button’s background color is all you want.

Using Code Injection, you can change the theme colors for the light and dark modes with CSS Variables.

For a list of available theme variables, check the following theme files:

  • Light mode: assets/sass/tokens/_colors.scss
  • Dark mode: assets/sass/tokens/_colors-dark.scss

You can open the theme files in a code editor, or see the following as a reference.

Light mode variables

/* The main text color  */
--color-text-primary: #000000;

/* The secondary text color, you can see it in post date, author name for example */
--color-text-secondary: #4E5965;

/* Primary border color, you can see it under homepage section titles */
--color-border-primary: #000000;

/*  Secondary border color, you can see it in header section*/
--color-border-secondary: #D9D9D9;

/* Theme main background  */
--color-background-primary: #FFFFFF;

/* Theme secondary background, you can see it in the homepage editors pick,
   footer, share icons backgrounds */
--color-background-secondary: #EFF8FA;

Dark mode variables

--color-text-primary: #FFFFFF;
--color-text-secondary: #B3B3B3;
--color-border-primary: #525252;
--color-border-secondary: #303030;
--color-background-primary: #181818;
--color-background-secondary: #212121;

Don’t change the colors in these files; use it only as a reference for the available CSS Variables and instead use Code Injection as mentioned below to change the colors.

For example, let’s change the theme background color. We will change the --color-background-primary variable value in this case. You can copy this color variable to Code Injection > Site Header and assign it your new color, as in the following example.

  /* Light Mode*/
  :root {
    --color-background-primary: #FAFAFA;

  /* Dark Mode*/
  @media (prefers-color-scheme: dark) {
    :root:not([data-user-color-scheme]) {
      --color-background-primary: #000000;

  [data-user-color-scheme='dark'] {
    --color-background-primary: #000000;

Notice that we duplicated the variable for dark mode in two blocks.

In the above example, we changed the background color for the light mode to #FAFAFA and #000000 for the dark mode. You can do this for any other variable.

Color Tools

The following are some online websites and tools to help with color inspiration. Please make sure you choose an accessible color scheme; this is important for readers.


Manage pages for Tags, Authors, and Newsletters.

Tags Page

Follow these steps to create the Tags page:

  1. From the Ghost admin Pages section, create a new page and give it a title, like “Tags”.
  2. From Page settings, select the Tags template.
  3. Publish the page.
  4. To add the page to the navigation, please check the Navigation section.
Ghost Tags Page

Note for Self-hosters

If you are self-hosting your website, you may need to do a server restart. This should get the Tags option to show up in the Template dropdown.

To add a unique color for each tag, go to the tag page from your website admin and set the Color.

If you didn’t set the Color, the theme would use the Accent color as a fallback.

Ghost Tag Color Setting

Authors Page

To create the Authors page:

  1. Create a new page and give it a title, like “Authors”
  2. From Page settings, select the Authors template
  3. Publish the page
  4. To add the page to the navigation, add it as a Navigation item with authors/ as the URL
Ghost Authors Page
Tripoli Ghost Theme Authors Page

Newsletters Page

The idea behind the Newsletters page is to enable your reader to subscribe to specific types of content.

The Newsletters page uses the Ghost Labels feature to create different labels, and when a user chooses a Label and subscribes to it, you will see the Labels in his admin profile.

Ghost Membership Profile

When you are about to send a newsletter email or publish a post, you can select which Labels you want to send the post to.

Ghost Post Publish Settings with Labels

Publish the Newsletters page:

  1. Create a new page and give it a title, like “Newsletters”
  2. From Page settings, select the Newsletters template
  3. Publish the page
  4. To add the page to the navigation, add it as a Navigation item with newsletters/ as the URL

Change the default Labels:

The theme comes with default Labels, and you will need to change them to match your preference. Open the theme /partials/newsletters-labels.hbs file using a code editor to change them, and you will also find the instructions in the same file.

A note about the Newsletters page

I released the Newsletter Labels just before the Ghost Multiple Newsletters to help fill this gap and enable people to choose different types of content before they signup. But Ghost created Newsletters as a new section instead of doing this with Labels.

The theme Newsletter page with Labels adds Labels to a subscriber, while the Ghost Newsletter updates the profile NEWSLETTERS.

Ghost Membership Profile

So, both work differently and update different data.

When you are about to send a new post, you can then choose a Label or a Newsletter to send the post to.

Ghost Publish Post

The Ghost Newsletter is a native solution that is easy to set up and manage. Subscribers can also change this option later from their Portal profile. Use any of the solutions or both, depending on your use case.

Ghost Membership Portal Newsletters

Post Featured Image Size

The featured image ideal size to upload is 1336 × 890. The visible size is 668 × 445 which you can also upload, but double it — if you can — to 1336 × 890 to look sharper on retina displays.

The image aspect ratio is 3/2.

You can add, edit, delete, and reorder the navigation menu in Ghost Admin from the Settings → Navigation page.

Ghost CMS navigation menu

Add New Page to Navigaiton

First, type the page name as you’d like it to appear on your navigation in the label field.

Ghost CMS label field

Next, click on the item’s URL. Add the page slug after the final /.

Click the Save button.

Like Header Navigation, you can add the footer navigation links from the Ghost admin Settings → Navigation > SECONDARY NAVIGATION.

Tripoli uses the Ghost Native Search.

  1. Go to your Ghost admin Settings > Design > Site design > Site-wide
  2. Toggle the Enable search option off
  3. Click Save


The theme comes with Ghost Native Comments integration. You can turn the comments on from your Ghost admin Settings > Membership > Commenting.

Learn more about Ghost comments.

Ghost developer documentation for comments.

The theme file for Ghost comments partials/comments/ghost.hbs.

Ghost supports adding only Facebook and Twitter URLs. Go to Settings > General > Social accounts and add your URLs from your site admin.

Ghost CMS Theme Social Accounts

Tripoli supports adding Instagram, YouTube, and Linkedin URLs. Go to Settings > Design > Site-wide.

Tripoli Ghost Theme Social Media Accounts Settings

The social links theme file is at /partials/social-links.hbs.


Tripoli comes in many languages already. But if you’d like to add another one, you’ll be able to do that too.

Theme Translation

Tripoli supports Ghost i18n and comes with Arabic, German, Italian, Spanish, French, Finnish, Portuguese Dutch, Turkish, and Danish translations.

To use a language other than English, go to your Ghost admin Settings > General > PUBLICATION INFO and enter the ISO Code into the Publication Language field.

The following is a list of the available theme languages with the code to use.

  • ar for Arabic
  • da for Danish
  • de for Germany
  • en for English
  • es for Spanish
  • fi for Finnish
  • fr for French
  • it for Italian
  • nl for Dutch
  • pt for Portuguese
  • tr for Turkish
Ghost Publication Language Setting

Add a New Language Translation

If the theme does not have a translation for your language, follow the following steps to add a new language translation.

  1. Create a new file using a code editor in the theme’s locales folder with the ISO Language Codes code. Foe example, if the new language is Japanese, the ISO code will be jaand the file name will be ja.json.
  2. In the same locales folder, open the en.json file and copy its content into your new language file.
  3. Start translating, as shown in the following Edit Translation section.
  4. Go to your Ghost admin Settings > General > PUBLICATION INFO and enter your language ISO code into the Publication Language field. For example, ja.
  5. Click Save settings.

Once you finish, zip the theme files, and upload the final zip file to your Ghost website.

You may want to restart Ghost or deactivate and activate the theme again to make the new changes effective.

Edit Translation

To improve or edit a translation in a specific available language, you can open the language file using a code editor in the locales folder:

| |____ar.json
| |____da.json
| |____de.json
| |____en.json
| |____es.json
| |____fi.json
| |____fr.json
| |____it.json
| |____nl.json
| |____pt.json
| |____tr.json

For example, the German translation file (de) looks like this:

  "Skip to content": "Zum Inhalt springen",

  "Page Not Found": "Page Not Found",

  "Search": "Suche",

  "Share on Twitter": "Auf Twitter teilen",
  "Share on Facebook": "Auf Facebook teilen",
  "Share on LinkedIn": "Auf LinkedIn teilen",
  "Share via Email": "Per E-Mail teilen",

  "Loading": "Wird geladen",
  "Load More": "Weitere Artikel",

  "Featured": "Hervorgehoben",
  "Latest": "Neueste",
  "Related": "Verwandt",

  "Subscribe": "Abonnieren",
  "Newsletter": "Newsletter",
  "Email address": "Email address",
  "Please check your inbox and click the link to confirm your subscription.": "Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um Ihr Abonnement zu bestätigen.",
  "Please enter a valid email address.": "Bitte geben Sie eine gültige E-Mail-Adresse ein!",
  "An error occurred, please try again later.": "Ein Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.",

  "This post is for paying subscribers only": "Dieser Beitrag ist nur für zahlende Abonnenten",
  "This post is for subscribers only": "Dieser Beitrag ist nur für Abonnenten",
  "This post is for subscribers on the ": "Dieser Beitrag ist für Abonnenten der ",
  "Upgrade your account": "Aktualisieren Sie Ihr Konto",
  "Already have an account?": "Hast du schon ein Konto?",

  "Published with {ghostLink} & {themeLink}": "Veröffentlicht mit {ghostLink} & {themeLink}"

Each line consists of a left key ("Loading") and a right value ("Wird geladen").

The key is plain English that exists in all translation files and should not be changed. You should change only the value.

If you have any suggestions to improve a current translation or add a new language, please contact me.

Portal Text & Translation

There is no way to change or translate the Portal text yet. The Portal is not part of the theme files but a core Ghost component.

I suggest reaching out to the Gost team ( ); so they might work on this issue or have a workaround.


RTL means right to left. Turning on RTL makes the theme readable for languages written from right to left, like Arabic or Hebrew.

To enable the RTL option, open the partials/head.hbs theme file using a code editor and change line 7 to {{> css/dist/style-rtl }}.

Save the file and upload the theme to your Ghost blog.

Once you finish, zip the theme files, and upload the final zip file to your Ghost website.

Multiple Languages Support

The theme supports Ghost translations for different languages, which means if you set the site language to French, some parts of the theme will change to French, for example, button labels.

On the other hand, having multiple languages on one website is not supported out of the box in Ghost, so the theme. This guide by Ghost explains how to configure multiple languages. I have not tried it, but it might be a good starting point.

Posts Per Page

You can control how many posts display per page from the package.json file.

"config": {
  "posts_per_page": 16

The theme default value is set to 16 posts per page.

Typography Drop Caps

The theme comes with different styles of typography drop caps. It will apply to the first letter of the first word in a given paragraph.

To add a drop cap style to a paragraph.

  1. Add an HTML card to your Post or Page content editor
  2. In that HTML card, add a <p> </p> HTML element with the Drop Cap CSS class. For example, <p class='u-drop-cap-small'> </p>. Check below for the available classes for each style
  3. Add your paragraph text whith that <p> </p> HTML element
Tripoli Ghost Theme Typography Dropcap HTML Card

There are currently four styles available.

➊ Small Drop Cap

  • CSS class → u-drop-cap-small
  • Example ↓
<p class='u-drop-cap-small'>TEXT HERE</p>

The result.

Tripoli Ghost Theme Typography Dropcap

➋ Large Drop Cap

  • CSS class → u-drop-cap-large
  • Example ↓
<p class='u-drop-cap-large'>TEXT HERE</p>

The result.

Tripoli Ghost Theme Typography Dropcap Large

To save time each time you create a new Drop Cap, you can create it as a snippet.

Changing Theme Typeface

Tripoli is using two typefaces:

  • Inter for the overall theme text such as navigation items, date, buttons, tags,…
  • Source Serif Pro for the post title and content.

The theme loads both typefaces using Google Fonts in the theme partials/typography.hbs file. It is then assigned as a CSS Variable and other system fonts as a backup in the theme /assets/sass/tokens/_typography.scss as the following example.

:root {
  --font-family-serif: 'Source Serif Pro', Georgia, serif;
  --font-family-sansSerif: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

You don’t need to edit the theme files if you want to use another typeface. Instead, use Code Injection Site Header.

For example, if you want to use the Roboto typeface from Google Fonts instead of Inter. Your code in Code Injection might be like this.

<link href=';500;700&display=swap' rel='stylesheet'>

  :root {
    --font-family-sansSerif: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

If you have a custom typeface, check out the Loading Custom Typeface section below.

I assume that you have the font files and the initial @font-face CSS code for loading the font. Something similar to the following code.

@font-face {
  font-family: 'Atyp';
  src: local('Atyp Text Regular'), local('Atyp-Text-Regular'),
    url('AtypText-Regular.woff2') format('woff2'),
    url('AtypText-Regular.woff') format('woff'),
    url('AtypText-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;

Create a new folder in the theme under /assets and name it fonts, for example, then copy your font files there.

Once you finish, zip the theme files, and upload the final zip file to your Ghost website.

In Ghost admin Code Injection, add your @font-face code with the new font files path wrapped in the <style> element.

  @font-face {
    font-family: 'Atyp';
    src: local('/assets/fonts/Atyp Text Regular'), local('Atyp-Text-Regular'),
        url('/assets/fonts/AtypText-Regular.woff2') format('woff2'),
        url('/assets/fonts/AtypText-Regular.woff') format('woff'),
        url('/assets/fonts/AtypText-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;

Then, you can assign the font to the theme CSS Variable as:

  :root {
    --font-family-sansSerif: 'Atyp', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

The above example will replace the Inter typeface with your one, which in this example Atyp.

If you are using another typeface to replace the theme Source Serif Pro, you can assign it to the --font-family-serif variable as:

  :root {
    --font-family-serif: 'MY_SERIF_FONT_NAME', Georgia, serif;

With both new typefaces, the new CSS Variables will be like:

  :root {
    --font-family-serif: 'MY_SERIF_FONT_NAME', Georgia, serif;
    --font-family-sansSerif: 'Atyp', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;


Since Tripoli uses the /latest/ URL for the latest posts, you can access the RSS feed at instead of For example,

If anyone subscribes to and you want to redirect them to, go to your Ghost admin Settings > Labs > Redirects and upload the redirects.yaml file, which you can find in the theme files.

An RSS icon is on the theme footer.

Google Analytics

To integrate Google Analytics, I recommend using the Google Analytics integration by Ghost.

Update Favicon

You can change the favicon from the Ghost admin Settings > Design > Site design > Brand > Publication icon.


Ghost has limited support for footnotes, which means it doesn’t support footnotes outside of the editor Markdown card. So, if your article content will all be in Markdown, this will work fine for you.

For creating a footnote, check out the Markdown Guide – Footnotes for more information about the syntax. You can check out how the theme renders this example in the demo. So, in your editor, you need to add a new Markdown card and then add your footnote inside.

The theme will render what the editor can do; the theme has no built-in footnotes support but Ghost. Check out this theme demo example.

Check out this Forum discussion for more information and probably some ideas and workarounds. Someone suggests bigfoot, and another one adds it manually.

I have not done any work to support footnotes beyond the basic Ghost Markdown implementation, so I’m afraid I can’t give any advice here.

Theme Deploy with GitHub Actions

Tripoli comes integrated with the Deploy Ghost Theme Github action. The purpose of the GitHub action is to take the theme from the GitHub repo and send it to your website.

Tripoli documentation Ghost CMS Theme GitHub Actions

I have written about this in How to Deploy Your Ghost Theme Using Github Actions. All you need to do is follow steps 1 and 2.

The Deploy Ghost Theme action is software by Ghost and works with any Ghost install, whether you self-host Ghost or use Ghost Pro.

Code Injection

Another choice for customization is to use the Ghost Code Injection settings in Ghost admin.

For a CSS example, you can use the following code in the Site Header section to change the logo color and font size.

  .c-logo__link {
    color: #4550E5;
    font-size: 32px;

Watch the following short video about Ghost Code Injection, how it works, and how to use it.

Checkout How to use Code Injection Ghost gude for more information.

Customize Logo Size

If you are using an image as a logo (instead of the site name) and want to change the logo size, use the following code in Code Injection.

  .c-logo__img {
    max-height: 48px;

The default value is 48px, so you can increase this value to match your preference.

If the logo image has a large white space around it, trim that space with a photo editing app for better results.

You can update the footer copyright line information from the theme partials/structure/footer.hbs file. Open and edit that file using a code editor.

To remove the Ghost and Tripoli links from the footer and keep the copy sign, year, and site name, add the following CSS code into the Ghost admin Code Injection Site Header.

  .c-footer-copy span { display: none; }

Click Save.


Read more about AMP at Google AMP + Ghost

The theme didn’t have an AMP file; the Ghost default/core one will be in use instead. If you want to customize it, you can add the default Ghost template to the theme folder and customize it.

Remove Author Name

Copy and paste the following CSS code into the Ghost admin Code Injection Site Header.

  .c-byline { display: none; }

It will hide the author name across the site.

Remove Post Date

Copy and paste the following CSS code into the Ghost admin Code Injection Site Header.

  .c-timestamp { display: none; }

It will hide the date across the site.

If you want to remove it only from the homepage, use:

  .home-template .c-timestamp { display: none; }

Remove Reading Time

Copy and paste the following CSS code into the Ghost admin Code Injection Site Header.

  .c-reading-time { display: none; }

It will hide the reating time from the article page.

Theme Development

This section is for developers only, and I assume you know what you are doing.

If you need to add custom CSS code, I highly recommend using Code Injection to avoid redoing your customizations with future theme updates.

Changing any .hbs file, for example, post.hbs, does not require being in development mode with gulp running. Just edit the file in your preferred editor and upload it.

If you are a developer and need to do heavy customization work, the theme uses Gulp to compile Sass and JavaScript. This improves the development flow and makes it much faster.

First, make sure you have Node.js, npm, Gulp CLI, and Bower installed. Check My Current Setup.

Run the following command in the theme root directory to install npm and bower dependencies.

npm install

To start Gulp, run:


This will compile Sass and JavaScript files and start watching changes as you edit files.

Gulp will produce two files:

assets/js/app.min.js: The final main JavaScript file.

This file is generated from many other JavaScript files listed in the gulpfile.js file. Gulp will do all the work to create that file, so no manual work is needed.

Gulp will watch your changes in the assets/js/app.js or assets/js/ghosthunter.js (if exist) and will then generate the final app.min.js file.

partials/css/dist/style.hbs: The final CSS file. It is used as an Internal CSS in the theme partials/head.hbs.

This file is generated from the assets/css/style-min.css file, which was generated by Gulp.

If you are working with Gulp, you should avoid editing these files. Instead, do customizations in assets/sass for CSS or in assets/js/app.js JavaScript. This way, you can ensure the flow is going in the right direction and never lose any changes.

My Current Setup

In case you are wondering what my current environment setup is and which package versions I use, take a look at the following:

$ node -v

$ npm -v

$ bower -v

$ gulp -v
CLI version: 2.3.0
Local version: 4.0.2

This environment works well for running Ghost and also for theme development.

I use macOS Monterey / M1 Chip.

You don’t have to have the exact environment setup, so that’s fine if your current setup works.

Zip Theme Files

Use one of the following three options to create a zip file ready to upload to your Ghost website.

➊ Using your computer program

You can compress it as a standard folder like any other folder on your computer. If you are on Mac, right-click on the theme folder to view the context menu. Then, click the Compress option.

Ghost theme zip on macOS

➋ Using the command line

zip -r tripoli -x '*.git*' '*node_modules*' '*bower_components*'

This command will exclude the node_modules and bower_components in case you are running gulp. And in case you are using Git, it will remove the .git folder.

➌ Using Gulp

Use the gulp zip command if you are running gulp.

Theme Update

You may be wondering how I can update my theme to the latest version?

There are two choices:

  • Keep your current theme and replace only the changed files from the new version. You can find the modified files on the theme page Changelog
  • Use the latest version as a starting point and redo your theme changes and customizations

One way to reduce the need for redoing customizations is to use the Code Injection tool. This is very helpful for adding custom CSS and tracking code. Keeping your custom CSS code with Code Injection is always recommended.


Have any questions? I’m here to help.

Contact Ahmad
Ahmad Ajmi