To install dependencies:
bun installTo start a development server:
npm run devTo build the project for production:
npm run buildTo start the production server:
npm run startTo update blog posts dynamically:
npm run updateThe generate_posts.sh script dynamically generates the src/blog/posts.tsx file by importing all Markdown files in the blog directory. This ensures that new blog posts are automatically included.
The APITester component allows you to test API endpoints directly from the browser. You can select the HTTP method, enter the endpoint, and view the response in real-time.
Run the linter to check for code quality issues:
npm run lintThe project uses Vite for fast builds and includes optimizations such as chunk splitting for vendor libraries.
If you are deploying this project to a subdirectory (e.g., GitHub Pages), make sure to update the base option in vite.config.ts to match your deployment path. For example:
export default defineConfig({
base: '/your-subdirectory/',
// ...existing code...
});Replace /your-subdirectory/ with the actual path where your site will be hosted. For example, I change it to /albertlin.github.io/.