A personal blogging platform built with modern web technologies.
Live at: stevewanglog.com
This is a full-stack blog application with features for publishing, commenting, and subscribing. It uses a Node.js backend and React frontend, with SQLite for data storage.
Design inspired by Lil'Log
- Post publishing with markdown support
- Tagging system
- Comments
- Email subscriptions
- Archive view
- Responsive design
.
├── README.md
├── backend # Node.js Express backend
├── blog-posts # Markdown posts
├── db # Database files and migrations
├── docker # Docker configuration files
├── docker-compose.yml
├── frontend # React frontend application
├── node_modules
├── package.json
├── packages # Shared code packages
├── scripts # Utility scripts
└── tsconfig.base.json
- Node.js
- React
- SQLite
- Docker
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/yourusername/my-blog.git
cd my-blog- Install dependencies
npm install- Start the backend server
npm run dev:back- Start the frontend server
npm run dev:frontPosts are written in Markdown and stored in the blog-posts directory. To publish a new post:
- Create a markdown file in the
blog-postsdirectory - Add frontmatter with title, slug, summary, and tags
- Run the publish script:
node scripts/publish-post.js your-post-file.mdThe application can be deployed using Docker:
docker-compose up -dThis project includes a GitHub Actions workflow that automatically deploys changes when you push to the main branch.
To use the deployment workflow, add the following secrets to your GitHub repository:
- Go to your GitHub repository → Settings → Secrets and Variables → Actions
- Add the following secrets:
SERVER_HOST: Your server's IP address or domain nameSERVER_USERNAME: SSH username for your serverSERVER_SSH_KEY: Your private SSH key that has access to the server
When you push changes to the main branch, the workflow will:
- Connect to your server via SSH
- Pull the latest code from GitHub
- Stop the current Docker containers
- Rebuild the Docker images
- Start up the containers again
You may need to update the server path in the .github/workflows/deploy.yml file to match your actual deployment path on the server.
- Set up RSS
- Implement markdown content table
- Implement image support for blog posts
- Create email notification
- Add bot detection
- Set up backup system
- Add dark mode support
This project is licensed under the MIT License - see the LICENSE file for details.