Skip to content
Back to Documentations

Hue Documentation

Theme version: 1.1.1 — 24 October 2022 Changelog

Theme Editing & Tools

Edit the theme files mentioned here with a code editor. I recommend Visual Studio Code or Sublime Text. 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 hue folder, you will find the hue.zip 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 (example.com/ghost).
  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 hue.zip theme file.
  5. Once uploaded, click Activate now to activate Hue.

Upload the routes.yaml File (⚑ Required)

The routes.yaml is required for the following reasons:

  • Show the posts tagged with the podcast tag on the homepage
  • Show the posts tagged with the blog tag on the blog page

To upload the file, follow these steps:

  1. Unzip the hue.zip 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.


Members / Subscriptions

Hue has different interface elements for membership feature.

  • Log in and Subscribe buttons in the header
  • Homepage Hero section subscription form
  • Call to action section on the post page to encourage visitors to subscribe if the post is for members only

Remove Membership Components from the Theme

If you want to disable membership from your website, you can do the following from the website admin. After doing this, all the theme/website membership elements like header links and forms will be removed.

  1. Go to your Ghost admin Settings > Membership > Subscription access
  2. Select Nobody
  3. Click Save

Embed the Subscribe Form in the Middle of a Blog Post

To add the Subscribe Form in the middle of a blog post, click on the + button and choose the HTML card.

Ghost HTML CARD

Then paste the following code into the editor field and save your post.

<form data-members-form="subscribe" class="c-subscribe-form" style='background: var(--bg-gray); padding:16px;'>
  <div class="form-group">
    <label for="subscribe-email" class="u-hidden-visually">Your email</label>
    <input type="email" name="email" class="c-subscribe-form__input" id="subscribe-email" placeholder="Your email address" data-members-email="">
    <button type="submit" value="Subscribe" class="c-btn c-btn--action c-subscribe-form__btn">Subscribe</button>
  </div>

  <div class="u-alert u-alert--success u-mt-16">Please check your inbox and click the link to confirm your subscription.</div>
  <div class="u-alert u-alert--invalid u-mt-16">Please enter a valid email address!</div>
  <div class="u-alert u-alert--error u-mt-16">An error occurred, please try again later.</div>
</form>
Subscribe Form Embed

You may be asking, how I got the form HTML code above? Well, you can copy it from your blog or the theme demo source code. You can do this by opening your browser DevTools and select the form element and copy it. Like the following screenshot.

Subscribe Form Embed Source Code

You can use Chrome DevTools or Firefox Developer Tools. To open the DevTools, right-click on an element on the page and choose Inspect, then the Elements panel will open. Also, you can press Command+Option+C (Mac) or Control+Shift+C (Windows, Linux, Chrome OS) to open the Elements panel.

Remove Ghost Portal / The Bottom Right Button

This is the Ghost Portal button; you can disable it from the Ghost admin. More information at Portal Look and feel.

Remove Ghost Portal

Membership Troubleshooting Tips

If for any reason the subscribe form does not work, or there is an error message, the following tips might help:

  1. First, ensure you run the latest version of Ghost.

  2. If you are self-hosting your website, make sure to set up the mail config. After doing that, restart your Ghost server.

  3. The website config URL should match the URL used to access the website, as described in the Ghost docs.

Enter the URL you use to access your publication. If using a subpath, enter the full path, https://example.com/blog/. If using SSL, always enter the URL with https://..


If you still have an issue using Ghost Pro, please get in touch with the Ghost team. If you use any self-hosting provider, please get in touch with them for help.


There is nothing to do from the theme side. Also, you can try the original theme demo to double-check that everything is working fine.

For more information about Members, connecting Stripe, and setting the package price, check the official Ghost documentation.


Home Hero

Hue Ghost CMS Theme Homepage Hero

The hero section shows the following components:

  • Site Publication cover
  • Site description
  • Subscription form
  • Subscribe list with icons to show and link to different podcast services

You can edit them from the Ghost admin General settings admin page.

