Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Preferred.AI Blog Development",
"image": "mcr.microsoft.com/devcontainers/typescript-node:22",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"yzhang.markdown-all-in-one",
"DavidAnson.vscode-markdownlint",
"bierner.markdown-preview-github-styles"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true,
"typescript.preferences.importModuleSpecifier": "relative"
}
}
},
"forwardPorts": [3000],
"portsAttributes": {
"3000": {
"label": "Next.js Dev Server",
"onAutoForward": "openPreview"
}
},
"postCreateCommand": "corepack enable && pnpm install",
"postStartCommand": "echo '✅ Ready! Run: pnpm dev to start the development server'",
"remoteUser": "node"
}
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"yzhang.markdown-all-in-one",
"DavidAnson.vscode-markdownlint",
"bierner.markdown-preview-github-styles"
]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
41 changes: 41 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Install Dependencies",
"type": "shell",
"command": "pnpm install",
"problemMatcher": [],
"group": "build"
},
{
"label": "Start Dev Server",
"type": "shell",
"command": "pnpm dev",
"problemMatcher": [],
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
}
},
{
"label": "Build for Production",
"type": "shell",
"command": "pnpm build",
"problemMatcher": [],
"group": "build"
},
{
"label": "Lint",
"type": "shell",
"command": "pnpm lint",
"problemMatcher": ["$eslint-stylish"],
"group": "test"
}
]
}
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

## Quick Start (Development)

### Option 1: GitHub Codespaces (No Local Setup!)

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/PreferredAI/PreferredAI.github.io)

1. Click the button above (or go to repo → **Code** → **Codespaces** → **Create codespace on main**)
2. Wait ~2-3 minutes for the environment to set up
3. Run the dev server:
```bash
pnpm dev
```
4. A preview window will automatically open
5. Edit files in `content/posts/` and see live changes!
6. Commit and push when done

> **Free Tier Limits:**
> - **GitHub Free:** 120 core-hours/month (~60 hrs on 2-core machine)
> - **GitHub Pro:** 180 core-hours/month (~90 hrs on 2-core machine)
> - Auto-stops after 30 min idle (just close the tab when done!)
> - Check usage: [github.com/settings/billing](https://github.com/settings/billing)

### Option 2: Local Development

```bash
pnpm install
pnpm dev
Expand All @@ -11,7 +33,15 @@ Visit [http://localhost:3000](http://localhost:3000)

## Creating a Blog Post

### Via GitHub Web Interface (No Installation Required):
### Via GitHub Codespaces (Cloud IDE - Preview Available)

1. Open the project in Codespaces (see above)
2. Create a new file in `content/posts/` named `your-post-title.md`
3. Copy content from `.github/BLOG_POST_TEMPLATE.md`
4. Edit your post and preview live at port 3000
5. Commit and push

### Via GitHub Web Interface (No Installation Required - No Preview)

1. Copy content from `.github/BLOG_POST_TEMPLATE.md`
2. Go to `content/posts/` on GitHub
Expand All @@ -34,7 +64,7 @@ Visit [http://localhost:3000](http://localhost:3000)
6. Write your content in Markdown. Upload images to `public/uploads/YYYY/MM/` first if needed.
7. Commit to a **new branch** and create a **Pull Request**

### Interactive Local Setup (Requires Installation):
### Local Development (Requires Installation Locally - Preview Available)
1. Ensure you have [Node.js](https://nodejs.org/) and [pnpm](https://pnpm.io/) installed.
2. Clone the repository:
```bash
Expand Down