Skip to content

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.


In case 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>
akash.at Post Content Center
An example of the method at akash.at

Subscribe to Aspire Themes

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


Write more
Save time & money

Ghost CMS themes for a professional-looking website. Newsletter & membership full support.

Explore themes →
  • Ghost 4 Support
  • Free Support & Updates
  • 100% Money-Back Guarantee