Bootstrap 5 is the perfect companion for Jekyll themes. In this article, we’ll explore the most useful Bootstrap components for creating modern, responsive Jekyll sites.
The Bootstrap 5 Advantage
Bootstrap 5 brings several improvements:
- No jQuery dependency: Pure vanilla JavaScript
- Improved grid system: Better responsive utilities
- Enhanced forms: More accessible form controls
- New utility API: Easily customize utilities
- RTL support: Right-to-left language support
Essential Components for Jekyll
Navigation
The Bootstrap navbar is perfect for Jekyll sites:
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="/">zer0-mistakes</a>
<button
class="navbar-toggler"
data-bs-toggle="collapse"
data-bs-target="#nav"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="nav">
<!-- Navigation items -->
</div>
</div>
</nav>
Cards for Content
Cards are versatile containers for blog posts:
<div class="card h-100">
<img src="" class="card-img-top" />
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div>
Responsive Utilities
Bootstrap’s responsive utilities make mobile-first design easy:
d-none d-lg-block- Hide on mobile, show on large screenscol-12 col-md-6 col-lg-4- Responsive column widthstext-center text-md-start- Responsive text alignment
Start building beautiful Jekyll sites with Bootstrap 5 today!