Skip to content

osmdik/daiblog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

daiblog

Technical note by Daiki Oshima - A minimal and modern blog built with Astro

πŸš€ Overview

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

✨ Features

  • πŸ“ 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

πŸ› οΈ Tech Stack

Core Framework

Styling & UI

Astro Integrations

Additional Libraries

πŸ—οΈ Project Structure

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

πŸš€ Getting Started

Prerequisites

  • Node.js 22.17.1 (LTS) or higher
  • npm package manager

Installation

  1. Clone the repository

    git clone https://github.com/osmdik/daiblog.git
    cd daiblog
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser

    Visit http://localhost:4321

Available Scripts

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 commands

πŸ“ Content Management

Writing Blog Posts

Blog 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...

Content Schema

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

Adding Images

Place images in the public/images/ directory and reference them in your markdown:

![Alt text](/images/your-image.jpg)

🎨 Styling & Theming

Dark Mode

The site supports system preference detection and manual toggle:

  • Uses TailwindCSS class strategy
  • Implemented via ThemeIcon component
  • Persists user preference in localStorage

Customization

  • Colors: Modify tailwind.config.mjs
  • Typography: Configured via @tailwindcss/typography
  • Fonts: Josefin Sans loaded via @fontsource

πŸ“¦ Deployment

Vercel (Recommended)

This site is optimized for Vercel deployment:

  1. Connect repository to Vercel
  2. Set build command: npm run build
  3. Set output directory: dist
  4. Deploy automatically on git push

Manual Deployment

npm run build
# Upload contents of `dist/` to your hosting provider

πŸ”§ Development

Code Quality

  • TypeScript for type safety
  • Conventional Commits for consistent git history
  • ESLint and Prettier ready (add if needed)

Commit Message Format

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.

πŸ“Š Analytics & Performance

  • Google Analytics integration via Partytown
  • Lighthouse optimized for performance
  • SEO friendly with sitemap and meta tags
  • RSS feed available at /rss.xml

πŸ‘¨β€πŸ’» Author

Daiki Oshima - Software Engineer


Built with ❀️ using Astro, TailwindCSS, and modern web technologies

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors