Technical note by Daiki Oshima - A minimal and modern blog built with Astro
daiblog is a personal technical blog created by Daiki Oshima, a frontend engineer. This site serves as an accumulation of technical knowledge and outputs, built with modern web technologies for optimal performance and developer experience.
π Live Site: blog.osmdik.com
- π Markdown-based content - Write articles in Markdown with MDX support
- π Dark mode toggle - Seamless theme switching
- π± Responsive design - Mobile-first approach with TailwindCSS
- π·οΈ Tag system - Organize and filter articles by tags
- π Typography - Beautiful reading experience with @tailwindcss/typography
- π SEO optimized - Sitemap, RSS feed, and meta tags
- β‘ Fast performance - Static site generation with Astro
- π¨ Minimal design - Clean and focused user interface
- π Analytics ready - Google Analytics integration via Partytown
- π Social sharing - Built-in social media share buttons
- Astro - Static site generator
- React - Interactive components
- TypeScript - Type safety
- TailwindCSS - Utility-first CSS framework
- @tailwindcss/typography - Beautiful typographic defaults
- @fontsource/josefin-sans - Web font optimization
- @astrojs/react - React component support
- @astrojs/tailwind - TailwindCSS integration
- @astrojs/mdx - MDX support for dynamic content
- @astrojs/sitemap - Automatic sitemap generation
- @astrojs/rss - RSS feed generation
- @astrojs/partytown - Third-party script optimization
- react-share - Social media sharing components
daiblog/
βββ public/ # Static assets
β βββ images/ # Blog post images
β βββ fonts/ # Web fonts
β βββ favicon.ico # Site favicon
βββ src/
β βββ components/ # Reusable Astro/React components
β β βββ BaseHead.astro # HTML head with meta tags
β β βββ Header.astro # Site header with navigation
β β βββ Footer.astro # Site footer
β β βββ ThemeIcon.astro # Dark mode toggle
β β βββ ShareButtons.tsx # Social sharing buttons
β β βββ FormattedDate.astro # Date formatting component
β βββ content/ # Content collections
β β βββ blog/ # Blog post markdown files
β β βββ config.ts # Content schema definition
β βββ layouts/ # Page layouts
β β βββ BaseLayout.astro # Base HTML structure
β β βββ PostLayout.astro # Blog post layout
β βββ pages/ # File-based routing
β β βββ index.astro # Homepage
β β βββ profile.astro # About page
β β βββ rss.xml.js # RSS feed endpoint
β β βββ posts/[...slug].astro # Dynamic blog post pages
β β βββ tags/ # Tag-based filtering
β βββ styles/
β β βββ global.css # Global styles
β βββ consts.ts # Site constants
βββ documents/ # Documentation
β βββ commit-message-rules.md # Conventional Commits guide
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # TailwindCSS configuration
βββ tsconfig.json # TypeScript configuration
βββ CLAUDE.md # Development guidance
βββ package.json # Dependencies and scripts
- Node.js 22.17.1 (LTS) or higher
- npm package manager
-
Clone the repository
git clone https://github.com/osmdik/daiblog.git cd daiblog -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open in browser
Visit http://localhost:4321
npm run dev # Start development server
npm run build # Build for production (with type checking)
npm run preview # Preview production build
npm run astro # Run Astro CLI commandsBlog posts are written in Markdown with frontmatter metadata:
---
title: "Your Post Title"
description: "Brief description of the post"
pubDate: 2025-01-15
updatedDate: 2025-01-16 # Optional
tags: ["JavaScript", "React", "TypeScript"] # Optional
---
Your content here...All blog posts must include:
- title (required) - Post title
- description (required) - SEO description
- pubDate (required) - Publication date
- updatedDate (optional) - Last updated date
- tags (optional) - Array of tag strings
Place images in the public/images/ directory and reference them in your markdown:
The site supports system preference detection and manual toggle:
- Uses TailwindCSS
classstrategy - Implemented via
ThemeIconcomponent - Persists user preference in localStorage
- Colors: Modify
tailwind.config.mjs - Typography: Configured via
@tailwindcss/typography - Fonts: Josefin Sans loaded via
@fontsource
This site is optimized for Vercel deployment:
- Connect repository to Vercel
- Set build command:
npm run build - Set output directory:
dist - Deploy automatically on git push
npm run build
# Upload contents of `dist/` to your hosting provider- TypeScript for type safety
- Conventional Commits for consistent git history
- ESLint and Prettier ready (add if needed)
This project follows Conventional Commits:
feat(blog): add dark mode toggle
fix(posts): resolve tag display issue
docs: update README with new features
See documents/commit-message-rules.md for detailed guidelines.
- Google Analytics integration via Partytown
- Lighthouse optimized for performance
- SEO friendly with sitemap and meta tags
- RSS feed available at
/rss.xml
Daiki Oshima - Software Engineer
- Blog: blog.osmdik.com
- GitHub: @osmdik
Built with β€οΈ using Astro, TailwindCSS, and modern web technologies