Back to Documentations

Ubud Documentation

Theme version: 1.0.5 — 08 November 2021 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 ubud, you will find the ubud.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 ubud.zip theme file.
  5. Once uploaded, click Activate now to activate Ubud.

Upload the routes.yaml File (⚑ Required)

The routes.yaml is required for the following reasons:

  • Members and subscription flows
  • Homepage content and layout style
  • Blog page
  • Archive page

To upload the file, follow these steps:

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

Or watch the following video for installation.

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.

Homepage 404: Page Not Found

After uploading the routes.yaml file, the homepage will return 404 Page Not Found.

That’s fine. Move on to the next step and set up the Homepage.


Homepage

The homepage will show a list of content sections.

  • Your content and image from a custom Ghost Page
  • Featured posts, if they exist
  • Recent three posts
  • All Posts → link to the blog page
  • Subscription box

Homepage Content

In Ghost admin, create a new Page.

From the Page settings, make sure that the Page URL setting is home.

Ubud Ghost Theme Custom Homepage Setting

Add your content, upload your image, and publish the page.

The page title will not be visible on the website; only the content and the image will be. However, you can name it Home or any preferred name to make it visible from the dashboard.

If you don’t want to upload an image, you can leave it empty, and the theme will only show the page content on the homepage, like the following example.

Ubud Ghost Theme homepage

Now, go to your website homepage, and you will see your content is visible using the theme homepage default layout style.

Watch the following video for the homepage setup.

Homepage Metadata Note

Due to a Ghost limitation not exposing the custom homepage data, the homepage Metadata information will be coming from the admin General and Branding settings.

  • From the General admin settings, you can set up the Title & description.
  • From the Branding admin settings, you can set up the Publication cover. You can upload the same image as the homepage featured image if you already uploaded one.

Metadata is helpful for Search Engine Optimization and sharing your website on social media sites to have a nice-looking preview.


The Twitter card and Facebook card meta settings are helpful if you want to customize the look for these specific sites.


It might take some time from the social media site to fetch the new image and to see the changes; give it some time. You can also use a tool like Twitter Card validator for testing.

Homepage Styles Change Overview - Video

Watch the following short video to overview the available theme homepage styles and how to change them.

Homepage Default Style

The theme file for the home default style is home.hbs if you want to make any changes.

Ubud Home Image Default

Homepage Default Style Image Size

The image size is 540px wide.

When uploading the Featured image, try to upload an image with a double size to look sharp in retina displays. The 540px wide size is the one that is visible on the screen. But behind the scenes, the theme will crop the image to be 1080px wide if the uploaded image is broader than that. Again, I use this method, so the image looks good on retina screens.

Homepage Image Right Style

The theme file for the home image right style is home-image-right.hbs if you want to make any changes.

Ubud Home Image Right

To activate the Image Right style:

  1. Open the routes.yaml theme file
  2. Comment the - home line by adding # in front of it.
  3. Uncomment the - home-image-right right by removing the # in front of it.
  4. Save and Upload the routes.yaml file to your website.

The routes.yaml will look like the following.

routes:
  /membership/: members/membership
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /:
    data: page.home
    template:
      # - home
      - home-image-right
      # - home-image-circle
      # - home-image-center
      # - home-image-wide
      # - home-image-full
  /archive/:
    template: archive

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

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

Homepage Image Right Style Image Size

The image size is 540px wide.

When uploading the Featured image, try to upload an image with a double size to look sharp in retina displays.

The 540px wide size is the one that is visible on the screen. But behind the scenes, the theme will crop the image to be 1080px wide if the uploaded image is broader than that.

Again, I use this method, so the image looks good on retina screens.

Homepage Image Circle Style

The theme file for the home image circle style is home-image-circle.hbs if you want to make any changes.

Ubud Home Image Circle

To activate the Image Circle style:

  1. Open the routes.yaml theme file
  2. Comment the - home line by adding # in front of it.
  3. Uncomment the - home-image-circle right by removing the # in front of it.
  4. Save and Upload the routes.yaml file to your website.

The routes.yaml will look like the following.

routes:
  /membership/: members/membership
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /:
    data: page.home
    template:
      # - home
      # - home-image-right
      - home-image-circle
      # - home-image-center
      # - home-image-wide
      # - home-image-full
  /archive/:
    template: archive

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

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

Homepage Image Circle Style Image Sizes

The image circle style comes with four different image sizes.

  • Default → 96px * 96px
  • Medium → 128px * 128px
  • Large → 192px * 192px
  • xLarge → 256px * 256px

When uploading the Featured image, try to upload an image with a double size to look sharp in retina displays.

The previous sizes are the ones that are visible on the screens. But behind the scenes, the theme is using the actual image size will be.

Again, I use this method, so the image looks good on retina screens.

  • Default → 192px * 192px
  • Medium → 256px * 256px
  • Large → 384px * 384px
  • xLarge → 512px * 512px

The theme and Ghost will do the image crop and generate those sizes when you upload an image. I want to give you an overview of the dimensions.

Ubud Home Image Circle Sizes

To show different image sizes instead of the small and default one. Open the home-image-circle.hbs theme file and replace line 11 with the following medium size line.

{{> home/home-image-ricle--medium }}

For the large size, use the following line.

{{> home/home-image-ricle--large }}

For the xLarge size, use the following line.

{{> home/home-image-ricle--xLarge }}

You can also watch the following short video for how to change the circle image size.

Homepage Image Center Style

The theme file for the home image center style is home-image-center.hbs if you want to make any changes.

Ubud Home Image Center

To activate the Image Center style:

  1. Open the routes.yaml theme file
  2. Comment the - home line by adding # in front of it.
  3. Uncomment the - home-image-center right by removing the # in front of it.
  4. Save and Upload the routes.yaml file to your website.

The routes.yaml will look like the following.

routes:
  /membership/: members/membership
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /:
    data: page.home
    template:
      # - home
      # - home-image-right
      # - home-image-circle
      - home-image-center
      # - home-image-wide
      # - home-image-full
  /archive/:
    template: archive

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

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

Homepage Image Center Style Image Size

The image size is 731px wide.

When uploading the Featured image, try to upload an image with a double size to look sharp in retina displays.

