Skip to content

Commit b12d1bf

Browse files
committed
docs: add comprehensive webdocs documentation
- Add getting-started, concepts, guides, recipes, and reference sections - Update site configuration and branding - Remove placeholder examples from core package
1 parent a41cbd1 commit b12d1bf

Some content is hidden

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

74 files changed

+6070
-151
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: oven-sh/setup-bun@v1
14+
- uses: oven-sh/setup-bun@v2
1515
with:
16-
bun-version: latest
16+
bun-version-file: package.json
1717

1818
- name: Install dependencies
1919
run: bun install --frozen-lockfile

.github/workflows/codeql.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
uses: actions/checkout@v4
2121

2222
- name: Setup Bun
23-
uses: oven-sh/setup-bun@v1
23+
uses: oven-sh/setup-bun@v2
2424
with:
25-
bun-version: latest
25+
bun-version-file: package.json
2626

2727
- name: Install dependencies
2828
run: bun install --frozen-lockfile

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const { token } = await response.json();
5858
t-req/
5959
├── apps/
6060
│ └── webdocs/ # Documentation site
61+
├── examples/ # Usage examples
6162
├── packages/
6263
│ └── core/ # @t-req/core - HTTP parsing & execution
6364
├── .changeset/ # Changesets for versioning

apps/webdocs/astro.config.mjs

Lines changed: 79 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,84 @@
11
// @ts-check
2-
import { defineConfig } from 'astro/config';
3-
import starlight from '@astrojs/starlight';
2+
import { defineConfig } from "astro/config";
3+
import starlight from "@astrojs/starlight";
4+
import tailwindcss from "@tailwindcss/vite";
45

56
// https://astro.build/config
67
export default defineConfig({
7-
integrations: [
8-
starlight({
9-
title: 'My Docs',
10-
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/withastro/starlight' }],
11-
sidebar: [
12-
{
13-
label: 'Guides',
14-
items: [
15-
// Each item here is one entry in the navigation menu.
16-
{ label: 'Example Guide', slug: 'guides/example' },
17-
],
18-
},
19-
{
20-
label: 'Reference',
21-
autogenerate: { directory: 'reference' },
22-
},
23-
],
24-
}),
25-
],
8+
vite: {
9+
plugins: [tailwindcss()],
10+
},
11+
integrations: [
12+
starlight({
13+
title: "@t-req/core",
14+
components: {
15+
ThemeProvider: "./src/components/ForceLightTheme.astro",
16+
ThemeSelect: "./src/components/ThemeSelect.astro",
17+
},
18+
social: [
19+
{
20+
icon: "github",
21+
label: "GitHub",
22+
href: "https://github.com/tensorix-labs/t-req/tree/main/packages/core",
23+
},
24+
],
25+
customCss: ["./src/styles/global.css", "./src/styles/custom.css"],
26+
sidebar: [
27+
{
28+
label: "Getting Started",
29+
items: [
30+
{ label: "Introduction", slug: "getting-started/introduction" },
31+
{ label: "Installation", slug: "getting-started/installation" },
32+
{ label: "Quick Start", slug: "getting-started/quick-start" },
33+
],
34+
},
35+
{
36+
label: "Core Concepts",
37+
items: [
38+
{ label: "Ecosystem", slug: "concepts/ecosystem" },
39+
{ label: ".http File Format", slug: "concepts/http-file-format" },
40+
{ label: "Variables", slug: "concepts/variables" },
41+
{ label: "Request Lifecycle", slug: "concepts/request-lifecycle" },
42+
{ label: "Runtime Adapters", slug: "concepts/runtime-adapters" },
43+
],
44+
},
45+
{
46+
label: "Guides",
47+
items: [
48+
{ label: "Authentication", slug: "guides/authentication" },
49+
{ label: "Cookies", slug: "guides/cookies" },
50+
{ label: "File Uploads", slug: "guides/file-uploads" },
51+
{ label: "Form Data", slug: "guides/form-data" },
52+
{ label: "Testing Workflows", slug: "guides/testing-workflows" },
53+
{ label: "Error Handling", slug: "guides/error-handling" },
54+
{ label: "Tauri Integration", slug: "guides/tauri-integration" },
55+
],
56+
},
57+
{
58+
label: "API Reference",
59+
items: [
60+
{ label: "Client", slug: "reference/client" },
61+
{ label: "Engine", slug: "reference/engine" },
62+
{ label: "Parser", slug: "reference/parser" },
63+
{ label: "Interpolation", slug: "reference/interpolation" },
64+
{ label: "Cookies", slug: "reference/cookies" },
65+
{ label: "Runtime", slug: "reference/runtime" },
66+
{ label: "Config", slug: "reference/config" },
67+
{ label: "Types", slug: "reference/types" },
68+
],
69+
},
70+
{
71+
label: "Recipes",
72+
items: [
73+
{ label: "Retry Logic", slug: "recipes/retry-logic" },
74+
{ label: "Parallel Requests", slug: "recipes/parallel-requests" },
75+
{
76+
label: "E-Commerce Checkout",
77+
slug: "recipes/e-commerce-checkout",
78+
},
79+
],
80+
},
81+
],
82+
}),
83+
],
2684
});

apps/webdocs/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"dependencies": {
1313
"@astrojs/starlight": "^0.37.3",
14+
"@t-req/ui": "workspace:*",
1415
"astro": "^5.6.1",
15-
"sharp": "^0.34.2"
16+
"sharp": "^0.34.2",
17+
"tailwindcss": "^4.1.0",
18+
"@tailwindcss/vite": "^4.1.0"
1619
}
1720
}

apps/webdocs/public/favicon.svg

Lines changed: 3 additions & 1 deletion
Loading
-96.2 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)