113 lines
2.9 KiB
Markdown
113 lines
2.9 KiB
Markdown
# Markdown Blog
|
|
|
|
[](https://nextjs.org/)
|
|
[](https://tailwindcss.com/)
|
|
[](https://www.typescriptlang.org/)
|
|
[](https://www.electronjs.org/)
|
|
[](LICENSE)
|
|
|
|
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
|
|
|
|
- ✍️ **Markdown-based posts** — Write and organize content in Markdown files
|
|
- ⚡ **Hot reloading** — See changes instantly as you edit posts
|
|
- 🗂️ **Folder & tag organization** — Structure your content with folders and tags
|
|
- 🖥️ **Electron desktop app** — Run your blog as a native desktop app
|
|
- 📱 **Responsive UI** — Mobile-friendly and clean design
|
|
- 🛠️ **Admin dashboard** — Manage posts and folders visually
|
|
|
|
---
|
|
|
|
## 🚀 Getting Started
|
|
|
|
### Prerequisites
|
|
|
|
- [Node.js 18+](https://nodejs.org/)
|
|
- [npm](https://www.npmjs.com/)
|
|
|
|
### Installation
|
|
|
|
```bash
|
|
git clone
|
|
cd markdownblog
|
|
npm install
|
|
```
|
|
|
|
### Development
|
|
|
|
- **Web:**
|
|
`npm run dev`
|
|
- **Desktop (Electron):**
|
|
`npm run electron-dev`
|
|
|
|
### Production
|
|
|
|
- **Web build:**
|
|
`npm run build`
|
|
- **Desktop build:**
|
|
`npm run electron-build`
|
|
|
|
---
|
|
|
|
## 📝 Writing Posts
|
|
|
|
Add Markdown files to the `posts/` directory. 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...
|
|
```
|
|
|
|
---
|
|
|
|
## 🗂️ Project Structure
|
|
|
|
```
|
|
markdownblog/
|
|
├── posts/ # Markdown blog posts
|
|
├── src/
|
|
│ ├── app/ # Next.js app directory
|
|
│ └── lib/ # Utility functions
|
|
├── electron/ # Desktop app code
|
|
├── public/ # Static assets (favicons, etc.)
|
|
└── ...
|
|
```
|
|
|
|
---
|
|
|
|
## 🌐 Favicon
|
|
|
|
Place your favicon files (e.g., `favicon.ico`, `favicon-32x32.png`, `favicon-16x16.png`) in the `public` directory at the project root.
|
|
Next.js will automatically serve these at the root URL (e.g., `/favicon.ico`).
|
|
|
|
---
|
|
|
|
## 🛠️ Technologies Used
|
|
|
|
- [Next.js 14](https://nextjs.org/)
|
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
- [Tailwind CSS](https://tailwindcss.com/)
|
|
- [Electron](https://www.electronjs.org/)
|
|
- [Remark](https://remark.js.org/) (Markdown)
|
|
- [date-fns](https://date-fns.org/)
|
|
|
|
---
|
|
|
|
## 🐳 Docker
|
|
|
|
A sample `Dockerfile` and `manage_container.sh` are included for containerized deployment.
|
|
|
|
---
|
|
|
|
## 📄 License
|
|
|
|
MIT |