A personal blog built with Next.js 14, TypeScript, and Tailwind CSS.
Visit: https://www.sauravray.net
- Node.js 18+
- npm, pnpm, or yarn
# Install dependencies
npm install
# or if using pnpm
pnpm install# Standard development mode
npm run dev
# Turbo mode (faster, experimental)
npm run dev:turboYour blog will be available at http://localhost:3000
- Edit files in the
app/directory - Changes will auto-reload in your browser
- Check console for any errors
# Run type checking
npm run type-check
# Run linting
npm run lint
# Run both checks
npm run test# Build for production
npm run build
# Test production build locally
npm run startThe blog is organized into several key directories within the app/ folder:
- /blog: Contains all the long-form blog posts.
- /notes: A space for shorter, more frequent updates, organized by month.
- /til: "Today I Learned" posts for capturing quick insights.
- /components: Reusable React components used throughout the site.
- /lib: Utility functions and helpers, including MDX processing.
The main pages and layout are defined in app/page.tsx and app/layout.tsx.
- Create a new file in
app/blog/posts/ - Add your content in MDX format
- Test locally with
npm run dev
- Create a new file in
app/notes/posts/with format:month_year_discovery_log.mdx - Keep the file open and append color-coded entries as you discover things
- Test locally with
npm run dev
After running npm run dev, visit:
- Homepage:
http://localhost:3000 - Blog list:
http://localhost:3000/blog - Your new article:
http://localhost:3000/blog/modern_web_development_guide - Notes section:
http://localhost:3000/notes - Sample discovery log:
http://localhost:3000/notes/december_2024_discovery_log
Your new comprehensive article includes:
- Table of Contents (TOC):
- Desktop: Hover over the menu icon on the left sidebar
- Mobile: Tap the floating button in the bottom-right corner
- Scrollable content: Long TOCs are fully scrollable with custom scrollbars
- Enhanced Styling: Beautiful quotes, code blocks, and callout boxes
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Mobile-First: Touch-friendly interactions with backdrop dismiss
- Accessibility: Full keyboard navigation and screen reader support
- Edit
app/global.cssfor global styles - Use Tailwind classes for component styling
- Changes will hot-reload automatically
# Clear cache if you encounter issues
npm run clean
# Reinstall dependencies
rm -rf node_modules package-lock.json
npm installThis blog is optimized for deployment on Vercel, but can be deployed anywhere that supports Next.js.
# Production build
npm run build