Centered Post Layout in Krabi

Ahmad Ajmi Photo
Ahmad Ajmi

Recently, I got a few requests about centering the Krabi theme post layout and removing the sidebar, so I decided to share how to do this with the following two steps.

Krabi Post centered
  1. Duplicate the default.hbs file and give it another name, for example, default-post.hbs. Then, remove lines 17 to 19.
  2. In the post.hbs file, change the first line to {{!< default-post}}.

That’s all you need to do, and the post will be centered automatically.


If you want to add a wide and full-width style to images, you can add the following CSS code to the Ghost admin Code Injection (Site Header) section.

<style>
  .kg-width-full {
    width: auto;
  }

  @media (min-width: 40em) {
    .kg-width-full .kg-image {
      max-width: 100vw;
      pointer-events: none;
    }
  }

  @media (min-width: 64em) {
    .kg-width-wide {
      width: 100vw;
      max-width: 1140px;
      padding-left: 40px;
      padding-right: 40px;
    }
  }
</style>
Post Content Center

Subscribe to Aspire Themes

You will receive Ghost resources, new themes, and updates.


Write more
Save time & money

Ghost themes that are simple to use and easily customizable. Choose a theme for your blog, newsletter, podcast, portfolio, or news website.

Choose your theme →
  • Ghost 5.0 Support
  • Free Support & Updates
  • 100% Money Back Guarantee