A modern, fully static blog built with pure HTML, CSS, and JavaScript. Features inline styling that matches the visual theme of my main portfolio website, with markdown-based blog posts and client-side rendering.
π Live Demo: https://sahooshuvranshu.github.io/blog/
- π¨ Discord-Inspired Theme - Matching the main portfolio design
- π± Fully Responsive - Works on all devices
- π Markdown Posts - Write posts in Markdown with frontmatter
- β‘ Client-Side Rendering - Uses marked.js for fast markdown parsing
- π GitHub Pages Ready - Deploy instantly to GitHub Pages
- πΎ No Backend Required - Pure static HTML/CSS/JS
- π― Zero Dependencies - Only CDN for marked.js library
- πΌοΈ Beautiful Cards - Post preview cards with metadata
- π SEO Friendly - Proper meta tags and semantic HTML
blog/
βββ index.html # Blog homepage with post listings
βββ post.html # Individual post viewer
βββ posts/ # Markdown blog posts directory
β βββ welcome-to-my-blog.md
β βββ building-modern-web-applications.md
β βββ my-journey-as-developer.md
βββ README.md # This file
git clone https://github.com/SahooShuvranshu/blog.git
cd blog- Create a new repository named
blog - Push this code to the repository
- Go to Settings β Pages
- Set source to
mainbranch - Your blog will be live at
https://yourusername.github.io/blog/
Simply open index.html in your browser, or use a local server:
# Python 3
python -m http.server 8000
# Python 2
python -m SimpleHTTPServer 8000
# Node.js (if you have http-server installed)
npx http-serverVisit http://localhost:8000
- Create a new
.mdfile in theposts/directory - Add frontmatter with metadata
- Write your content in Markdown
- Update the post list in
index.html
Every post must start with YAML frontmatter:
---
title: Your Post Title
date: 2026-01-04
description: A short description of your post
slug: your-post-slug
---
# Your Content Here
Write your blog post content in Markdown...---
title: Getting Started with React
date: 2026-01-05
description: Learn the basics of React and build your first component
slug: getting-started-with-react
---
# Getting Started with React
React is a popular JavaScript library...
## Installation
```bash
npm install reactfunction Hello() {
return <h1>Hello World!</h1>;
}And more content...
### Adding Posts to the Homepage
Edit `index.html` and update the `posts` array:
```javascript
const posts = [
{
title: "Your New Post Title",
date: "2026-01-05",
description: "Post description here",
slug: "your-post-slug"
},
// ... existing posts
];
The blog uses a Discord-inspired color scheme. Main colors in CSS:
/* Background colors */
--bg-primary: #36393f;
--bg-secondary: #2f3136;
--bg-tertiary: #202225;
/* Text colors */
--text-primary: #ffffff;
--text-secondary: #dcddde;
--text-muted: #72767d;
/* Accent colors */
--accent-primary: #5865f2;
--accent-success: #3ba55c;
--accent-warning: #faa61a;
/* Border colors */
--border-primary: #40444b;
--border-dark: #18191c;Update links to your portfolio and social media:
In index.html and post.html:
<!-- Back button -->
<a href="https://sahooshuvranshu.github.io" class="back-btn">
<!-- Footer links -->
<a href="https://github.com/YourUsername" target="_blank">GitHub</a>
<a href="https://yourwebsite.com">Portfolio</a>Replace "Shuvranshu Sekhar Sahoo" with your name in:
index.html- footer sectionpost.html- footer and author metadata
The blog supports full Markdown syntax using marked.js:
# H1 Header
## H2 Header
### H3 Header**bold text**
*italic text*
~~strikethrough~~- Unordered item 1
- Unordered item 2
1. Ordered item 1
2. Ordered item 2Inline `code` here
```javascript
// Code block
function hello() {
console.log("Hello!");
}
### Links & Images
```markdown
[Link text](https://example.com)

> This is a blockquote| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |- Use descriptive titles - Clear and engaging
- Write good descriptions - They appear in post previews
- Use meaningful slugs - lowercase-with-hyphens
- Include dates - Keep posts chronologically organized
- Add code examples - When relevant
- Use headers - Structure your content well
- Proofread - Check spelling and grammar
- Use lowercase for file names
- Use hyphens instead of spaces:
my-post.md - Match slug in frontmatter:
slug: my-post
To include images in posts:
- Create an
images/directory - Add your images there
- Reference in markdown:

- marked.js (via CDN) - Markdown parsing
<script src="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js"></script>-
Homepage (
index.html):- Displays a list of blog posts as cards
- Post metadata is stored in a JavaScript array
- Clicking a card navigates to
post.html?slug=post-name
-
Post Page (
post.html):- Reads slug from URL query parameter
- Fetches the corresponding
.mdfile from/posts/ - Parses frontmatter for metadata
- Converts markdown to HTML using marked.js
- Displays the rendered content
-
Markdown Files:
- Stored in
/posts/directory - Start with YAML frontmatter
- Content written in Markdown syntax
- Parsed on the client side
- Stored in
- Create a new repository named
blog - Push this code:
git init git add . git commit -m "Initial blog setup" git branch -M main git remote add origin https://github.com/YourUsername/blog.git git push -u origin main
- Enable GitHub Pages in repository settings
- Your blog is live at
https://yourusername.github.io/blog/
- Connect your GitHub repository
- Build command: (leave empty)
- Publish directory:
/ - Deploy!
- Import your repository
- Framework preset: Other
- Build command: (leave empty)
- Output directory:
./ - Deploy!
- Check that
.mdfiles are in theposts/directory - Verify slug in URL matches filename
- Check browser console for errors
- Ensure marked.js CDN is accessible
- Clear browser cache
- Check for inline style conflicts
- Verify all CSS is in
<style>tags
- For GitHub Pages, use relative paths
- Check that post files exist
- Verify correct base path in links
This project is open source and available under the MIT License.
Feel free to fork this project and customize it for your own blog!
Suggestions and improvements are welcome:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a pull request
Shuvranshu Sekhar Sahoo
- Portfolio: sahooshuvranshu.github.io
- GitHub: @SahooShuvranshu
- Blog: sahooshuvranshu.github.io/blog
- Design inspired by Discord's UI
- Markdown parsing by marked.js
- Background texture from Pinterest
- Navigate to the
posts/directory - Create a new file:
your-post-name.md
File naming rules:
- Use lowercase letters
- Use hyphens instead of spaces
- Example:
my-awesome-post.md
At the top of your file, add frontmatter with metadata:
---
title: Your Post Title
date: 2026-01-04
description: A short description (50-150 characters)
slug: your-post-name
---Important:
slugmust match your filename (without.md)dateformat: YYYY-MM-DDdescriptionappears in the post preview card
Write your blog post content using Markdown syntax:
# Main Heading
Your introduction paragraph...
## Section Heading
Content here...
### Subsection
More content...Open index.html and add your post to the posts array:
const posts = [
{
title: "Your New Post Title",
date: "2026-01-04",
description: "Your post description",
slug: "your-post-name"
},
// ... existing posts below
];Important:
- Add new posts at the TOP of the array (newest first)
- Make sure the slug matches your filename
python -m http.server 8000Then visit: http://localhost:8000
git add .
git commit -m "Add new post: Your Post Title"
git push origin mainYour post will be live on GitHub Pages within a few minutes!
Before publishing:
- Frontmatter is complete and correct
- Slug matches filename
- Post is added to posts array in index.html
- Content is proofread
- Code examples work (if any)
- Links are valid
- Post displays correctly locally
Create file posts/my-first-post.md:
---
title: My First Post
date: 2026-01-04
description: This is my very first blog post!
slug: my-first-post
---
# My First Post
Welcome to my first blog post!
## What I'll Write About
I plan to write about:
- Web development
- My coding journey
- Helpful tutorials
Stay tuned for more!Update index.html:
const posts = [
{
title: "My First Post",
date: "2026-01-04",
description: "This is my very first blog post!",
slug: "my-first-post"
},
// ... other posts
];Done! π
- Write engaging titles - Make people want to read
- Use clear structure - Headers, paragraphs, lists
- Add code examples - When teaching concepts
- Include visuals - Images, diagrams when helpful
- Proofread - Check spelling and grammar
- Keep it focused - One topic per post
- Be yourself - Write in your own voice
Copy this template when creating new posts:
---
title: Your Post Title Here
date: 2026-01-04
description: A brief description of what this post is about (appears in the post card preview)
slug: your-post-slug
---
# Main Title
Introduction paragraph goes here. Hook your readers with an engaging opening.
## Section 1
Your content here...
### Subsection
More detailed content...
## Section 2
### Code Examples
You can include code blocks:
```javascript
function example() {
console.log("Hello, World!");
}def example():
print("Hello, World!")Unordered lists:
- Item 1
- Item 2
- Item 3
Ordered lists:
- First item
- Second item
- Third item
This is a blockquote. Use it for emphasis or to quote someone.
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
Wrap up your post with a conclusion...
Optional closing remark or call to action
Happy coding! β¨
---
**Made with π and β by Shuvranshu Sekhar Sahoo**
*Happy blogging! β¨*
