This is a modern, minimalist personal blog platform that turns simple Markdown files into beautiful blog posts. Perfect for developers, writers, or anyone who wants to maintain a clean, professional blog without the complexity of a traditional CMS.
- Clone this repository to your computer
- Open your terminal and navigate to the project directory
- Install the required packages by running:
npm install - Start the blog by running:
npm start - Open your web browser and visit:
http://localhost:3000
This blog platform is built with modern technologies that make it both powerful and easy to use:
- What is it? Node.js is a platform that lets you run JavaScript on your computer (not just in browsers). Express is a framework that makes it easy to create web applications with Node.js.
- How we use it: Our blog uses Express to:
- Handle web requests (when someone visits your blog)
- Serve your blog posts
- Manage routing (directing visitors to the right pages)
Example of how Express works in our code:
const express = require('express');
const app = express();
// When someone visits the homepage
app.get('/', (req, res) => {
res.render('home');
});- What is it? A simple way to write formatted text using plain text. Instead of buttons like in Microsoft Word, you use simple symbols:
# Titlecreates a heading**bold**makes text bold- itemcreates bullet points
- How we use it: Write your blog posts in Markdown files (
.md), and they automatically get converted to beautiful web pages.
Example of Markdown:
# My Blog Post Title
This is a **bold statement** about my blog.
## Key Points:
- First important point
- Second crucial idea- What is it? A template system that lets us create dynamic HTML pages.
- How we use it: We use EJS to:
- Create consistent layouts across your blog
- Show your blog posts in a beautiful format
- Add dynamic content like dates and post lists
Example of EJS in action:
<h1><%= post.title %></h1>
<div class="content">
<%- post.content %>
</div>- What is it? A tool that makes code in your blog posts look pretty with syntax highlighting.
- How we use it: When you include code in your blog posts, it automatically gets colored and formatted to be easily readable.
Example of code that will be highlighted:
def greet(name):
return f"Hello, {name}!"Here's how the project is organized:
my-blog/
├── app.js # The main application file
├── posts/ # Where your blog posts live (Markdown files)
├── public/ # Static files (CSS, images, etc.)
├── views/ # EJS templates for rendering pages
└── package.json # Project configuration and dependencies
- Create a new
.mdfile in thepostsdirectory - Add your content using Markdown
- The blog will automatically update with your new post
Example blog post (posts/hello-world.md):
# My First Blog Post
Welcome to my blog! This is my first post written in Markdown.
## What I'll Write About
- Tech tutorials
- Personal projects
- Interesting discoveries- Syntax Highlighting: Code blocks in your posts are automatically highlighted
- Responsive Design: Your blog looks great on all devices
- Fast Loading: Built for performance
- Easy Customization: Simple to modify and make your own
- Check if Node.js is installed: Run
node --versionin your terminal - Make sure all dependencies are installed: Run
npm install - Check if the server is running: Look for the message "Server running on port 3000"
- Make sure your Markdown files are in the
postsdirectory
This project is licensed under the ISC License - feel free to use it for your own blog!