The 731px wide size is the one that is visible on the screen. But behind the scenes, the theme will crop the image to be 1462px wide if the uploaded image is broader than that.

Again, I use this method, so the image looks good on retina screens.

Homepage Image Wide Style

The theme file for the home image center style is home-image-wide.hbs if you want to make any changes.

Ubud Home Image Wide

To activate the Image Center style:

  1. Open the routes.yaml theme file
  2. Comment the - home line by adding # in front of it.
  3. Uncomment the - home-image-wide right by removing the # in front of it.
  4. Save and Upload the routes.yaml file to your website.

The routes.yaml will look like the following.

routes:
  /membership/: members/membership
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /:
    data: page.home
    template:
      # - home
      # - home-image-right
      # - home-image-circle
      # - home-image-center
      - home-image-wide
      # - home-image-full
  /archive/:
    template: archive

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

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

Homepage Image Wide Style Image Size

The image size is 1120px * 630px.

When uploading the Featured image, try to upload an image with a double size to look sharp in retina displays.

The 1120px * 630px size is the one that is visible on the screen. But behind the scenes, the theme will crop the image to be 2240px wide if the uploaded image is larger than that.

Again, I use this method, so the image looks good on retina screens.

Homepage Image Full Style

The theme file for the home image full style is home-image-full.hbs if you want to make any changes.

Ubud Home Image Full

To activate the Image Full style:

  1. Open the routes.yaml theme file
  2. Comment the - home line by adding # in front of it.
  3. Uncomment the - home-image-full right by removing the # in front of it.
  4. Save and Upload the routes.yaml file to your website.

The routes.yaml will look like the following.

routes:
  /membership/: members/membership
  /signup/: members/signup
  /signin/: members/signin
  /account/: members/account
  /:
    data: page.home
    template:
      # - home
      # - home-image-right
      # - home-image-circle
      # - home-image-center
      # - home-image-wide
      - home-image-full
  /archive/:
    template: archive

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

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

Homepage Image Full Style Image Size

The wider the image, the better. An image height of 676px will be perfect.

To control the number of Featured Posts, open the partials/home/featured-posts.hbs theme file using a code editor. Change the limit value from all to whatever number you want to show. For example, to show only three featured posts, use limit='3'.

To control the number of Recent Posts, open the partials/home/recent-posts.hbs theme file. Change the limit value from 3 to whatever number you want to show or to all to show all the posts. For example, limit='all'.

To change the Featured Posts title, open the partials/home/featured-posts.hbs theme file using a code editor and change it in line 10.

To change the Recent Posts title, open the partials/home/recent-posts.hbs theme file and change it in line 10.

Homepage Styles and File Names

Below are the homepage styles and theme file names for a quick overview.

  • Homepage Default Style → home.hbs
  • Homepage Image Right Style → home-image-right.hbs
  • Homepage Image Circle Style → home-image-circle.hbs
  • Homepage Image Center Style → home-image-center.hbs
  • Homepage Image Wide Style → home-image-wide.hbs
  • Homepage Image Full Style → home-page-full.hbs

Homepage Remove the Content Subscribe Form

To remove the Content Subscribe Form from the homepage content area, open the theme file for the homepage style you are using with a code editor. Then, remove the following lines.

