Skip to content
Blog Templates Bootstrap 5 sasspostcsspugnode.js

Bootstrap 5 Blog Template with Responsive Navbar and Badges - Blog Post

A simple blog post page built with Bootstrap 5, featuring a dark navbar, responsive layout, and category badges. Ideal for quick blog demos.

By StartBootstrap startbootstrap/startbootstrap-blog-post 255 stars

Introduction

Blog Post is a simple starter template that shows a single blog‑post page built with Bootstrap 5. It includes a dark navigation bar, responsive layout, category badges, a placeholder image and a comment card. The project is intended for beginners who want a ready‑made HTML page that can be customized and extended.

What this project offers

  • A ready‑to‑use blog‑post page with modern Bootstrap components.
  • Dark navigation bar and responsive grid that works on all screen sizes.
  • Category badges and a comment card for a realistic blog look.
  • Build system that compiles Pug, SCSS and JavaScript into a ready‑to‑publish dist folder.

Main features

  • Dark navbar – Bootstrap’s navbar-dark bg-dark class.
  • Responsive layout – Uses Bootstrap’s grid system to adapt to mobile, tablet and desktop.
  • Category badges – Styled with Bootstrap badge utilities.
  • Placeholder image – Simple image placeholder that can be replaced.
  • Comment card – Styled card component for showing comments.
  • Live preview – npm start runs Browser‑Sync for automatic reload while editing source files.

Technology stack

  • Bootstrap 5 (v5.2.3) – core CSS framework.
  • Sass – for SCSS source files.
  • PostCSS – for processing compiled CSS.
  • Pug – template language for the HTML source.
  • Node.js & npm – build tooling.
  • Browser‑Sync – development server with live‑reload.

Requirements

  • Node.js installed on your machine.
  • npm (comes with Node.js).

Installation

  1. Download the ZIP file
# Download the prepared archive
curl -L -o bootstrap5-blog-post.zip https://github.com/startbootstrap/startbootstrap-blog-post/archive/refs/heads/master.zip
  1. Extract the archive
unzip bootstrap5-blog-post.zip -d blog-post
cd blog-post/startbootstrap-blog-post-*
  1. Install dependencies
npm install
  1. Build the project
npm run build

The build script runs the following steps:

  • clean – removes the existing dist folder.
  • build:pug – compiles src/pug/*.pug to HTML.
  • build:scss – compiles src/scss/*.scss to CSS.
  • build:scripts – copies JavaScript from src/js.
  • build:assets – copies static assets (e.g., favicon) to dist/assets.

    After the build finishes, the ready‑to‑publish files are in the dist directory, with the main page at dist/index.html.

  1. View the result locally

    Open dist/index.html in any web browser:

open dist/index.html   # macOS
# or
start dist\index.html   # Windows

For a live‑reload development experience, run:

npm start

This launches Browser‑Sync, watches the src folder, rebuilds on changes, and opens the page in your default browser.

Configuration

The project does not require additional configuration files. All build options are defined in the scripts/ folder and invoked through the npm scripts listed in package.json. If you need to change the output paths, edit the corresponding build scripts (build-pug.js, build-scss.js, etc.).

Customizing the project

  • HTML – Edit src/pug/index.pug. After saving, run npm start or npm run build to regenerate dist/index.html.
  • Styles – Modify src/scss/styles.scss. The SCSS is compiled to dist/css/styles.css.
  • JavaScript – Update src/js/scripts.js. The file is copied to dist/js/scripts.js.
  • Assets – Replace files in src/assets (e.g., favicon.ico). They are copied to dist/assets during the build.

Because the template uses standard Bootstrap classes, you can add or remove components by following Bootstrap’s documentation.

Project structure

LICENSE
README.md
package.json
package-lock.json
dist/
  assets/
    favicon.ico
  css/
    styles.css
  js/
    scripts.js
  index.html
src/
  assets/
    favicon.ico
  pug/
    index.pug
  scss/
    styles.scss
  js/
    scripts.js
scripts/
  build-assets.js
  build-pug.js
  build-scripts.js
  build-scss.js
  clean.js
  start.js
  start-debug.js
  …

Tips

  • Run npm start while editing source files to see changes instantly in the browser.
  • Use npm run build:scss or npm run build:pug individually if you only need to recompile one type of file.
  • The dist folder contains only the files needed for deployment; you can upload its contents to any static‑hosting service (GitHub Pages, Netlify, etc.).

License and attribution

The project is released under the MIT License. See the full license file at the original repository: https://github.com/startbootstrap/startbootstrap-blog-post/blob/master/LICENSE.

When using the template, keep the LICENSE file in your distribution and retain the attribution to the original author as required by the MIT license.