# Markdown Blog A modern, cross-platform blog system built with **Next.js**, **Markdown**, and **Electron**. Write posts in Markdown, manage content visually, and deploy to web or desktop. --- ## 🚀 Features - Write and organize posts in Markdown - Visual admin dashboard - Responsive UI (Tailwind CSS) - Electron desktop app - Dockerized deployment with persistent storage - Secure admin password (bcrypt) --- ## 🛠️ Technologies - Next.js 14 - TypeScript - Tailwind CSS - Electron - Docker --- ## 📦 Project Structure ``` markdownblog/ ├── posts/ # Markdown blog posts ├── src/ # Next.js app code ├── electron/ # Desktop app code ├── public/ # Static assets ├── Dockerfile # Docker configuration ├── .dockerignore # Docker ignore rules └── manage_container.sh # Docker management script ``` --- ## ⚡ Getting Started ### Prerequisites - Node.js 18+ - npm - Docker (for containerized deployment) --- ## 🖥️ Local Development ```bash git clone cd markdownblog npm install npm run dev ``` - Visit [http://localhost:3000](http://localhost:3000) in your browser. ### Build for Production (Local) ```bash npm run build npm start ``` --- ## 🐳 Docker Deployment ### Build the Docker Image ```bash docker build -t markdownblog . ``` ### Run the Container with Persistent Storage ```bash docker run -p 8080:3000 -v markdownblog-posts:/app/docker markdownblog ``` - The app will be available at [http://localhost:8080](http://localhost:8080) - All posts are stored persistently in the Docker volume `markdownblog-posts` (mapped to `/app/docker` in the container). #### Using a Host Directory for Posts ```bash docker run -p 8080:3000 -v /absolute/path/to/posts:/app/docker markdownblog ``` --- ## 📝 Writing Posts - Add Markdown files to the `posts/` directory (or the mounted volume). - Each post should have frontmatter: ```markdown --- title: "Your Post Title" date: "YYYY-MM-DD" tags: ["tag1", "tag2"] summary: "A brief summary of your post" --- Your post content here... ``` --- ## 🔒 Admin Password Security - Admin password is securely hashed with bcrypt and stored in `posts/admin.json`. - Never commit your `posts/admin.json` file. --- ## 📄 License MIT