Skip to content

Commit 3fcb3b7

Browse files
committed
docs: docs links fix
1 parent fcaf675 commit 3fcb3b7

5 files changed

Lines changed: 78 additions & 95 deletions

File tree

docs/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "StatikAPI",
33
"description": "Build static JSON endpoints from filesystem modules — like Next.js static export, but for APIs.",
44
"version": "0.4.0",
5-
"lastUpdated": "2025-11-08T02:00:00.000Z",
5+
"lastUpdated": "2025-11-09T02:00:00.000Z",
66
"repo": "https://github.com/zonayedpca/statikapi"
77
}

docs/cli/create-statikapi.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ Quickly scaffold a new StatikAPI project with templates and deployment presets.
55
<Tabs group="scaffold">
66
<Tab label="pnpm">
77

8-
```bash
9-
npx create-statikapi my-api
10-
```
8+
```bash
9+
pnpm dlx create-statikapi
10+
```
1111

1212
</Tab>
1313
<Tab label="yarn">
1414

15-
```bash
16-
npx create-statikapi my-api
17-
```
15+
```bash
16+
yarn create statikapi
17+
```
1818

1919
</Tab>
2020
<Tab label="npm">
2121

22-
```bash
23-
npx create-statikapi my-api
24-
```
22+
```bash
23+
npx create-statikapi
24+
```
2525

2626
</Tab>
2727
</Tabs>
2828

2929
You will be prompted for:
3030

31-
- **Template**: `basic`, `dynamic`, or `remote-data`
32-
- **Package manager** and whether to install now
31+
- **Template**: `basic`, `dynamic`, or `remote-data`
32+
- **Package manager** and whether to install now
3333
- Optional ESLint, TS, directories, and deploy presets
3434

3535
> **Note:** The **source** (`src-api/`) and **output** (`api-out/`) directories are defaults. You can **customize** these during scaffolding or later in your [Configuration](../config).
@@ -38,14 +38,14 @@ You will be prompted for:
3838

3939
## Flags
4040

41-
- `--template basic|dynamic|remote-data`
42-
- `--yes, -y` — accept defaults (non‑interactive)
43-
- `--no-install`
44-
- `--no-gitignore`
45-
- `--package-manager pnpm|npm|yarn`
46-
- `--src-dir <dir>` (default `src-api`, configurable)
47-
- `--out-dir <dir>` (default `api-out`, configurable)
48-
- `--deploy cloudflare,netlify,github`
41+
- `--template basic|dynamic|remote-data`
42+
- `--yes, -y` — accept defaults (non‑interactive)
43+
- `--no-install`
44+
- `--no-gitignore`
45+
- `--package-manager pnpm|npm|yarn`
46+
- `--src-dir <dir>` (default `src-api`, configurable)
47+
- `--out-dir <dir>` (default `api-out`, configurable)
48+
- `--deploy cloudflare,netlify,github`
4949
- `--help, -h`
5050

5151
**Examples**
@@ -62,5 +62,5 @@ create-statikapi my-api --src-dir api --out-dir public/api --deploy cloudflare,g
6262

6363
## Exit codes
6464

65-
- `0` success
65+
- `0` success
6666
- non‑zero indicates an error (parsing, user module errors, etc.)

docs/cli/statikapi.mdx

Lines changed: 33 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,105 +8,85 @@ The core CLI provides two commands: **`dev`** and **`build`**.
88

99
Watches your source and serves an interactive UI at `/_ui`.
1010

11-
> **Note:** The default **source dir** is `src-api/` and **output dir** is `api-out/`, both are configurable via your [Configuration](../config). You can also override them via CLI flags `--src` and `--out`.
11+
> **Note:** The default **source dir** is `src-api/` and **output dir** is `api-out/`, both configurable via your [Configuration](../config). You can also override them via CLI flags `--src` and `--out`.
1212
1313
<Tabs group="dev">
1414
<Tab label="pnpm">
1515

16-
```bash
17-
pnpm dev
18-
```
16+
```bash
17+
pnpm dev
18+
```
1919

2020
</Tab>
2121
<Tab label="yarn">
2222

23-
```bash
24-
yarn dev
25-
```
23+
```bash
24+
yarn dev
25+
```
2626

2727
</Tab>
2828
<Tab label="npm">
2929

30-
```bash
31-
npm run dev
32-
```
30+
```bash
31+
npm run dev
32+
```
3333

3434
</Tab>
3535
</Tabs>
3636

3737
**Common flags**
3838

39-
- `--no-ui` — run server without the preview UI
40-
- `--port <number>` — override dev port
41-
- `--src <dir>` — override source dir (defaults to config or `src-api/`, configurable via [Configuration](../config))
42-
- `--out <dir>` — override output dir (defaults to config or `api-out/`, configurable via [Configuration](../config))
39+
- `--no-ui` — run server without the preview UI
40+
- `--port <number>` — override dev port
41+
- `--src <dir>` — override source dir (defaults to config or `src-api/`)
42+
- `--out <dir>` — override output dir (defaults to config or `api-out/`)
4343

