Nepali Babu Jekyll Theme
A Jekyll-based theme for documentation or blog posting.
A clean and minimal Jekyll theme designed for documentation or blog posting. This guide provides an overview of the theme’s structure, customization options, and usage.
Table of Contents
- Repository
- Theme Structure
- Creating a Post
- Customizing Styles
- Adding JavaScript
- Gallery Management
- Docker setup
- Notes
Repository
The GitHub repository for this theme is available here:
Nepali Babu Jekyll Theme
Theme Structure
The theme is organized into the following directories:
Directory | Purpose |
---|---|
_layouts/ |
Contains wrapper templates. default.html is the main layout file. |
_includes/ |
Holds reusable components included in layouts. |
_posts/ |
Stores blog posts in Markdown format. |
_sass/ |
Contains SCSS files for custom styling. |
assets/ |
Stores compiled CSS, JavaScript, images, and other static files. |
Creating a Post
To create a new post, add a Markdown file in the _posts/
directory with the following naming convention:
YYYY-MM-DD-post-title.md
Example Post
- Create a file:
_posts/2025-03-15-my-first-post.md
- Add the following front matter:
---
layout: post
title: "Our Amazing Contributors"
date: 2025-01-14 16:45:00 +0530
author: "Safal Lama"
categories: contributors
---
Customizing Styles
-
Create a custom SCSS file in the
_sass/
directory.
Example:_sass/style.scss
-
Compile the SCSS file to CSS using:
sass _sass/_rightbar.scss assets/css/rightbar.css
-
Include the compiled CSS file in the
header.html
layout to apply your styles.
Adding JavaScript
To add custom JavaScript:
- Place your JavaScript files in the
assets/scripts/
directory. - Include the script in the
default.html
layout:<script src="/assets/scripts/your-script.js"></script>
For best practices, use relative URLs as shown in the existing scripts in
header.html
.
Gallery Management
The assets/gallery/
directory stores images, logos, and other media.
- Add your files to this directory.
- Update the
gallery.yml
data to customize paths and display options. [no change recommended]
Docker Setup
To build and run the Jekyll site using Docker:
- docker build -t nepalibabu-jekyll .
- docker run -p 4000:6969 nepalibabu-jekyll
Access the site at http://localhost:4000/
.
or u can just open the docker and open vscode, vscode will auto detect out devcontainer and build it for you. start serving after devcontainer is opened in the embedded terminal -> delete and run other if build cache is up there!
Notes
- Install all dependencies from the
Gemfile
. - A clean cheat sheet will be provided in the future for easier public use.
- Feel free to modify, delete, or update the repository to suit your needs.
- Update
_config.yml
according to your preferences.