A modern, self-hosted technical blog built with Next.js, TypeScript, and Docker. Features static site generation, markdown-based content management, and automated deployment.
🔗 Live Site: https://scriptedstuff.dev
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Content: Markdown with MDX support
- Deployment: Docker + Nginx
- Reverse Proxy: nginx-proxy with automatic SSL (Let's Encrypt)
- Hosting: Self-hosted on home server
- 📝 Markdown-based content management
- 🎨 Custom dark theme matching brand colors
- 🔍 Syntax highlighting for code blocks
- 📱 Fully responsive design
- ⚡ Static site generation for optimal performance
- 🔒 Automatic SSL certificate management
- 🐳 Containerized deployment
- 🚢 CI/CD via git hooks
blog-next/
├── app/ # Next.js App Router
│ ├── layout.tsx # Root layout with header/footer
│ ├── page.tsx # Homepage
│ ├── posts/ # Blog post routes
│ └── globals.css # Global styles
├── content/ # Blog posts (Markdown)
│ └── posts/
├── lib/ # Utilities
│ └── posts.ts # Post loading logic
├── public/ # Static assets
│ └── images/
├── Dockerfile # Production build
└── nginx.conf # Nginx configuration
- Node.js 20+
- npm or yarn
# Install dependencies
npm install
# Run development server
npm run devOpen http://localhost:3000 to see your blog.
-
Create a new directory in
content/posts/:mkdir -p content/posts/my-new-post
-
Create
index.mdwith frontmatter:--- title: "My Post Title" date: 2025-11-28 tags: ["nextjs", "typescript"] description: "Brief description" --- Your content here...
-
Add images to the same directory or
public/images/ -
Preview locally with
npm run dev
The deployment script:
- Builds the static Next.js site
- Creates a Docker image with Nginx
- Deploys to production with zero downtime
- Integrates with nginx-proxy for automatic SSL
- nginx-proxy handles incoming requests and SSL termination
- Blog container serves static files via Nginx
- Let's Encrypt certificates auto-renew
- Deployed on home server infrastructure
- Static Site Generation: Optimal performance and SEO
- Markdown-first: Simple content management, version controlled
- Docker: Consistent environments, easy deployment
- Self-hosted: Full control, learning opportunity for infrastructure
Environment variables are set via Docker at runtime:
VIRTUAL_HOST: Domain nameLETSENCRYPT_HOST: SSL certificate domainLETSENCRYPT_EMAIL: SSL renewal notifications
MIT
David Sharrocks
- Website: scriptedstuff.dev
- GitHub: @SharrocksDA
- LinkedIn: Your LinkedIn
Note: This is a personal project showcasing modern web development practices, TypeScript proficiency, and DevOps capabilities.