Bootstrap 5 Blog Template with Featured Posts - Blog Home
A simple Bootstrap 5 starter for a blog homepage, featuring a navbar, header, and multiple post cards.
By StartBootstrap startbootstrap/startbootstrap-blog-home 306 stars
Introduction
Blog Home is a starter template for a blog homepage built with Bootstrap 5. It provides a ready‑made layout that includes a navigation bar, a header, a featured post card, and a responsive grid of blog posts. The project is open source and released under the MIT license.
What this project offers
- A complete HTML page ready to be served from the
distfolder. - Pre‑compiled CSS and JavaScript that use Bootstrap 5.2.3.
- Source files written in Pug, SCSS, and plain JavaScript, allowing you to customize the template before building.
- A simple development workflow with live‑reload support via BrowserSync.
Main features
- Responsive navigation bar (dark theme).
- Header section with a title and tagline.
- Featured post card with image, date, title, excerpt, and “Read more” button.
- Grid of additional post cards that re‑flow on different screen sizes.
- All components use Bootstrap’s grid and utility classes, so they adapt to mobile, tablet, and desktop widths.
Technology stack
- Bootstrap 5 (CSS framework)
- Sass for styling (
src/scss/styles.scss) - PostCSS with Autoprefixer for CSS processing
- Pug for HTML templating (
src/pug/index.pug) - Node.js and npm for the build system
- BrowserSync for live preview during development
Requirements
- Node.js (required to run the build scripts)
- npm (comes with Node.js)
Installation
Follow these steps to get a working copy of the template on your computer.
- Download the ZIP file
# The ZIP is provided at the following path
/download/blog-home-bootstrap5.zip
- Extract the archive
unzip blog-home-bootstrap5.zip -d blog-home
cd blog-home
- Install Node.js dependencies
npm install
- Build the project (this runs the clean step and compiles Pug, SCSS, JavaScript, and assets)
npm run build
- Open the generated page
The build creates a
distfolder. Open the HTML file in a browser:
# On macOS / Linux
open dist/index.html
# On Windows
start dist\index.html
You should see the fully rendered blog homepage.
Optional: Start a live‑reload development server
If you want the browser to refresh automatically while you edit source files, run:
npm start
This command builds the project, starts BrowserSync, and watches the src directory for changes.
Configuration
The template does not require any configuration files to run. All build settings are defined in the package.json scripts and the scripts/ folder. If you need to change the output location, edit the build scripts in scripts/ (advanced).
Customizing the project
- HTML – Edit
src/pug/index.pug. After saving, runnpm run build(ornpm startfor live reload) to regeneratedist/index.html. - Styles – Modify
src/scss/styles.scss. The SCSS is compiled todist/css/styles.css. - JavaScript – Update
src/js/scripts.js. The file is copied todist/js/scripts.js. - Assets – Place images, favicons, or other static files in
src/assets/. They are copied todist/assets/during the build.
Because the project uses standard Bootstrap classes, you can also add or replace 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
js/
scripts.js
pug/
index.pug
scss/
styles.scss
scripts/
build-assets.js
build-pug.js
build-scripts.js
build-scss.js
clean.js
start.js
start-debug.js
... (other helper scripts)
Tips
- Run
npm run cleanbefore a full rebuild if you suspect stale files indist. - Use
npm run start:debugto launch the project with additional debugging output. - The template is fully responsive; test it on different devices by resizing the browser window or using the developer tools’ device mode.
- All external libraries are listed in
package.json; you can upgrade Bootstrap by changing the version there and re‑runningnpm installfollowed bynpm run build.
License and attribution
The project is licensed under the MIT License. See the full license file at the repository: https://github.com/startbootstrap/startbootstrap-blog-home/blob/master/LICENSE.
When using this template, keep the LICENSE file in your distribution and retain the attribution to the original author (Start Bootstrap).
Use this prompt with an AI coding assistant (Claude Code, Cursor, Copilot, ChatGPT and similar).
- Download the ZIP and extract it where your new project will live.
- Download the ZIP and extract it next to your project, so the assistant can read both.
- Fill in the bracketed parts under “About my project”.
- Paste the prompt into your assistant and review each change it proposes.
# Start a new project with Blog Home ## Your task You are a senior frontend engineer. We are building a new project using Blog Home, a starter template built with Bootstrap 5, as the starting point. Keep its design and turn the demo into a clean, real codebase that I can maintain. ## About my project - What I'm building and for whom: [describe it] - Pages I need: [list them] - Stack: [keep it as it is, with its own build, or name one: Vite / Laravel / Next.js / Astro] - Brand: [name, colours, fonts, logo] # Blog Home — project brief ## Source project Blog Home is a starter template that provides a simple blog homepage built with Bootstrap 5. It includes a navbar, header, featured post card and a grid of post cards. Repository: https://github.com/startbootstrap/startbootstrap-blog-home, license MIT (see LICENSE, credit to Start Bootstrap). ## Files that matter - **Entry page:** `dist/index.html` – the main HTML file rendered in the browser. - **Pages:** only one page is shipped (`dist/index.html`). - **Stylesheets:** `dist/css/styles.css` (compiled from `src/scss/styles.scss`). - **Scripts:** `dist/js/scripts.js` (compiled from `src/js/scripts.js`). - **Assets:** `dist/assets/favicon.ico` (copied from `src/assets/favicon.ico`). - **Source templates:** `src/pug/index.pug` (Pug template for the page), `src/scss/styles.scss` (SCSS source), `src/js/scripts.js` (JS source). - **Configuration / build scripts:** all files in the `scripts/` folder (e.g., `scripts/build-pug.js`, `scripts/build-scss.js`, `scripts/build-scripts.js`, `scripts/build-assets.js`, `scripts/clean.js`, `scripts/start.js`, `scripts/start-debug.js`). - **Package definition:** `package.json` (contains npm scripts, dependencies, devDependencies). ## Setup and build The project requires a build step using Node.js and npm. ```bash # Install dependencies npm install # Build the project (creates the `dist` folder) npm run build # Start a live‑preview server that watches source files npm start ``` The `npm run build` command runs the series of scripts defined in `package.json` and outputs the final files to the `dist` directory. `npm start` builds the project then launches a local server (via `scripts/start.js`) with live‑reload. ## How it is put together - **Layout:** `src/pug/index.pug` defines the page structure: a dark navbar, a light header, and a two‑column layout where the left column holds the featured post and a grid of regular posts, and the right column (not shown in the trimmed HTML) would typically contain a sidebar. The same navbar and header markup are reused on every page generated from the Pug template. - **Styling:** All CSS is compiled from `src/scss/styles.scss` into `dist/css/styles.css`. The stylesheet includes Bootstrap 5.2.3 (imported via the compiled SCSS) and any custom styles defined in the SCSS file. - **JavaScript:** `src/js/scripts.js` is copied to `dist/js/scripts.js`. It contains only generic Bootstrap initialization (e.g., dropdowns, collapse) and does not depend on additional libraries. - **Libraries:** The only external library is Bootstrap 5.2.3, listed in `package.json` and bundled into the compiled CSS/JS. No other third‑party scripts are loaded. - **Theme values:** Colours, fonts and spacing are controlled by Bootstrap variables and any overrides in `styles.scss`. There is no built‑in dark‑mode or RTL support. ## Watch out for 1. **Bootstrap version mismatch:** The template uses Bootstrap 5 classes and data attributes (e.g., `data-bs-toggle`). Using Bootstrap 4 or earlier will break components like the navbar toggler. 2. **Global CSS:** `styles.css` is loaded after Bootstrap and may contain selectors that affect the whole page; overriding Bootstrap defaults can cause unexpected layout changes. 3. **CDN vs local assets:** The template references images via external dummy URLs; replace them with your own assets to avoid broken images. 4. **Single entry page:** Only `dist/index.html` is generated; adding new pages requires creating additional Pug files and updating the build scripts. 5. **No dark‑mode or RTL:** The markup and SCSS do not include dark‑mode or right‑to‑left support; adding these will need custom CSS or Bootstrap utilities. ## Verify - [ ] `dist/index.html` loads and displays the navbar, header, featured post and the grid of posts. - [ ] No console errors appear when the page is opened in a browser. - [ ] The navigation toggler works on small screens (Bootstrap collapse). - [ ] Styles from `dist/css/styles.css` are applied and the layout is responsive. - [ ] `dist/js/scripts.js` is loaded and Bootstrap components initialise correctly. - [ ] No duplicate copies of Bootstrap are present in the built files. - [ ] The MIT license file is included and unchanged. - [ ] The build process (`npm run build`) recreates the `dist` folder with the expected files. # How to work ## Step 1 — Get it running as it is Start from the downloaded ZIP or a clone of the repository. Install the dependencies and start the dev server with the exact commands in "Setup and build" above. Confirm it runs without console errors before changing anything. ## Step 2 — Plan the project with me List the pages and sections of Blog Home to keep, rename or remove for my project, the folder structure you propose for my stack, and where the repeated parts will live. Wait for my OK. ## Step 3 — Build it - Keep the pages I need, remove the rest, and replace the sample content with real content. - Extract repeated parts (header, navigation, footer) into shared partials or components. - Put my brand name, colours and fonts where Blog Home defines its theme (see "How it is put together" above), not as one-off overrides. - Keep Bootstrap's markup patterns and class conventions so the design stays consistent, and don't change its major version unless I ask. ## Step 4 — Polish and launch - Remove demo content and every CSS/JS file nothing uses any more; optimise images. - Check phone, tablet and desktop widths, labels, alt text, keyboard focus and colour contrast. - Run the production build and tell me which folder to deploy. - Keep the license file and credit the author of Blog Home. ## Ground rules Work in small steps and show me each change. Use only the libraries already in the project unless I agree to add one.