4444
---
4545

4646
## `statikapi build`
4747

4848
Builds static JSON into your output directory (default `api-out/`, configurable via [Configuration](../config)).
4949

50+
By default, all JSON files are **minified** — optimized for hosting and CI/CD pipelines.
51+
If you prefer readable output, pass the `--pretty` flag.
52+
5053
<Tabs group="build">
5154
<Tab label="pnpm">
5255

53-
```bash
54-
pnpm build
55-
```
56+
```bash
57+
pnpm build
58+
```
5659

5760
</Tab>
5861
<Tab label="yarn">
5962

60-
```bash
61-
yarn build
62-
```
63+
```bash
64+
yarn build
65+
```
6366

6467
</Tab>
6568
<Tab label="npm">
6669

67-
```bash
68-
npm run build
69-
```
70+
```bash
71+
npm run build
72+
```
7073

7174
</Tab>
7275
</Tabs>
7376

7477
**Useful flags**
7578

76-
- `--pretty` — humanreadable `index.json`
77-
- `--src <dir>` — override source dir (configurable; default `src-api/`)
78-
- `--out <dir>` — override output dir (configurable; default `api-out/`)
79+
- `--pretty`output human-readable JSON
80+
- `--src <dir>` — override source dir (default `src-api/`)
81+
- `--out <dir>` — override output dir (default `api-out/`)
7982
- `--clean` — remove old output before writing
8083

81-
**Script‑only variant** (skip prettifying, ideal for CI):
82-
83-
<Tabs group="build-only">
84-
<Tab label="pnpm">
85-
86-
```bash
87-
pnpm run build:api
88-
```
89-
90-
</Tab>
91-
<Tab label="yarn">
92-
93-
```bash
94-
yarn build:api
95-
```
96-
97-
</Tab>
98-
<Tab label="npm">
99-
100-
```bash
101-
npm run build:api
102-
```
103-
104-
</Tab>
105-
</Tabs>
84+
> 💡 **Ideal for CI/CD:**
85+
> Use `statikapi build` (without `--pretty`) for faster builds and smaller artifacts.
10686
10787
---
10888

10989
## Exit codes
11090

111-
- `0` success
112-
- nonzero indicates an error (parsing, user module errors, etc.)
91+
- `0` — success
92+
- non-zero indicates an error (parsing, user module errors, etc.))

docs/community.mdx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ StatikAPI is developed in a JavaScript monorepo and released under the MIT licen
1212
- Pull requests must pass linting, tests, and basic manual checks before merge.
1313
- Releases are cut from git tags and published via GitHub Actions to npm. The CLI bundles a prebuilt copy of the preview UI during publish.
1414

