Skip to content

πŸ“This is my personal blog and portfolio to connect my code, experiences and learnings with the world. 🌎β™₯️

License

Notifications You must be signed in to change notification settings

codesandtags/blog

Repository files navigation

Codes and Tags Blog

This is the repository for my personal blog, where I document technical stuff and knowledge that I want to share with the world.

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm (or yarn/pnpm)

Installation

  1. Clone the repository:
git clone https://github.com/codesandtags/blog.git
cd blog
  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev

The blog will be available at http://localhost:4321

πŸ“ Adding a New Post

To add a new post, create a new markdown file in the src/content/blog/ directory. The file name should follow the format YYYY-MM-DD-title.md.

Example post structure:

---
title: "Title of the post"
date: 2024-01-15
author: codesandtags
categories: ["category1", "category2"]
tags: ["tag1", "tag2"]
draft: false
---

Content of your post goes here...

Post Frontmatter

  • title (required): The post title
  • date (required): Publication date (YYYY-MM-DD format)
  • author (optional): Author name (defaults to "codesandtags")
  • categories (optional): Array of category names
  • tags (optional): Array of tag names
  • image (optional): Path to featured image
  • draft (optional): Set to true to hide from production

πŸ› οΈ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production (includes Pagefind search index)
  • npm run preview - Preview production build locally
  • npm run migrate:posts - Run post migration script

πŸ—οΈ Build & Deploy

Build the site:

npm run build

The output will be in the dist/ directory, ready to deploy to GitHub Pages or any static hosting service.

🎨 Tech Stack

πŸ“ Project Structure

blog/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/     # Reusable Astro components
β”‚   β”œβ”€β”€ content/        # Blog posts (Markdown/MDX)
β”‚   β”œβ”€β”€ layouts/        # Page layouts
β”‚   β”œβ”€β”€ pages/          # Route pages
β”‚   └── utils/          # Utility functions
β”œβ”€β”€ public/             # Static assets
└── scripts/            # Migration and utility scripts

πŸ“„ License

See LICENSE file for details.

About

πŸ“This is my personal blog and portfolio to connect my code, experiences and learnings with the world. 🌎β™₯️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •