https://github.com/codesandtags/blog
πThis is my personal blog and portfolio to connect my code, experiences and learnings with the world. πβ₯οΈ
https://github.com/codesandtags/blog
Last synced: 3 months ago
JSON representation
πThis is my personal blog and portfolio to connect my code, experiences and learnings with the world. πβ₯οΈ
- Host: GitHub
- URL: https://github.com/codesandtags/blog
- Owner: codesandtags
- License: mit
- Created: 2020-04-30T21:51:28.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-12-06T04:27:36.000Z (7 months ago)
- Last Synced: 2025-12-09T21:20:31.890Z (6 months ago)
- Language: Astro
- Homepage: https://codesandtags.github.io/blog/
- Size: 20.3 MB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
git clone https://github.com/codesandtags/blog.git
cd blog
```
2. Install dependencies:
```bash
npm install
```
3. Start the development server:
```bash
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:
```markdown
---
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:
```bash
npm run build
```
The output will be in the `dist/` directory, ready to deploy to GitHub Pages or any static hosting service.
## π¨ Tech Stack
- [Astro](https://astro.build/) - Static site framework
- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework
- [Pagefind](https://pagefind.app/) - Static search library
- [MDX](https://mdxjs.com/) - Markdown with JSX components
- [TypeScript](https://www.typescriptlang.org/) - Type safety
- [GitHub Pages](https://pages.github.com/) - Hosting
## π 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](LICENSE) file for details.