{{#unless @member}}
  {{> subscribe-form inputLabel='subscribe-home-intro'}}
{{/unless}}

Homepage Replace the Content Subscribe Form With a Button

You may want to replace the homepage content subscribe form with a button that goes to the subscribe page.

Open the theme file for the homepage style you are using. Remove the current three lines of code for the subscribe form, which will be similar to:

{{#unless @member}}
  {{> subscribe-form inputLabel='subscribe-home-intro'}}
{{/unless}}

With the following line of code.

<a href='/membership/' class='c-btn c-btn--full' style='color:#fff; text-decoration:none;'>Subscribe</a>

The result will be similar to the following example.

Homepage for CompetitionFeed

To remove the Featured Posts section from the homepage, open the theme file for the homepage style you are using with a code editor. Then, remove the {{> home/featured-posts }} line from that file.

Another option is to remove the Feature this post checkbox for each post on your website.

Homepage Remove the Recent Posts Section

To remove the Recent Posts section from the homepage, open the theme file for the homepage style you are using with a code editor. Then, remove the {{> home/recent-posts }} line from that file.

Open the partials/home/recent-posts.hbs theme file and change line 5 to the following.

{{#get 'posts' filter='featured:false' limit='3'}}

To remove the All Posts → link from the homepage, open the theme file for the homepage style you are using with a code editor. Then, remove the {{> home/all-posts-link }} line from that file, the line before the last line.

Homepage Remove the Bottom Subscribe Box

To remove the Subscribe Box link from the homepage, open the theme file for the homepage style you are using with a code editor. Then, remove the {{> subscribe-box }} line from that file, the last line.


Changing Colors

In this section, you will learn about changing the website Accent color and also how to change the theme color scheme with CSS variables and more color schemes examples to use.

Set Accent Color

You can change the theme Accent color from the Ghost admin. Accent color used throughout the theme in buttons, header Membership link text, and content links hover interaction.

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

Ubud demo Accent color is: 5869DA (the dark orange color).

Ghost Accent Color Setting

Changing Colors with CSS Variables

You can use Code Injection to change the other theme colors with CSS Variables.

The theme file assets/sass/settings/colors.scss contains the theme default color variables. They are exactly as the following.

:root {
  --color-text-primary:   #181818;
  --color-text-secondary: #646F82;

  --color-white:   #FFFFFF;
  --color-error:   #CC3C64;
  --color-success: #07815C;
  --color-border:  #ECECEC;
  --color-border-info:     #3366FF;
  --color-border-success:  #52BD95;
  --color-border-warning:  #FFB020;
  --color-border-danger:   #D14343;

  --background-primary:   #FFFFFF;
  --background-secondary: #F6F6F6;
  --background-info:      #F3F6FF;
  --background-success:   #ECFDF5;
  --background-warning:   #FFFAF2;
  --background-danger:    #FDF4F4;

  --background-hero: var(--background-secondary);
}

Watch the following video to overview the color scheme feature and how to use it.

Theme Colors Explained

It might seem complicated if you are not a technical person, but once you change one and get an instant result, you will get and feel it.

You can try the ready-made nine color schemes below.

:root {
  // Primary text is the main text color for site content.
  --color-text-primary: #181818;

  // Secondary text is the color of elements like post date, footer nav, input placeholder, content captions for images and galley, for example, and author information block icons and metadata.
  --color-text-secondary: #687385;

  // White color used for buttons with the brand colors as a background.
  --color-white: #FFFFFF;

  // Color error is used for the error message that comes when something wrong happens while subscribing.
  --color-error: #CC3C64;

  // Color success used for the success message comes when something wrong happens while subscribing.
  --color-success: #07815C;

  // Color border is used for borders separating each post card in the homepage, for example, and used as a color for the form input border.
  --color-border: #ECECEC;

  // Color border info is used for the Note component border
  --color-border-info: #3366FF;

  // Color border success is used for the Note component border
  --color-border-success: #52BD95;

  // Color border warning is used for the Note component border
  --color-border-warning: #FFB020;

  // Color border danger is used for the Note component border
  --color-border-danger: #D14343;

  // Primary background is the website background. Also, used for the subscribe box icon color.
  --background-primary: #FFFFFF;

  // Secondary background used for the homepage content background, subscribe box, subscribe plans, author information block, and comments section.
  --background-secondary: #F6F6F6;

  // Background info danger is used for the Note (info) component background
  --background-info:      #F3F6FF;

  // Background success danger is used for the Note (success) component background
  --background-success:   #ECFDF5;

  // Background warning danger is used for the Note (warning) component background
  --background-warning:   #FFFAF2;

  // Background danger danger is used for the Note (danger) component background
  --background-danger:    #FDF4F4;

  // The hero background will inherit the secondary background from the above `--background-secondary`. I set a specific color variable to it if you want to put a unique color or make it the same as the website background.
  --background-hero: var(--background-secondary);
}

Color Scheme Examples

Below, you can find nine accessible color scheme examples which you can use in two steps.

  1. Evey color scheme has an accent color, set it first then;
  2. Copy and past the scheme code into the Ghost admin Code Injection Site Header section

All the color schemes are accessible colors for better reading and accessibility experience.

➊ Dark

Accent color → DC514D

<style>
  :root {
    --color-text-primary:   #FFFFFF;
    --color-text-secondary: #9BAAC1;

    --color-white:   #FFF;
    --color-error:   #FF6347;
    --color-success: #00CF80;
    --color-border:  #292622;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #000;
    --background-secondary: #241F21;
    --background-info:      #5656A5;
    --background-success:   #2E6953;
    --background-warning:   #725C17;
    --background-danger:    #AE3131;

    --background-hero: var(--background-secondary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Dark

➋ Monza

Accent color → D6001C

<style>
  :root {
    --color-text-primary:   #D6001C;
    --color-text-secondary: #D6001C;

    --color-white:   #FFFFFF;
    --color-error:   #96281B;
    --color-success: #134D13;
    --color-border:  #D6001C;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #FFFFFF;
    --background-secondary: #FFF3CC;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-primary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Monza

➌ Soft Peach

Accent color → 905656

<style>
  :root {
    --color-text-primary:   #241616;
    --color-text-secondary: #412727;

    --color-white:   #FFFFFF;
    --color-error:   #96281B;
    --color-success: #134D13;
    --color-border:  #e9dbdb;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #F6F0F0;
    --background-secondary: #f2e9e9;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-primary);
  }
</style>
Ubud Ghost CMS Theme Color Soft Peach

➍ Cinnamon

Accent color → 805b00

<style>
  :root {
    --color-text-primary:   #000;
    --color-text-secondary: #374c6d;

    --color-white:   #FFFFFF;
    --color-error:   #D91E18;
    --color-success: #205E3B;
    --color-border:  #807D67;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #F4F6EF;
    --background-secondary: #e4e6e0;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-secondary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Cinnamon

➎ Bright Gray

Accent color → 373f48

<style>
  :root {
    --color-text-primary:   #3C434C;
    --color-text-secondary: #647180;

    --color-white:   #FFFFFF;
    --color-error:   #B22222;
    --color-success: #20603C;
    --color-border:  #DFE3E9;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #FFFFFF;
    --background-secondary: #E7EBF0;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-secondary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Bright Gray

➏ Iron

Accent color → 000000

<style>
  :root {
    --color-text-primary:   #212121;
    --color-text-secondary: #404040;

    --color-white:   #FFFFFF;
    --color-error:   #B50000;
    --color-success: #20603C;
    --color-border:  #bdbec2;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #d6d7d9;
    --background-secondary: #f2f2f3;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-secondary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Iron

➐ Linen

Accent color → b95d0e

<style>
  :root {
    --color-text-primary:   #000;
    --color-text-secondary: #374c6d;

    --color-white:   #FFFFFF;
    --color-error:   #923026;
    --color-success: #205E3B;
    --color-border:  #ece3dc;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #FFFFFF;
    --background-secondary: #FCF3ED;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-secondary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Linen

➑ Turbo

Accent color → 000000

<style>
  :root {
    --color-text-primary:   #000000;
    --color-text-secondary: #000000;

    --color-white:   #FFFFFF;
    --color-error:   #5C0819;
    --color-success: #005031;
    --color-border:  #000000;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #FEE900;
    --background-secondary: #fff14a;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-primary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Turbo

➒ Pampas

Accent color → c31118

<style>
  :root {
    --color-text-primary:   #292a2c;
    --color-text-secondary: #65605E;

    --color-white:   #FFFFFF;
    --color-error:   #5C0819;
    --color-success: #005031;
    --color-border:  #b2b2b2;
    --color-border-info:    #3366FF;
    --color-border-success: #52BD95;
    --color-border-warning: #FFB020;
    --color-border-danger:  #D14343;

    --background-primary: #F6F4F2;
    --background-secondary: #eeedeb;
    --background-info:      #F3F6FF;
    --background-success:   #ECFDF5;
    --background-warning:   #FFFAF2;
    --background-danger:    #FDF4F4;

    --background-hero: var(--background-primary);
  }
</style>
Ubud Ghost CMS Theme Color Scheme Pampas

If you have any schemes you would like to share, please let me know :)

Content links have the same color as text and turn to the brand color when you hover over it.

To change the color from text color to the color brand, add the following CSS code into the Ghost admin Code Injection Site Header.

<style>
  .c-content a {
    color: var(--color-brand);
  }
</style>

Color Scheme 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.

Change Color of Specific Elements

If, for example, you want to add a color that’s not in the available theme variables or add another style to a new element, you can create a new variable and give it a name and value.

We can extend the previous example to add a new color for the logo color and assign that variable to the logo HTML element class .c-logo__link.

<style>
  :root {
    --color-logo: blue;
  }

  .c-logo__link {
    color: var(--color-logo);
  }
</style>

The logo will then have a blue color.


Members / Subscriptions

Ubud has different interface elements for membership features.

  • Log in and Membership links in the Header
  • Homepage subscription boxes
  • A post subscription box
  • 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

Ghost 4.0 can no longer disable membership, so the theme can’t listen and hide the membership elements.

However, I made it easy to do this with CSS instead of editing the theme files. Add the following code into the Ghost admin Code Injection Site Header to hide all the elements.

<style>
  .is-membership {
    display: none;
  }
</style>

To remove Log in and * ‘Membership’* links from the Header, open the partials/header.hbs theme file using a code editor, remove lines 20 to 26. This will also remove the Account and Log out links, visible if logged in.

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

Remove Membership Pages From Sitemap

If you want to remove the membership pages from the autogenerated Ghost sitemap, remove the membership, signup, signin, and account lines from the routes.yaml theme file.

Save and Upload the routes.yaml file to your website.

Doing this will remove the pages from the sitemap (sitemap-pages.xml) generated by Ghost. Also helpful if you don’t want Google to index these pages.

Remove ‘Public’, ‘Members’ and ‘Paid’ Labels from Post Card

Open the partials/post-card.hbs file and remove lines 5 to 16.

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

Or, copy and paste the following CSS code into the Ghost admin Code Injection Site Header.

<style>
  .c-post-card__visibility {
    display: none;
  }
</style>

Remove Subscribe Form from the Post Page

To remove the subscribe box on the post page. Open the post.hbs file and remove line 39.

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

Remove Ghost Portal / The Bottom Right Button

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

Remove Ghost Portal

If you want to use the Ghost Portal for the theme header Login and Subscribe links, you can update the links href value to use the Portal Links value.

So, for example, for the header Log in link in the theme partials/header.hbs file, change the href value from {{ @site.url }}/signin/ to #/portal/signin. Change {{ @site.url }}/membership/ to #/portal/signup for the Membership link. You got the point.

You can find all the Portal custom links from the Ghost admin Portal Links section. For more information, please visit Ghost Members documentation.

Change Subscribe Box Text

You can change the subscribe box text from the partial/subscribe-box.hbs theme file. Open the file using a code editor.

Edit Plan Features

To edit the membership plan features, edit the partials/membership-plans.hbs file.

Ubud Ghost Theme Membership Plan Features

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

Add Free Plan Column to Membership Page

To add a free column plan to the Membership page, you can create another column in the theme partials/membership-plans.hbs file by copying one of the current columns code.

Fill in your information like a list of benefits and so on.

For the button, add a link to the {{ @site.url }}/signup/ page so the button like will be like:

<a class='c-btn c-btn--outline' href='{{ @site.url }}/signup/'>Free</a>

Your partials/membership-plans.hbs theme file might end up like this.

<div class='c-membership-plans'>

  <!-- Free Plan Column -->
  <div class='c-membership-plan'>
    <header class='c-membership-plan__header'>
      <h2 class='c-membership-plan__title'>{{t 'Free'}}</h2>
      <span class='c-membership-plan__sign u-type-uppercase'></span>
      <span class='c-membership-plan__amount'></span>
    </header>
    <div class='c-membership-plan__content'>
      <ul class='c-membership-plan__list'>
        <li>Full access to all private posts</li>
        <li>Regular updates with new content</li>
      </ul>
      <a class='c-btn c-btn--outline' href='/signup/'>{{t 'Subscribe'}}</a>
    </div>
  </div>

  <!-- Monthly Plan Column -->
  <div class='c-membership-plan'>
    <header class='c-membership-plan__header'>
      <h2 class='c-membership-plan__title'>{{t 'Monthly'}}</h2>
      <span class='c-membership-plan__sign u-type-uppercase'>{{ price currency=@price.currency }}</span>
      <span class='c-membership-plan__amount'>{{ @price.monthly }}</span>
    </header>
    <div class='c-membership-plan__content'>
      <ul class='c-membership-plan__list'>
        <li>Full access to all private posts</li>
        <li>Regular updates with new content</li>
        <li>Support independent publishing</li>
      </ul>
      <a class='c-btn c-btn--outline' href='javascript:void(0)' data-members-plan='Monthly'>{{t 'Subscribe'}}</a>
    </div>
  </div>

  <!-- Yearly Plan Column -->
  <div class='c-membership-plan'>
    <header class='c-membership-plan__header'>
      <h2 class='c-membership-plan__title'>{{t 'Yearly'}}</h2>
      <span class='c-membership-plan__sign u-type-uppercase'>{{ price currency=@price.currency }}</span>
      <span class='c-membership-plan__amount'>{{ @price.yearly }}</span>
    </header>
    <div class='c-membership-plan__content'>
      <ul class='c-membership-plan__list'>
        <li>Full access to all private posts</li>
        <li>Regular updates with new content</li>
        <li>Support independent publishing</li>
        <li>One easy payment instead of 12!</li>
      </ul>
      <a class='c-btn c-btn--outline' href='javascript:void(0)' data-members-plan='Yearly'>{{t 'Subscribe'}}</a>
    </div>
  </div>

</div>

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

You may want to reduce the column’s padding style so the content will have a breath after adding a third column.

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

<style>
  .c-membership-plan {
    padding: 32px;
  }
</style>

The result will be like this.

Ubud Ghost Theme Membership Plan Features

Embed Subscribe Form in a 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.

<div class='u-bg-gray u-border-radius u-p-32'>
  <form data-members-form="subscribe" class="c-subscribe-form is-membership">
    <div class="c-form-group">
      <label for="subscribe-home-intro" class="u-hidden-visually">Your email address</label>
      <input type="email" name="email" class="c-form-group__input" id="subscribe-home-intro" placeholder="Your email address" required="" data-members-email="">
      <button type="submit" value="Subscribe" class="c-btn c-form-group__btn">Subscribe</button>
    </div>

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

The result.

Subscribe Form Embed

Demo.

If you would like to embed the homepage subscribe form, use the following code.

<section class="c-subscribe">
  <div class="c-subscribe__content">
    <h2 class="c-subscribe__heading u-type-500 u-mb-8">Ubud Newsletter</h2>
    <p class="u-mb-16">Join the newsletter to receive the latest updates in your inbox.</p>
    <form data-members-form="signup" class="c-subscribe-form is-membership ">
      <div class="c-form-group">
        <label for="subscribe-box" class="u-hidden-visually">Your email address</label>
        <input type="email" name="email" class="c-form-group__input" id="subscribe-box" placeholder="Your email address" required="" data-members-email="">
        <button type="submit" value="Subscribe" class="c-btn c-form-group__btn">Subscribe</button>
      </div>
      <div class="c-alert c-alert--success">Please check your inbox and click the link to confirm your subscription.</div>
      <div class="c-alert c-alert--invalid">Please enter a valid email address!</div>
      <div class="c-alert c-alert--error">An error occurred, please try again later.</div>
    </form>
  </div>
  <div class="c-subscribe__icon">
    <svg height="300px" width="300px" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 100 100"><g transform="translate(0,-952.36218)"><path style="text-indent:0;text-transform:none;direction:ltr;block-progression:tb;baseline-shift:baseline;color:#000000;enable-background:accumulate;" d="m 16.999997,973.36216 c -4.4386,0 -7.9999997,3.7333 -7.9999997,8.2188 l 0,41.53124 c 0,4.4854 3.5613997,8.25 7.9999997,8.25 l 66.000006,0 c 4.4386,0 8,-3.7646 8,-8.25 l 0,-41.53124 c 0,-4.4855 -3.5614,-8.2188 -8,-8.2188 l -66.000005,0 z m 0,4 66.000006,0 c 0.5919,0 1.1508,0.1705 1.6562,0.4062 L 52.468798,1008.331 c -1.4774,1.4026 -3.3951,1.4027 -4.875,0 l -32.25,-30.56264 c 0.5054,-0.2357 1.0643,-0.4062 1.6562,-0.4062 z m -3.9375,3.75 22.7813,21.59384 -22.4063,22.375 c -0.2806,-0.5827 -0.4375,-1.2497 -0.4375,-1.9688 l 0,-41.53124 c 0,-0.1624 0.047,-0.3123 0.062,-0.4688 z m 73.875006,0 c 0.016,0.1565 0.062,0.3064 0.062,0.4688 l 0,41.53124 c 0,0.7087 -0.1644,1.3609 -0.4375,1.9375 l -22.343705,-22.375 22.718705,-21.56254 z m -25.625005,24.34384 21.875005,21.9062 c -0.063,0 -0.1241,0 -0.1875,0 l -66.000005,0 c -0.053,0 -0.104,0 -0.1562,0 l 21.9062,-21.875 6.0938,5.75 c 2.9023,2.7512 7.4733,2.7551 10.375,0 l 6.0937,-5.7812 z" fill-opacity="1" stroke="none" visibility="visible" display="inline"></path></g></svg>
  </div>
</section>

The result.

Subscribe Form Embed

Demo.

To save time each time you add a new form, you can create it as a snippet.

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.

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, make sure 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 that is used 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 and using Ghost Pro, please reach out to the Ghost team. If you are using any self-hosting provider, please reach out to 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.


You can add, edit, delete, and reorder 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 as you’d like it appear on your menu in the label field.

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 you’re satisfied with your page configurations, click the Save button.

Like Header Navigation, you can add the footer navigation from the SECONDARY NAVIGATION at section Settings → Navigation page.

Social Media Icons

The theme file for the navigation social media icon links is partials/social-icons.hbs.

Ghost supports adding Facebook and Twitter profile URLs from the admin panel. Go to General > Social accounts and add your URLs, and the theme will automatically add them in the site navigation.

Ghost CMS Social Media Accounts Settings

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-nav__item__icon' data-icon='ei-sc-facebook' data-size='s'></span>

GitHub

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

Instagram

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

LinkedIn

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

Odnoklassniki

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

Pinterest

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

Skype

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

SoundCloud

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

Telegram

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

Tumblr

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

Twitter

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

Vimeo

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

VK

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

Youtube

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

Update Instagram Icon

As mentioned above, Ghosts supports adding only Twitter and Facebook links from the admin. But the theme comes with an additional icon set as mentioned above, which you can use in the theme. I added Instagram as an example.

Edit or update these in the partials/social-icons.hbs file. For example, here’s the Instagram code block:

<li class='c-nav__item c-nav__item--social'>
  <a href='#'>
    <span class='c-nav__item__icon' data-icon='ei-sc-instagram' data-size='s'></span>
    <span class='u-hidden-visually'>Instagram</span>
  </a>
</li>

The code above contains the icon code from the above list and the social media link (a’) within a list element (li`).

Next, replace your Instagram full URL with the link href value. If your Instagram URL is:

https://www.instagram.com/ghost/

Then the new code will be:

<li class='c-nav__item c-nav__item--social'>
  <a href='https://www.instagram.com/ghost/'>
    <span class='c-nav__item__icon' data-icon='ei-sc-instagram' data-size='s'></span>
    <span class='u-hidden-visually'>Instagram</span>
  </a>
</li>

If you want to remove Instagram altogether, you can delete all the code block, the li, `a’, and the icon.

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

Open the partials/footer.hbs theme file using a code editor and add the following code after line 5.

<ul class='c-footer-nav o-plain-list'>
  {{> social-icons }}
</ul>

Next, open the partials/header.hbs theme file and remove line 25 ({{> social-icons }}).

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


Pages

Manage pages for Archive, Blog, and Contact.

Archive Page

The Archive page shows all posts organized by month and also contains all website tags.

The archive page theme file is archive.hbs.

To add the archive item to the site navigation, add it as a navigation item. Make sure to set the destination URL to /archive/ like the following screenshot.

Ubud Ghost Theme Archive Navigation Item
Ubud Archive Page

Blog Page

The blog page includes your recent ten posts with a load more bottom to load more.

You can change the number of posts from the Posts Per Page setting.

The blog page theme file is index.hbs.

To add the blog item to the site navigation, add it as a navigation item. Make sure to set the destination URL to /blog/ like the following screenshot.

Ubud Ghost Theme Blog Navigation Item
Ubud Blog Page

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. Publish the page.
  4. To add the page to the navigation, please check the Navigation section above.
<form action="https://formspree.io/your@email.com" method="POST">
  <input type="text" name="name" placeholder="Name"><br>
  <input type="email" name="_replyto" placeholder="Email"><br>
  <textarea name='message' placeholder="Message"></textarea><br>
  <input class='c-btn c-btn--action' type="submit" value="Send">
</form>

Check out How to Add a Contact Form to Your Ghost Blog for more information.


Languages

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

Theme Translation

Ubud 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:

|____locales
| |____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 looks like this:

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

  "Loading": "Wird geladen",
  "More Posts ↓": "Weitere Artikel ↓",
  "All Posts →": "Alle Artikel →",

  "Recent Posts": "kürzliche Artikel",
  "Featured Posts": "Beliebte Beiträge",
  "Page Not Found": "Seite nicht gefunden",
  "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": "Per E-Mail teilen",
  "Copy link": "Link kopieren",
  "Link copied to clipboard": "Link in die Zwischenablage kopiert",

  "Archive": "Archiv",
  "Tags": "Stichworte",
  "1 min read": "1 minuten gelesen",
  "% min read": "% minuten gelesen",

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

  "Account": "Konto",
  "Log in": "Einloggen",
  "Log out": "Ausloggen",
  "Continue": "Fortsetzen",
  "Subscribe": "Abonnieren",
  "Membership": "Mitgliedschaft",
  "Your email address": "Deine E-Mail-Adresse",
  "{siteTitle} Newsletter": "{siteTitle} Newsletter",
  "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 Content Is for Members": "Dieser Inhalt ist für Mitglieder",
  "This Content Is for Paid Members": "Dieser Inhalt ist für bezahlte Mitglieder",
  "Join the newsletter to receive the latest updates in your inbox.": "Treten Sie dem Newsletter bei, um die neuesten Updates in Ihrem Posteingang zu erhalten",

  "Premium Membership": "Premium Mitgliedschaft",
  "Unlock full access to {siteTitle} and see the entire library of members-only content.": "Schalten Sie den vollständigen Zugriff auf {siteTitle} frei und zeigen Sie die gesamte Bibliothek mit Inhalten nur für Mitglieder an.",
  "Subscribe to {siteTitle}": "Anmelden bei {siteTitle}",
  "Monthly": "Monatlich",
  "Yearly": "Jährlich",

  "Log in to {siteTitle}": "Melden Sie sich bei {siteTitle} an",
  "Send login link": "Anmeldelink senden",

  "Your subscription will expire on": "Ihr Abonnement läuft am ab",
  "Your plan": "Dein Plan",
  "Card": "Karte",
  "Expires": "Läuft ab",
  "Next bill date": "Nächstes Rechnungsdatum",
  "Edit billing info": "ERechnungsinformationen bearbeiten",
  "You have an active {siteTitle} account with access to all posts.": "Sie haben ein aktives {siteTitle} Konto mit Zugriff auf alle Posts.",
  "You are subscribed to free updates from {siteTitle}, but don't have a paid subscription to read all the posts.": "Sie haben kostenlose Updates von {siteTitle} abonniert, haben jedoch kein kostenpflichtiges Abonnement, um alle Beiträge zu lesen."
}

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 ( support@ghost.org ); so they might work on this issue or have a workaround.

RTL

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 10 to {{> compiled/inline-css-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.


Comments

The theme supports comments from Disqus, Commento, and CommentBox.

If you display comments for logged in readers only, they will need to login/register into the comment system again. As you know, Ghost has no comment system, and these are third-party tools that are not integrated with and not part of Ghost.

For questions or issues about the commenting systems here, please contact their authors or check out their documentation.

Disqus

To enable Disqus as a comments system, open the partials/disqus.hbs theme file using a code editor. Replace the aspirethemes-demos value with the disqus_shortname variable to match your Disqus account shortname.

var disqus_shortname = 'aspirethemes-demos';

So, if your Disqus shortname is exampleone, the final code above should be:

var disqus_shortname = 'exampleone';

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

From the theme side, that’s all you need to set up Disqus. If you have any issues with comments not loading, make sure you have registered your website with Disqus (Step 1).

If you still have issues, check the Disqus troubleshooting guide.

Disable Disqus

To disable Disqus comments, open the post.hbs theme file using a code editor and delete the line containing the {{> disqus}} text (line 41).

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

Disable Disqus Recommendations/Ads

Checkout the Disqus Recommendations documentation.

Disable Disqus Recommendations/Ads

Disqus Issues

If you have any issue with Disqus redirecting to any advertising pages, please disabled Tracking and Affiliate Links from your Disqus account.

Check out Keegan Leary’s blog post about this issue at https://keeganleary.com/disqus-is-evil-trash/.

Also, be aware of Disqus trackings. Check out https://supunkavinda.blog/disqus.

So, you might want to use another commenting system.

Thanks for sharing, Keegan!

CommentBox

To enable CommentBox as a comments system, open post.hbs file and replace line 41 replace with {{> commentbox}}.

The next step is to create a CommentBox account. From the dashboard, create a new project by filling your site information. You will then receive a Project ID.

Copy that Project ID, open the partials/commentbox.hbs theme file using a code editor and replace the my-project-id value with it. That’s it.

Commento

To enable Commento as a comments system, open the post.hbs theme file using a code editor and replace line 41 with {{> commento}}.

The next step is to create a Commento account and register your domain with it.


Typography Drop Caps

The theme comes with different styles of typography drop caps. It will apply to the first letter of the first word on 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
Ubud Ghost Theme Typography Dropcap HTML card

There are currently four styles available.

➊ Small Drop Cap

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

The result.

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

Ubud Ghost Theme Typography Dropcap Large

➌ Block/Small Drop Cap

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

The result.

Ubud Ghost Theme Typography Dropcap Block Small

➍ Block/Large Drop Cap

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

The result.

Ubud Ghost Theme Typography Dropcap Block Large

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


Content Notes

Use Content Notes to show content in a different style. Notes are helpful if you want to get your reader’s attention to important information within your article.

Ubud Content Notes

To add a Note section.

  1. Add an HTML card to your Post or Page content editor
  2. In that HTML card, add a <div> </div> HTML element with the Note CSS class. For example, <div class='c-note'> </div>. Check below for the available classes for each style
  3. You can then add an inner HTML element, for example, a paragraph, or a list item. Check below for an example
Ubud Ghost Theme Content Note HTML card

There are currently five styles available.

➊ Default Style

  • CSS class → c-note
  • Example ↓
<div class='c-note'>
  <p>ADD YOUR TEXT HERE</p>
</div>

The result.

Ubud Ghost Theme Content Note Dafault HTML card Style

➋ Info Style

  • CSS class → c-note c-note--info
  • Example ↓
<div class='c-note c-note--info'>
  <p>ADD YOUR TEXT HERE</p>
</div>

The result.

Ubud Ghost Theme Content Note Info HTML card Style

➌ Success Style

  • CSS class → c-note c-note--success
  • Example ↓
<div class='c-note c-note--success'>
  <p>ADD YOUR TEXT HERE</p>
</div>

The result.

Ubud Ghost Theme Content Note Success HTML card Style

➍ Warning Style

  • CSS class → c-note c-note--warning
  • Example ↓
<div class='c-note c-note--warning'>
  <p>ADD YOUR TEXT HERE</p>
</div>

The result.

Ubud Ghost Theme Content Note Warning HTML card Style

➎ Danger Style

  • CSS class → c-note c-note--danger
  • Example ↓
<div class='c-note c-note--danger'>
  <p>ADD YOUR TEXT HERE</p>
</div>

The result.

Ubud Ghost Theme Content Note Warning HTML card Style

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


Table of Contents

Add a table of contents to your posts and pages automatically.

Ubud Table of Contents

Activate

The table of contents block is invisible by default. Go to Settings > Design > Site design > Post to activate it. You have two options:

  1. Show table of contents on all posts
  2. Show table of contents on all pages
Ubud Table of Contents activation

The table of contents section will show the post headings h2 and h3 supported by the Ghost editor. If none of these headings exist in post content, the table of contents section will be hidden.


Posts Per Page

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

"config": {
  "posts_per_page": 10
}

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

Note

This will not apply to the homepage but for the Blog page, Author, and Tag pages. For the homepage, checkout Homepage Number of Featured and Recent Posts.


RSS Feed URL

Since Ubud uses /blog/ URL for posts, you can access the RSS feed at site.com/blog/rss/ instead of site.com/rss/. For example, ubud.aspirethemes.com/blog/rss/.


Google Analytics

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


Update Favicon

You can change the favicon in Ghost from Admin > General > PUBLICATION IDENTITY > Publication icon.

Update Ghost CMS favicon

Responsive Tables

Responsive tables are required and essential for adding tabular content and allowing tables to be scrolled horizontally. You can make any table responsive across all viewports by wrapping a table with .responsive-table, for example:

<div class='responsive-table'>
  <table>
    ...
  </table>
</div>

Social Sharing Icons

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


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:

Ubud 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:

Ubud Ghost Theme Syntax Highlighting with prismjs

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

Prism

Ubud 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. For example, to add support for PHP, get the PHP component script from Prism CDN.

<script src='https://cdnjs.cloudflare.com/ajax/libs/prism/1.13.0/components/prism-php.js'></script>

From the side admin menu, go to Code Injection and add the script to the Site Footer section. Be sure to click Save.

Ubud Ghost Theme Syntax Highlighting Code Injection PHP Prism

Theme Deploy with GitHub Actions

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

Ubud documentation Ghost CMS Theme GitHub Actions

I have written about this at 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 developed by Ghost and works with any Ghost install whether you self-host Ghost or using 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.


Blockquote Styles

Copy the code of any examples below into the Ghost admin Code Injection Site Header, then click Save

➊ Example One

Ubud Ghost Theme Blockquote Example Two
<style>
  .c-content blockquote {
    padding: 64px 40px;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    position: relative;
    font-family: Georgia,serif;
    border-left: 0;
    border: .25px solid var(--color-brand);
  }

  .c-content blockquote:before,
  .c-content blockquote:after {
    position: absolute;
    font-size: 48px;
    color: var(--color-brand);
  }

  .c-content blockquote:before {
    content: '“';
    top: 24px;
    left: 24px;
  }

  .c-content blockquote:after {
    content: '”';
    bottom: 24px;
    right: 24px;
    line-height: 0;
  }
</style>

➋ Example Two

Ubud Ghost Theme Blockquote Example Two
<style>
  .c-content blockquote {
    padding: 24px 0;
    font-size: 24px;
    line-height: 40px;
    border-left: 0;
    border-top: 8px solid var(--color-brand);
    box-shadow: 0 1px 0 0 var(--color-brand);
    -webkit-box-shadow: 0 1px 0 0 var(--color-brand);
  }
</style>

Changing Theme Font

Ubud is using one font, Inter.

The theme loads Inter using Google Fonts in the theme partials/fonts.hbs file. It is then assigned as a CSS Variable and other system fonts as a backup as the following example.

:root {
  --type-sans-serif:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}

To change to any other font, you need to include the font on your theme or use Code Injection Site Header if you are using Google Fonts.

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

<link href='https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap' rel='stylesheet'>

<style>
  :root {
    --type-sans-serif: 'Roboto', sans-serif;
  }
</style>

You might find the following posts helpful as well:


Loading Custom Font

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.

<style>
  @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;
  }
</style>

This should load the fonts. Then you can use the font and do your styling for the body and so on.


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.

<style>
  .c-logo__img {
    max-height: 40px;
  }
</style>

The default value is 40px, 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.


Remove Dates

To remove the dates from the theme homepage and listing pages, add the following CSS code into Ghost admin Code Injection Site Header.

<style>
  .c-post-card__meta {
    display: none;
  }

  .c-post-card {
    grid-template-areas: 'content content content content content content content content content media media media';
  }

  .c-post-card--no-image {
    grid-template-areas: 'content content content content content content content content content content content content';
  }
</style>

To only remove the date and keep the Public, Members and Paid labeles, use the following.

<style>
  .c-post-card__date {
    display: none;
  }
</style>

To remove date from the post page, use the following.

<style>
  .c-post-header__date {
    display: none;
  }
</style>

Show Primary Tag Instead of ‘Public’, ‘Members’ and ‘Paid’ Labels on Post Card

Open the partials/recent-posts.hbs theme file using a code editor and change line 5 to:

{{#get 'posts' limit='3' include='tags'}}

In partials/featured-posts.hbs file, change line 5 to:

{{#get 'posts' filter='featured:true' limit='all' include='tags'}}

In partials/post-card.hbs file, replace lines 13, 14, 15 with:

{{ tags separator=', ' limit='1' }}

If you want to add more tags, change the limit to a higher number.

To make the tag clickable, add the following CSS code into the Ghost admin Code Injection Site Header.

<style>
  .c-post-card__meta {
    z-index: 2;
  }
</style>

Add a related posts section to the article page based on the Ghost related posts algorithm.

Follow the following three steps.

In your theme /partials directory, create a new file and call it related-posts.hbs.

Copy the following code to that new file.

<hr>
{{#get 'posts' limit='3' filter='tags:[{{post.tags}}]+id:-{{post.id}}' as |related-posts|}}
  {{#if related-posts}}
    <div class='o-grid'>
      <div class='o-grid__col o-grid__col--center o-grid__col--9-10-m o-grid__col--2-3-l'>
        <div class='c-title-bar'>
          <h3 class='c-title-bar__title'>{{t 'Related Posts' }}</h3>
          <span class='c-title-bar__divider'></span>
        </div>
      </div>
    </div>

    <div class='o-grid'>
      <div class='o-grid__col o-grid__col--center o-grid__col--9-10-m o-grid__col--2-3-l'>
        {{#foreach related-posts}}
          {{> post-card}}
        {{/foreach}}
      </div>
    </div>
  {{/if}}
{{/get}}

This will show 3 posts. You can change that from the limit attribute.

Open the post.hbs file and the following line at the end of it.

{{> related-posts }}

Note that it is required to be at the end of the post.hbs file outside the {{#post}} {{/post}} helpers.

Adding it inside {{#post}} {{/post}} will not work.


I suggest using the SearchinGhostEasy plugin; it seems to be a good search solution and straightforward to install.

Tips

  • The plugin code for inserting an icon will not work correctly with Ubud; instead, use the following. Thanks Menka.
<script>
  $("ul.c-nav").append('<li class="nav-search"><a href="#searchinghost-easy"><svg width="14px" height="14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.875,493.792L353.089,338.005c32.358-35.927,52.245-83.296,52.245-135.339C405.333,90.917,314.417,0,202.667,0 S0,90.917,0,202.667s90.917,202.667,202.667,202.667c52.043,0,99.411-19.887,135.339-52.245l155.786,155.786 c2.083,2.083,4.813,3.125,7.542,3.125c2.729,0,5.458-1.042,7.542-3.125C513.042,504.708,513.042,497.958,508.875,493.792z M202.667,384c-99.979,0-181.333-81.344-181.333-181.333S102.688,21.333,202.667,21.333S384,102.677,384,202.667 S302.646,384,202.667,384z"/></svg></a></li>');

  new SearchinGhostEasy({
    contentApiKey: '<CONTENT_API_KEY>'
  });
</script>
  • Also, when you replace the CONTENT_API_KEY with your Content API key value, remove the <>. For example, don’t do this.
new SearchinGhostEasy({
  contentApiKey: '<6969d471a04a2be4020f377569>'
});

It should be:

new SearchinGhostEasy({
  contentApiKey: '6969d471a04a2be4020f377569'
});

Cuong Tran is using this plugin on ghostFam with Ubud – I think he might help if you need a custom service to set it up.

If you have any issues or questions with the plugin, please get in touch with the authors.


Make Post Card Featured Image Bigger

The The Nature Gatherer and Just Looking websites use a more prominent image size for the homepage featured image. To do the same, add the following CSS code into the Ghost admin Code Injection Site Header.

<style>
  .c-post-card {
    grid-template-areas: 'meta meta content content content content content media media media media media';
  }
</style>

Add Custom Meta Tags

Some custom pages like Log in, and Subscribe do not have an admin interface to add custom meta tags like a description tag.

In the partials/head.hbs file, add the following under the title meta line.

{{{block 'description'}}}

In the Archive theme page archive.hbs file, add the following.

{{#contentFor 'description'}}<meta name='description' content="DESCRIPTION_HERE">{{/contentFor}}

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

You can do the same – step 2 – in the following theme pages as well.

  • members/membership.hbs
  • members/signin.hbs
  • members/signup.hbs

You can update the footer copyright line information from the theme partials/footer.hbs file.


AMP

The AMP integration in Ghost is enabled by default, but if you prefer not to use the feature then you can turn it off in the settings within Ghost Admin.

Read more about AMP at Google AMP + Ghost

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


Theme Development

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.

Adding your custom code to Code Injection is always recommended 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.

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.

This file is generated from the assets/css/style-min.css file, which was generated by Gulp. It is used as an Internal CSS in the theme partials/head.hbs.

If you are working with Gulp, it’s recommended you avoid editing these files. Instead, do customizations in assets/sass for CSS or in assets/js/app.js JavaScript. This way, you can make sure 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 set up is and which package versions I use, take a look at the following:

$ node -v
v14.16.1

$ npm -v
7.13.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 Big Sur.

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 just like you do with 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 ubud.zip ubud -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 can I update my theme to the latest theme 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.


Your feedback is very welcome ♥

I’m open to your feedback and hear your experience about my themes and work. If you have a few minutes, please send your thoughts through this Google Form.

Thank you for your time!

Support

Have any questions? I’m here to help.

Contact Ahmad
Ahmad Ajmi