A super quick and simple GitHub Pages blog built with Vite + React, featuring dark mode and markdown support.
- 🌙 Dark Mode: Beautiful GitHub-inspired dark theme
- 📝 Markdown Support: Write posts in markdown format
- ⚙️ Configurable: Centralized configuration for all text and settings
- 🔄 Auto-sorting: Posts sorted by number in filename (descending)
- ⚡ Fast: Built with Vite for lightning-fast development
- 🚀 GitHub Pages Ready: Deploy easily with GitHub Actions
- 🔗 Hash Routing: Works perfectly with GitHub Pages
- ✏️ GitHub Integration: Edit posts and create new ones directly on GitHub
- 📤 Social Sharing: Share posts on X (Twitter) with one click
-
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Build for production:
npm run build
- Create a new markdown file in
src/posts/ - Name it with a number prefix:
004-my-new-post.md - Higher numbers appear first in the list
- Posts are automatically discovered and imported - no manual updates needed!
- Click the "New Post" button at the bottom of the home page
- This opens GitHub's file creation interface with a pre-filled filename
- The filename is automatically numbered (e.g.,
004-new-post.md) based on existing posts - Write your post in markdown format
- Commit the changes - GitHub handles the rest!
- Click the "Edit on GitHub" button on any blog post page
- Make your changes directly on GitHub
- GitHub handles authentication and permissions
- Perfect for quick fixes and updates
# My Blog Post Title
Your content here...
## Subheading
More content with **bold** and _italic_ text.
```javascript
// Code blocks are supported
console.log("Hello, World!");
```Blockquotes work too!
- Lists
- Are
- Supported
The repo includes a GitHub Actions workflow that automatically deploys to GitHub Pages when you push to the main branch.
You can also deploy manually:
npm run build
npm run deploy- Go to your repository settings
- Navigate to "Pages" section
- Set source to "GitHub Actions"
- The site will be available at
https://yourusername.github.io/blog/
blog/
├── public/
│ └── favicon.svg # Site favicon
├── src/
│ ├── posts/ # Markdown blog posts
│ │ ├── 001-first-post.md
│ │ ├── 002-second-post.md
│ │ └── 003-third-post.md
│ ├── components/
│ │ ├── BlogList.jsx # Post listing page
│ │ └── BlogPost.jsx # Individual post viewer
│ ├── App.jsx # Main app component
│ ├── main.jsx # React entry point
│ ├── config.js # Centralized configuration
│ ├── utils.js # Utility functions
│ └── index.css # Dark theme styles
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions deployment
├── CONFIG.md # Configuration guide
├── package.json
├── vite.config.js
└── index.html
Saint Blog now uses a centralized configuration system! All text, settings, and customization options are located in src/config.js.
- Open
src/config.js - Update these essential settings:
site: { title: "Your Blog Name", description: "Your blog description", tagline: "Your subtitle", author: "Your Name", url: "https://yourusername.github.io/blog/" }
- Save and restart your dev server
See CONFIG.md for complete documentation on all available options including:
- UI text and messages
- SEO and meta tags
- Theme settings
- Social media links
- Feature toggles
Edit src/index.css to customize the dark theme colors and layout.
The configuration system allows you to customize:
- Loading messages and error text
- Post excerpt length
- SEO keywords and meta tags
- Social media integration
- Future feature toggles
If your repository name is different, update the base in vite.config.js:
export default defineConfig({
plugins: [react()],
base: "/YourRepoName/",
// ...
});- React 18 - UI framework
- Vite - Build tool and dev server
- React Router - Hash-based routing
- React Markdown - Markdown rendering
- GitHub Actions - Automatic deployment
- GitHub Pages - Free hosting
MIT License - feel free to use this for your own blog!
Happy blogging! 🚀