portfolio-xs
Version:
This is a tool to generate portfolio based with your markdown file
182 lines (117 loc) โข 3.42 kB
Markdown
# ๐งฐ Portfolio Generator
Generate a beautiful and customizable portfolio site from Markdown files โ fast, flexible, and fully static.
## ๐ฆ Installation
Download this package:
```bash
npm install portfolio-xs -g
```
## โจ Features
- Write each project in its own folder using simple `Markdown`
- Auto-generate a stylish React-based portfolio site
- Live preview locally
- One-click deploy to GitHub Pages or any static host
## ๐ Usage Guide
### 1. Initialize a New Project
Create a new project folder under `doc/` with starter content:
```bash
portfolio init
```
This creates:
```
my-project/
|โโ about.md # editable content
โโโ doc
```
### 2. Add your project
Add your new project under the doc fold:
```bash
portfolio add 'The name of your project'
```
### 3. Customize the Markdown
Open `my-project/doc` and update the frontmatter and content:
```markdown
title: My Project
description: A short summary here
category: Web
createDate: 2024-06-10
updateDate: 2024-06-12
### 4. Generate html file based on the markdown file
```bash
portfolio generate
```
### 5. Preview your generated portfolio
```bash
portfolio preview
```
# My Project
## Overview
A detailed write-up here...
## Features
- Clean interface
- Responsive layout
```
You can also place an `index.png` as the **cover image** for the project.
### 3. Add an About Section
To customize the "About" section in the sidebar, create a about.md file in the lib/ folder:
```bash
lib/about.md
```
Write your personal introduction in plain Markdown:
```markdown
# ๐ Hello!
I'm Bowen, a developer passionate about building beautiful and functional software.
- ๐ญ Iโm currently working on ski video AI analysis
- ๐ฑ Iโm exploring advanced motion estimation and pose modeling
- ๐ซ Reach me at: taobowen.dev@gmail.com
```
This file will be converted into a React component and automatically injected into the sidebar of the layout.
โ
You can even use raw HTML or <script>/<meta> tags in about.md for redirect or custom logic if needed.
### 4. Update Global Settings
Edit `lib/setting.json` to update:
- Website title
- Favicon
- Other metadata
```json
{
"title": "Bowen's Portfolio",
"favicon": "./lib/assets/favicon.png"
}
```
### 5. Generate the Site
Compile the markdown content and metadata into a static site:
```bash
npm run generate
```
### 6. Preview Locally
Launch a local dev server to view and test:
```bash
npm run preview
```
Visit: http://localhost:3000
### 7. Build for Deployment
Compile final static assets using Webpack:
```bash
npm run build
```
### 8. Deploy to GitHub Pages
You can push the contents of the `dist/` folder to your GitHub Pages repository:
```bash
cp -r dist/* ../taobowen.github.io/
cd ../taobowen.github.io/
git add .
git commit -m "Deploy portfolio"
git push origin main
```
## ๐งช Available Commands
| Command | Description |
|--------------------|---------------------------------------------|
| `npm run init` | Create a new markdown project |
| `npm run generate` | Convert markdown into React components and Build static files for deployment |
| `npm run preview` | Start local development server |
## ๐จโ๐ป Author
**ๆขๅฎถๆฒณ็ๆ้บฆ้**
GitHub: [@taobowen](https://github.com/taobowen)
## ๐ License
ISC ยฉ 2025 Bowen Tao