Centered Post Layout in Krabi
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.

- Duplicate the
default.hbs
file and give it another name, for example,default-post.hbs
. Then, remove lines17
to19
. - 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>