15-
See: [`./.github/workflows/release.yml`](../.github/workflows/release.yml)
15+
See: [`./.github/workflows/release.yml`](https://github.com/zonayedpca/statikapi/tree/master/.github/workflows/release.yml)
1616

1717
---
1818

@@ -31,8 +31,8 @@ See: [`./.github/workflows/release.yml`](../.github/workflows/release.yml)
3131
└─ scripts, configs, etc.
3232
```
3333

34-
- Node version is pinned via [`.nvmrc`](../.nvmrc) (Node 22).
35-
- Editor and formatting defaults live in [`.editorconfig`](../.editorconfig).
34+
- Node version is pinned via [`.nvmrc`](https://github.com/zonayedpca/statikapi/tree/master/.nvmrc) (Node 22).
35+
- Editor and formatting defaults live in [`.editorconfig`](https://github.com/zonayedpca/statikapi/tree/master/.editorconfig).
3636

3737
---
3838

@@ -41,8 +41,8 @@ See: [`./.github/workflows/release.yml`](../.github/workflows/release.yml)
4141
We welcome bug reports, fixes, features, docs improvements, and examples.
4242

4343
1. **Discuss**: If an issue does not exist, open one first (bug or feature template).
44-
- Bug: [`.github/ISSUE_TEMPLATE/bug_report.md`](../.github/ISSUE_TEMPLATE/bug_report.md)
45-
- Feature: [`.github/ISSUE_TEMPLATE/feature_request.md`](../.github/ISSUE_TEMPLATE/feature_request.md)
44+
- Bug: [`.github/ISSUE_TEMPLATE/bug_report.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/ISSUE_TEMPLATE/bug_report.md)
45+
- Feature: [`.github/ISSUE_TEMPLATE/feature_request.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/ISSUE_TEMPLATE/feature_request.md)
4646
2. **Fork and branch** off `main`. Use a descriptive branch name like `feat/route-aliases`.
4747
3. **Develop locally** (see quickstart below). Keep commits small and focused.
4848
4. **Tests and lint** must pass before opening a PR:
@@ -52,7 +52,7 @@ We welcome bug reports, fixes, features, docs improvements, and examples.
5252
```
5353
5. **Open a PR** using the pull request template. Explain the change and link issues.
5454

55-
Read the full guide: [`CONTRIBUTING.md`](../CONTRIBUTING.md) and the PR template: [`.github/PULL_REQUEST_TEMPLATE.md`](../.github/PULL_REQUEST_TEMPLATE.md).
55+
Read the full guide: [`CONTRIBUTING.md`](https://github.com/zonayedpca/statikapi/tree/master/CONTRIBUTING.md) and the PR template: [`.github/PULL_REQUEST_TEMPLATE.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/PULL_REQUEST_TEMPLATE.md).
5656

5757
---
5858

@@ -66,7 +66,7 @@ type(scope): subject
6666

6767
Common types include: `feat`, `fix`, `perf`, `refactor`, `build`, `ci`, `docs`, `style`, `test`, `chore`, `security`, `deps`, `release`.
6868

69-
See details and examples in [`CONTRIBUTING.md`](../CONTRIBUTING.md#commit-style).
69+
See details and examples in [`CONTRIBUTING.md`](https://github.com/zonayedpca/statikapi/tree/master/CONTRIBUTING.md#commit-style).
7070

7171
---
7272

@@ -103,6 +103,7 @@ pnpm -C example/basic dev
103103
```
104104

105105
Useful scripts:
106+
106107
- `pnpm -w lint` and `pnpm -w format` to keep code style consistent.
107108
- `pnpm -r test` to run tests across packages.
108109
- `pnpm -C packages/ui build` to build the preview UI (the CLI bundles it on publish).
@@ -117,15 +118,16 @@ Useful scripts:
117118
- Security issues should be reported privately (see Security below).
118119

119120
Templates:
120-
- Bug: [`.github/ISSUE_TEMPLATE/bug_report.md`](../.github/ISSUE_TEMPLATE/bug_report.md)
121-
- Feature: [`.github/ISSUE_TEMPLATE/feature_request.md`](../.github/ISSUE_TEMPLATE/feature_request.md)
121+
122+
- Bug: [`.github/ISSUE_TEMPLATE/bug_report.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/ISSUE_TEMPLATE/bug_report.md)
123+
- Feature: [`.github/ISSUE_TEMPLATE/feature_request.md`](https://github.com/zonayedpca/statikapi/tree/master/.github/ISSUE_TEMPLATE/feature_request.md)
122124

123125
---
124126

125127
## Code of Conduct and Security
126128

127-
- Be respectful and constructive. See [`CODE_OF_CONDUCT.md`](../CODE_OF_CONDUCT.md).
128-
- Report vulnerabilities privately as described in [`SECURITY.md`](../SECURITY.md).
129+
- Be respectful and constructive. See [`CODE_OF_CONDUCT.md`](https://github.com/zonayedpca/statikapi/tree/master/CODE_OF_CONDUCT.md).
130+
- Report vulnerabilities privately as described in [`SECURITY.md`](https://github.com/zonayedpca/statikapi/tree/master/SECURITY.md).
129131
- Email: contact@statikapi.com
130132
- Please include environment, version/commit, impact, and steps to reproduce.
131133

docs/getting-started.mdx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,27 @@ This guide shows two flows:
1515
<Tab label="pnpm">
1616

1717
```bash
18-
npx create-statikapi my-api
19-
cd my-api && pnpm dev
18+
pnpm dlx create-statikapi my-api
19+
cd my-api
20+
pnpm dev
2021
```
2122

2223
</Tab>
2324
<Tab label="yarn">
2425

2526
```bash
26-
npx create-statikapi my-api
27-
cd my-api && yarn dev
27+
yarn create statikapi my-api
28+
cd my-api
29+
yarn dev
2830
```
2931

3032
</Tab>
3133
<Tab label="npm">
3234

3335
```bash
3436
npx create-statikapi my-api
35-
cd my-api && npm run dev
37+
cd my-api
38+
npm run dev
3639
```
3740

3841
</Tab>
@@ -88,9 +91,7 @@ mkdir -p src-api && printf "export default { hello: 'world' }\n" > src-api/index
8891
{
8992
"scripts": {
9093
"dev": "statikapi dev",
91-
"build": "statikapi build --pretty",
92-
"dev:headless": "statikapi dev --no-ui",
93-
"build:api": "statikapi build"
94+
"build": "statikapi build"
9495
}
9596
}
9697
```
@@ -126,11 +127,11 @@ npm run dev
126127
## Directory layout
127128

128129
```
129-
src-api/ # your route modules (configurable via [Configuration](./config))
130+
src-api/ # your route modules (configurable via Configuration)
130131
index.js # → /index.json
131132
users/[id].js # → /users/1/index.json, etc (via paths())
132133
docs/[...slug].js # → /docs/a/b/index.json, etc (via paths())
133-
api-out/ # generated JSON (also configurable via [Configuration](./config))
134+
api-out/ # generated JSON (also configurable via Configuration)
134135
```
135136

136137
---

0 commit comments

Comments
 (0)