Skip to content

Commit ddb034a

Browse files
committed
chore: initial site scaffolding
- Astro 5.x with Tailwind CSS 4 setup - Cloudflare Workers deployment configuration - Documentation pages for rnr CLI (getting-started, tasks, commands, configuration, examples) - Homepage with install commands and feature highlights - Features page with comparison table - Running R logo with motion trail effect - OG image for social sharing - Worker script for binary download redirects
0 parents  commit ddb034a

31 files changed

Lines changed: 9214 additions & 0 deletions

.claude/settings.local.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(dir /s /b \"C:\\\\code\\\\personal\\\\CodingWithCalvin\\\\codingwithcalvin.net\")",
5+
"Bash(tree:*)",
6+
"Bash(npm install)",
7+
"Bash(Get-ChildItem -Recurse C:codepersonalCodingWithCalvinrnrcli.iodistdocs)",
8+
"Bash(Select-Object FullName)",
9+
"Bash(magick:*)"
10+
]
11+
}
12+
}

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/**'
9+
- 'public/**'
10+
- 'astro.config.mjs'
11+
- 'package.json'
12+
- 'package-lock.json'
13+
- 'tsconfig.json'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build
32+
run: npm run build

.github/workflows/commit-lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Commit Lint
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check PR title format
15+
uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
types: |
20+
feat
21+
fix
22+
docs
23+
style
24+
refactor
25+
perf
26+
test
27+
build
28+
ci
29+
chore
30+
revert
31+
requireScope: false
32+
subjectPattern: ^[a-z].+$
33+
subjectPatternError: |
34+
The subject "{subject}" found in the pull request title "{title}"
35+
didn't match the configured pattern. Please ensure that the subject
36+
starts with a lowercase letter.

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'src/**'
9+
- 'public/**'
10+
- 'astro.config.mjs'
11+
- 'package.json'
12+
- 'package-lock.json'
13+
- 'tsconfig.json'
14+
workflow_dispatch:
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
deployments: write
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
cache: 'npm'
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build
36+
run: npm run build
37+
38+
- name: Deploy to Cloudflare Pages
39+
uses: cloudflare/wrangler-action@v3
40+
with:
41+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42+
command: deploy

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# dependencies
8+
node_modules/
9+
10+
# logs
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
.env.local
20+
21+
# macOS
22+
.DS_Store
23+
24+
# IDE
25+
.vscode/*
26+
!.vscode/extensions.json
27+
!.vscode/settings.json
28+
.idea/
29+
*.swp
30+
*.swo
31+
32+
# Cloudflare
33+
.wrangler/

CLAUDE.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Critical Rules
6+
7+
These rules override all other instructions:
8+
1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request
9+
2. **Conventional commits** - Format: `type(scope): description`
10+
3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files. Use conventional commit format for issue titles
11+
4. **Pull Request titles** - Use conventional commit format (same as commits)
12+
5. **Branch naming** - Use format: `type/scope/short-description` (e.g., `feat/docs/new-guide`)
13+
6. **Working an issue** - Always create a new branch from an updated main branch
14+
7. **Check branch status before pushing** - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead
15+
8. **No co-authors** - Do not add co-author information on commits or pull requests
16+
9. **No "generated by" statements** - Do not add generated-by statements on pull requests
17+
18+
## Overview
19+
20+
This is the **official documentation website** for [rnr](https://github.com/CodingWithCalvin/rnr.cli), a cross-platform task runner with zero-setup execution. Built with Astro and deployed to Cloudflare Workers/Pages.
21+
22+
## Tech Stack
23+
24+
- **Framework**: Astro 5.x
25+
- **Styling**: Tailwind CSS 4.x with @theme CSS variables
26+
- **Content**: MDX for documentation pages
27+
- **Deployment**: Cloudflare Pages via Wrangler
28+
- **Primary Color**: Purple/Violet (#8B5CF6)
29+
30+
## Build Commands
31+
32+
| Command | Description |
33+
|---------|-------------|
34+
| `npm install` | Install dependencies |
35+
| `npm run dev` | Start development server |
36+
| `npm run build` | Build for production |
37+
| `npm run preview` | Preview production build |
38+
39+
## Directory Structure
40+
41+
```
42+
rnrcli.io/
43+
├── .github/workflows/ # CI/CD workflows
44+
│ ├── build.yml # PR build validation
45+
│ ├── deploy.yml # Production deployment
46+
│ └── commit-lint.yml # PR title validation
47+
├── src/
48+
│ ├── components/ # Reusable UI components
49+
│ │ ├── Header.astro
50+
│ │ ├── Footer.astro
51+
│ │ └── CopyableCommand.astro
52+
│ ├── content/
53+
│ │ └── docs/ # MDX documentation files
54+
│ │ ├── getting-started.mdx
55+
│ │ ├── tasks.mdx
56+
│ │ ├── commands.mdx
57+
│ │ ├── configuration.mdx
58+
│ │ └── examples.mdx
59+
│ ├── layouts/ # Page layouts
60+
│ │ ├── BaseLayout.astro
61+
│ │ └── DocLayout.astro
62+
│ ├── pages/ # Astro pages and routes
63+
│ │ ├── index.astro
64+
│ │ ├── features.astro
65+
│ │ └── docs/[...slug].astro
66+
│ └── styles/ # Global CSS with Tailwind
67+
│ └── global.css
68+
├── public/ # Static assets
69+
│ └── favicon.svg
70+
├── astro.config.mjs # Astro configuration
71+
├── package.json # Dependencies and scripts
72+
├── tsconfig.json # TypeScript configuration
73+
└── wrangler.toml # Cloudflare deployment config
74+
```
75+
76+
## Content Collections
77+
78+
Documentation is managed via Astro Content Collections:
79+
80+
- **Location**: `src/content/docs/`
81+
- **Format**: MDX files
82+
- **Schema fields**:
83+
- `title` (required): Page title
84+
- `description` (required): SEO description
85+
- `order` (optional): Sidebar sort order (default: 999)
86+
- `draft` (optional): Exclude from build (default: false)
87+
88+
### Adding New Documentation
89+
90+
1. Create a new `.mdx` file in `src/content/docs/`
91+
2. Add frontmatter with required fields:
92+
```mdx
93+
---
94+
title: Your Page Title
95+
description: Brief description for SEO
96+
order: 5
97+
---
98+
99+
Your content here...
100+
```
101+
3. The page will automatically appear in the sidebar navigation
102+
103+
### Documentation Pages
104+
105+
| File | Order | Description |
106+
|------|-------|-------------|
107+
| `getting-started.mdx` | 1 | Installation and quick start |
108+
| `tasks.mdx` | 2 | Task definition syntax |
109+
| `commands.mdx` | 3 | CLI command reference |
110+
| `configuration.mdx` | 4 | Config files and structure |
111+
| `examples.mdx` | 5 | Real-world examples |
112+
113+
## Styling Conventions
114+
115+
- Uses Tailwind CSS 4 with `@theme` CSS variables
116+
- Primary color palette: `primary-50` through `primary-950` (purple/violet)
117+
- Dark theme by default with custom background colors
118+
- Component classes defined in `src/styles/global.css`:
119+
- `.btn`, `.btn-primary`, `.btn-secondary`
120+
- `.card`
121+
- `.nav-link`, `.sidebar-link`
122+
- `.prose` for documentation content
123+
- `.gradient-text`, `.gradient-bg`
124+
125+
## CI/CD
126+
127+
- **Build workflow**: Validates PRs by building the site
128+
- **Deploy workflow**: Deploys to Cloudflare on push to main
129+
- **Commit lint**: Validates PR titles follow conventional commit format
130+
131+
### Required Secrets
132+
133+
- `CLOUDFLARE_API_TOKEN`: API token for Cloudflare deployment
134+
135+
## Related Repository
136+
137+
The rnr CLI tool source code is at: https://github.com/CodingWithCalvin/rnr.cli
138+
139+
When updating documentation, ensure it stays in sync with the CLI's actual behavior and features.
140+
141+
## Conventional Commit Types
142+
143+
| Type | Description |
144+
|------|-------------|
145+
| `feat` | New feature |
146+
| `fix` | Bug fix |
147+
| `docs` | Documentation changes |
148+
| `style` | Code style changes |
149+
| `refactor` | Code refactoring |
150+
| `perf` | Performance improvements |
151+
| `test` | Adding or updating tests |
152+
| `build` | Build system changes |
153+
| `ci` | CI/CD changes |
154+
| `chore` | Maintenance tasks |

astro.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineConfig } from 'astro/config';
2+
import mdx from '@astrojs/mdx';
3+
import sitemap from '@astrojs/sitemap';
4+
import tailwindcss from '@tailwindcss/vite';
5+
6+
export default defineConfig({
7+
site: 'https://rnrcli.io',
8+
output: 'static',
9+
vite: {
10+
plugins: [tailwindcss()]
11+
},
12+
integrations: [
13+
mdx(),
14+
sitemap()
15+
],
16+
markdown: {
17+
shikiConfig: {
18+
theme: 'github-dark',
19+
wrap: true
20+
}
21+
},
22+
redirects: {
23+
'/docs': '/docs/getting-started',
24+
'/latest/rnr-linux-amd64': 'https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-linux-amd64',
25+
'/latest/rnr-macos-amd64': 'https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-macos-amd64',
26+
'/latest/rnr-macos-arm64': 'https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-macos-arm64',
27+
'/latest/rnr-windows-amd64.exe': 'https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-windows-amd64.exe',
28+
'/latest/rnr-windows-arm64.exe': 'https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-windows-arm64.exe',
29+
}
30+
});

0 commit comments

Comments
 (0)