Publication Cover

  • Settings > General > Branding > Publication cover

Site Description

  • Settings > General > PUBLICATION INFO > Title & description

You can add normal HTML tags to the description like links or headings. The theme will automatically render them on the browser. For example, the demo description is the following:

<h3>Hue Podcast</h3><p>A Podcasting Theme for the Ghost CMS with membership and subscription built-in.</p>

The website’s title, which appears on the header, will not automatically visible in the hero description/tagline. Instead, you can add it as part of the blog description, like the example above.

Subscribe list

The theme comes with the following podcast services icons:

  • Apple Podcasts
  • Overcast
  • Spotify
  • YouTube
  • Pocket Casts
  • Castro
  • Breaker
  • Google Podcasts
  • RadioPublic
  • RSS

To update the list:

  1. Go to your Ghost admin Settings > Design > Site design > Homepage
  2. Add the service link to each one. Skip the one you don’t have.
  3. Click Save

The theme file for the icons is partials/subscribe-list.hbs.


Pages

Manage pages for Homepage, Blog, and Contact.

Homepage Podcasts

The theme is designed to list only the posts with the podcast tag on the home page. So, to show any post on the home page, add the podcast tag to it.

Hue Ghost CMS Theme Homepage Podcasts section

Blog Page

The theme is designed to list posts with the blog tag on the /blog page. So, to show any post on the blog page, add the blog to it.

Hue Ghost CMS Theme Blog page

To add the blog link to the site navigation.

  • Check out the Navigation section for more information about how to add a new link.
  • In the URL field, set it to blog like the following example.
Blog page navigation

Contact Page

To create the Contact page:

  1. Create a new Page and give it a title, like “Contact”.
  2. Add your content and the contact form code using Formspree as a service. Please check the code example below.
  3. Click Publish to publish the page.
  4. To add the page to the navigation, please check the Navigation section.
<form action="https://formspree.io/your@email.com" method="POST">
  <input type="text" name="name" placeholder="Name">
  <input type="email" name="_replyto" placeholder="Email">
  <textarea name='message' placeholder="Message"></textarea>
  <input class='c-btn' type="submit" value="Send">
</form>

For more information, check out How to Add a Contact Form to Your Ghost Blog.


RSS Feed URL

Ghost automatically produces a custom RSS feed URL for every tag. So, you will have a Feed URL for posts with the blog tag and posts with the podcast tag.

Podcast RSS Feed URL

For the podcast tag, you can access it under /tag/podcast/rss/ like the theme demo aspirethemes.com/tag/podcast/rss

Blog RSS Feed URL

For the blog tag, you can access it under /tag/blog/rss/ like the theme demo aspirethemes.com/tag/blog/rss


Colors

In this section, you will learn about:

  1. Accent color
  2. Dark mode

Accent Color

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

Hue use Accent color throughout the theme in button background, Ghost Portal button background, quotes border, and content link color.

Dark Mode

Hue 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.

Hue 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.


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

Ghost navigation menu

To include a static page on your navigation menu, follow these steps.

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

Ghost label field

Next, click on the item’s URL. The blog URL will already be auto-populated. Add the page slug after the final /. When satisfied with your page configurations, click the Save button.

Add a Hyphen (-) followed by a space before the navigation Label to add a dropdown menu.

Ghost dropdown navigation menu

In this example, Contact will be the parent item with Blog and Archive as child items.

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


Hue uses the Ghost Native Search.

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

Embed Podcasts

I don’t use a custom player for podcasts, but you can embed the podcast player code in a post.

To insert the podcast player into the Ghost editor, you need to get the EMBED CODE for that podcast and then add it as an HTML card.

To add the EMBED CODE to the editor, click on the + button and choose the HTML card.

Ghost HTML CARD

Then paste the code into the editor field and save your post.

Podcast Embed Code

Comments

Ghost Native Comments

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.


Posts Per Page

You can control how many posts to display per page from the theme package.json file. Open that file using a code editor and change the posts_per_page value from 6 to a number.

