Skip to content

Commit 5f45255

Browse files
committed
feat: more work on the docs
1 parent f738d24 commit 5f45255

80 files changed

Lines changed: 2765 additions & 1482 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
validate:
9+
name: Lint, Check, Build
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 15
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6.0.2
16+
17+
- name: Setup Bun
18+
uses: oven-sh/setup-bun@v2.1.2
19+
with:
20+
bun-version: latest
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v6.2.0
24+
with:
25+
node-version: '22'
26+
27+
- name: Cache dependencies
28+
uses: actions/cache@v5.0.3
29+
with:
30+
path: ~/.bun/install/cache
31+
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock', 'bun.lockb') }}
32+
restore-keys: bun-${{ runner.os }}-
33+
34+
- name: Install dependencies
35+
run: bun install --frozen-lockfile
36+
37+
- name: Lint
38+
run: bun run lint
39+
40+
- name: Type check
41+
run: bun run check
42+
43+
- name: Build
44+
run: bun run build
45+
46+
- name: Validate Cloudflare Worker bundle
47+
run: bunx wrangler deploy --dry-run --outdir .wrangler-dry-run

.github/workflows/deploy-workers.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Node.js
3434
uses: actions/setup-node@v6.2.0
3535
with:
36-
node-version: "22"
36+
node-version: '22'
3737

3838
- name: Cache dependencies
3939
uses: actions/cache@v5.0.3
@@ -45,9 +45,18 @@ jobs:
4545
- name: Install dependencies
4646
run: bun install --frozen-lockfile
4747

48+
- name: Lint
49+
run: bun run lint
50+
51+
- name: Type check
52+
run: bun run check
53+
4854
- name: Build
4955
run: bun run build
5056

57+
- name: Validate Cloudflare Worker bundle
58+
run: bunx wrangler deploy --dry-run --outdir .wrangler-dry-run
59+
5160
- name: Deploy to Cloudflare Workers
5261
id: deploy
5362
uses: cloudflare/wrangler-action@v3.14.1

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ nul
2626
# jetbrains setting folder
2727
.idea/
2828

29-
# jampack cache
29+
# legacy jampack cache
3030
.jampack/
31+
.wrangler-dry-run/

.tmp-sidebar-redesign.png

326 KB
Loading

.tmp-sidebar.png

329 KB
Loading

AUDIT_REPORT.md

Lines changed: 656 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,42 @@ bun install
2727

2828
## Available Scripts
2929

30-
| Command | Description |
31-
| ---------------------------- | ------------------------------------------------ |
32-
| `bun dev` | Start the development server |
33-
| `bun run build` | Build for production with optimization |
34-
| `bun run build:raw` | Build for production without optimization |
35-
| `bun run compress:postbuild` | Compress assets in `dist` (`.gz`, `.br`, `.zst`) |
36-
| `bun preview` | Preview the production build locally |
37-
| `bun format` | Format code with Prettier |
38-
| `bun run lint` | Lint code with ESLint |
39-
| `bun run check` | Run Astro type checking |
40-
| `bun run search:index` | Build the Pagefind search index |
30+
| Command | Description |
31+
| ----------------------------------------------------------- | ------------------------------------------------------- |
32+
| `bun dev` | Start the development server |
33+
| `bun run build` | Build for production with Astro + Jampack |
34+
| `bun run build:raw` | Build for production without Jampack optimization |
35+
| `bun run preview` | Preview the production build locally |
36+
| `bun format` | Format code with Prettier |
37+
| `bun run lint` | Lint code with ESLint |
38+
| `bun run check` | Run Astro type checking |
39+
| `bun run search:index` | Build the Pagefind search index |
40+
| `bunx wrangler deploy --dry-run --outdir .wrangler-dry-run` | Validate the Cloudflare Worker bundle without deploying |
41+
42+
## Deployment
43+
44+
The site deploys as a static Astro build served by Cloudflare Workers static assets. The Worker only runs for `/api/*` routes, including the Microsoft ISO helper.
45+
46+
Required Cloudflare setup:
47+
48+
- `CLOUDFLARE_API_TOKEN` GitHub secret with Workers deploy access
49+
- `CLOUDFLARE_ACCOUNT_ID` GitHub secret
50+
- `BROWSER` Browser Rendering binding in `wrangler.jsonc`
51+
- `MS_ISO_LINKS` KV namespace binding in `wrangler.jsonc`
52+
53+
The deploy workflow runs install, lint, Astro check, production build, Wrangler dry-run validation, then `wrangler deploy`.
4154

4255
## Configuration
4356

44-
| File | Purpose |
45-
| ------------------ | ------------------------------------------------- |
46-
| `astro.config.mjs` | Astro settings, site URL, and Pagefind indexing |
47-
| `wrangler.jsonc` | Cloudflare Workers deployment config |
48-
| `globals.css` | Tailwind theme and global styles |
49-
| `eslint.config.js` | ESLint rules for Astro and TypeScript |
50-
| `.editorconfig` | Editor settings for consistent formatting |
51-
| `.gitignore` | Excludes `.jampack/`, build output, and lockfiles |
57+
| File | Purpose |
58+
| ----------------------- | ----------------------------------------------------- |
59+
| `astro.config.mjs` | Astro settings, site URL, and Pagefind indexing |
60+
| `jampack.config.js` | Jampack post-build optimization settings |
61+
| `wrangler.jsonc` | Cloudflare Workers deployment config |
62+
| `src/styles/global.css` | Tailwind theme and global styles |
63+
| `eslint.config.js` | ESLint rules for Astro and TypeScript |
64+
| `.editorconfig` | Editor settings for consistent formatting |
65+
| `.gitignore` | Excludes build output and local development artifacts |
5266

5367
## Project Structure
5468

@@ -66,15 +80,7 @@ Components live in `src/components/` and follow a purpose-based organization:
6680

6781
### Utilities
6882

69-
Utilities in `src/utils/`:
70-
71-
- `navigation.ts` — Routing and navigation
72-
- `locale.ts` — Internationalization
73-
- `navbar.ts` — Navbar interactions
74-
- `sidebar.ts` — Sidebar state
75-
- `scroll-animations.ts` — Animation utilities
76-
77-
Import utilities through `src/utils/index.ts`.
83+
Utilities in `src/utils/` include docs content helpers, navigation helpers, UI initializers, and browser interaction scripts.
7884

7985
### Constants
8086

astro.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ import { defineConfig, fontProviders } from 'astro/config';
77
import path from 'path';
88
import { fileURLToPath } from 'url';
99
import pagefindIntegration from './src/integrations/pagefind';
10+
import rehypeExternalLinks from './src/utils/rehype-external-links.mjs';
1011

1112
export default defineConfig({
1213
site: 'https://atlasos.net',
1314
output: 'static',
1415
trailingSlash: 'always',
1516

17+
// Add redirects here when docs pages are moved or renamed to avoid broken links.
18+
// Example: '/old-path/': '/new-path/'
19+
redirects: {},
20+
1621
fonts: [
1722
{
1823
name: 'Inter',
@@ -64,6 +69,7 @@ export default defineConfig({
6469
icon(),
6570
mdx({
6671
optimize: true,
72+
rehypePlugins: [rehypeExternalLinks],
6773
}),
6874
sitemap({
6975
changefreq: 'weekly',

0 commit comments

Comments
 (0)