The official blog of The Linux Club, VIT Chennai, built with Astro and Supabase
- Astro 5 + TypeScript
- Markdown/MDX posts via Content Collections
- Comments and Authentication (Google OAuth) via Supabase
- Node.js
- pnpm
- Clone the repository
cd <folder of your choice on your PC>
git clone https://github.com/lugvitc/lug-blog.git- Install dependencies:
pnpm install-
Create a
.envfile in the project root (see the next section). -
Start the dev server:
pnpm devThen open http://localhost:4321.
PUBLIC_SUPABASE_URLPUBLIC_SUPABASE_ANON_KEY
Example .env:
PUBLIC_SUPABASE_URL="https://YOUR_PROJECT_ID.supabase.co"
PUBLIC_SUPABASE_ANON_KEY="YOUR_ANON_KEY"All commands are run from the project root:
| Command | What it does |
|---|---|
pnpm dev |
Start the dev server |
pnpm build |
Build the production site to dist/ |
pnpm preview |
Preview the production build locally |
pnpm astro ... |
Run Astro CLI commands |
Posts live under src/content/. The folder name becomes the URL slug. If your folder's name is linux-basics the URL for you blog will be https://blog.lugvitc.net/linux-basics. Your blog content must be in index.md or index.mdx files inside your folder. Images referenced in the blog post must be placed in the same folder, including the cover/hero image.
Create a new folder and an index.md inside it:
src/content/my-new-post/index.md
Minimum recommended frontmatter:
---
title: "My New Post"
description: "A small description"
author: "Your Name"
heroImage: "./hero.jpg" # optional
---Example:
src/content/my-new-post/
index.md
hero.jpg
diagram1.png
diagram2.jpg
pnpm devOR
pnpm build
pnpm preview