"config": {
  "posts_per_page": 6
}

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

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


Related posts section will be visible at the bottom of a post if other posts share the same tags as the current post.


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.


Social Sharing Icons

You can customize and update a post’s social media sharing icons from the partials/share.hbs theme file.


Footer social media links are placed in the partials/social-icons.hbs file.

Ghost supports adding Facebook and Twitter profile URLs from the admin panel.

Go to General > Social accounts and add your URLs. This will update Facebook and Twitter URLs and show them in the footer social media section.

Ghost CMS Theme Social Accounts

Hue supports adding Instagram URL. Go to Settings > Design > Site-wide.

If you want to add extra social media links not available in the theme or Ghost settings shown above, you can do that in the partials/social-icons.hbs file. You will find the icon’s code that comes with the theme in the Available Social Media Icons section.

For example, to add a new social line for Pinterest, your code will be like:

<li class='c-social-icons__item'>
  <a href='#' aria-label='Pinterest' rel='noopener'>
    <span class='c-social-icons__icon' data-icon='ei-sc-pinterest' data-size='s'></span>
  </a>
  </li>

The code above contains the icon code which you can find in the below list, and the social media link (a) within a list element (li).

To add your Instagram URL, replace your Instagram full URL with the link href value (#). If your Instagram URL is:

https://www.pinterest.com/ghost/

Then the new code will be:

<li class='c-social-icons__item'>
  <a href='https://www.pinterest.com/ghost/' aria-label='Pinterest' rel='noopener'>
    <span class='c-social-icons__icon' data-icon='ei-sc-pinterest' data-size='s'></span>
  </a>
</li>

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

Available Social Media Icons

The theme uses Evil Icons to provide simple and clean icons for other social accounts. Here you can find a list of the social media icons to use:

Facebook

<span class='c-social-icons__icon' data-icon='ei-sc-facebook' data-size='s'></span>

GitHub

<span class='c-social-icons__icon' data-icon='ei-sc-github' data-size='s'></span>

Instagram

<span class='c-social-icons__icon' data-icon='ei-sc-instagram' data-size='s'></span>

LinkedIn

<span class='c-social-icons__icon' data-icon='ei-sc-linkedin' data-size='s'></span>

Odnoklassniki

<span class='c-social-icons__icon' data-icon='ei-sc-odnoklassniki' data-size='s'></span>

Pinterest

<span class='c-social-icons__icon' data-icon='ei-sc-pinterest' data-size='s'></span>

Skype

<span class='c-social-icons__icon' data-icon='ei-sc-skype' data-size='s'></span>

SoundCloud

<span class='c-social-icons__icon' data-icon='ei-sc-soundcloud' data-size='s'></span>

Telegram

<span class='c-social-icons__icon' data-icon='ei-sc-telegram' data-size='s'></span>

Tumblr

<span class='c-social-icons__icon' data-icon='ei-sc-tumblr' data-size='s'></span>

Twitter

<span class='c-social-icons__icon' data-icon='ei-sc-twitter' data-size='s'></span>

Vimeo

<span class='c-social-icons__icon' data-icon='ei-sc-vimeo' data-size='s'></span>

VK

<span class='c-social-icons__icon' data-icon='ei-sc-vk' data-size='s'></span>

Youtube

<span class='c-social-icons__icon' data-icon='ei-sc-youtube' data-size='s'></span>

Languages

Hue ships with many languages already. But if you’d like to add another one, you’ll be able to do that too.

Theme Translation

Hue 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
  • du for Dutch
  • en for English
  • es for Spanish
  • fi for Finnish
  • fr for French
  • it for Italian
  • 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/ theme folder:

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

For example, the German translation file looks like this:

{
  "Loading": "Beladung",
  "Load More": "Mehr Artikel",

  "Latest Episodes": "Latest Episodes",
  "Featured Post": "Featured Artikel",
  "Page Not Found": "Seite nicht gefunden",
  "Load Comments": "Bemerkungen",
  "You might also like": "Sie könnten daran interessiert sein",
  "Authors": "Autoren",
  "Published with {ghostLink} & {themeLink}": "Veröffentlicht mit {ghostLink} & {themeLink}",

  "Share on Twitter": "Auf Twitter teilen",
  "Share on Facebook": "Auf Facebook teilen",
  "Share on LinkedIn": "Auf LinkedIn teilen",
  "Share on Pinterest": "Auf Pinterest teilen",
  "Share via Email": "Teilen Sie per E-Mail",
  "Copy link": "Link kopieren",
  "Link copied to clipboard": "Link in die Zwischenablage kopiert",

  "Search": "Suche",
  "Search {siteTitle}": "Suche {siteTitle}",
  "Type to Search": "Tippe um zu suchen",

  "Paid": "Bezahlt",
  "Members": "Mitglieder",
  "Public": "Öffentlichkeit",

  "Account": "Konto",
  "Log in": "Einloggen",
  "Subscribe": "Abonnieren",
  "Your email address": "Deine E-Mail-Adresse",
  "Please check your inbox and click the link to complete the login.": "Bitte überprüfen Sie Ihren Posteingang und klicken Sie auf den Link, um die Anmeldung abzuschließen.",
  "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.",

  "Already have an account?": "Hast du schon ein Konto?",
  "Don't have an account yet?": "Sie haben noch keinen Account?",

  "This page is for paying subscribers only": "Diese Seite ist nur für zahlende Abonnenten",
  "This page is for subscribers only": "Dieser Seite ist nur für Abonnenten",
  "This page is for subscribers on the ": "Diese Seite ist für Abonnenten der ",
  "Upgrade your account": "Aktualisieren Sie Ihr Konto"
}

Each line consists of a left key ("Loade More") and a right value ("Mehr Artikel").

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 or other parts of the website like Comments and Search labels. It is also not possible to translate the newsletter emails your subscribers receive. These are core Ghost components and not part of the theme layer; we can’t control them.

I suggest reaching out to the Ghost team ( support@ghost.org ); so they might work on this issue or have a workaround.

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 is.


Syntax Highlighting

You can add a fenced code block by placing triple backticks ``` before and after the code block. For example:

```
pre {
  background-color: #f4f4f4;
  max-width: 100%;
  overflow: auto;
}
```

This will produce the following gray look:

Hue Ghost Theme Syntax Highlighting

To highlight a code block, add the language alias like css or js to the code block. For example, the CSS code in the previous example will wrap between ```css and ``` as follows:

```css
pre {
  background-color: #f4f4f4;
  max-width: 100%;
  overflow: auto;
}
```

This will produce the following colored look:

Hue Ghost Theme Syntax Highlighting with prismjs

To add inline code, wrap the text between two backticks ` `.

Prism

The theme ships with Prism.js, a lightweight, robust, and elegant syntax highlighter.

The initial Prism package includes some languages, like Markup, CSS, C-like, and JavaScript.

You can add support for more languages by adding the Prism autoloader script, which will automatically load the languages you need. T do this, add the following script to the website admin Code Injection (Site Footer).

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.28.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha512-fTl/qcO1VgvKtOMApX2PdZzkziyr2stM65GYPLGuYMnuMm1z2JLJG6XVU7C/mR+E7xBUqCivykuhlzfqxXBXbg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

Click Save.


Theme Deploy with GitHub Actions

Hue 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.

Hue 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.

<style>
  .c-logo__link {
    color: #4550E5;
    font-size: 32px;
  }
</style>

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

Check out How to use Code Injection Ghost guide for more information.



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


AMP

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.


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:

gulp

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/compiled/inline-css.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
v14.17.0

$ npm -v
7.16.0

$ bower -v
1.8.12

$ 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.


Theme Update

You may wonder 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. Code Injection is very helpful for adding custom CSS and tracking codes. Keeping your custom CSS code with Code Injection is always recommended.


Have any questions? Contact Ahmad