Skip to content

Commit 9c8c71b

Browse files
committed
docs config
1 parent 81fd6ce commit 9c8c71b

3 files changed

Lines changed: 49 additions & 23 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
import { defineConfig } from 'vitepress';
22
import typedocSidebar from '../api/typedoc-sidebar.json';
33

4+
const guideSidebar = [
5+
{
6+
text: 'Getting Started',
7+
items: [
8+
{ text: 'Introduction', link: '/guide/' },
9+
{ text: 'Installation', link: '/guide/installation' },
10+
{ text: 'Configuration', link: '/guide/configuration' },
11+
],
12+
},
13+
{
14+
text: 'CLI Reference',
15+
items: [
16+
{ text: 'Overview', link: '/cli/' },
17+
{ text: 'Code Commands', link: '/cli/code' },
18+
{ text: 'Sites Commands', link: '/cli/sites' },
19+
{ text: 'Sandbox Commands', link: '/cli/sandbox' },
20+
{ text: 'MRT Commands', link: '/cli/mrt' },
21+
{ text: 'Logging', link: '/cli/logging' },
22+
],
23+
},
24+
];
25+
426
export default defineConfig({
527
title: 'B2C CLI',
628
description: 'Salesforce Commerce Cloud B2C Command Line Tools',
@@ -28,28 +50,8 @@ export default defineConfig({
2850
},
2951

3052
sidebar: {
31-
'/guide/': [
32-
{
33-
text: 'Getting Started',
34-
items: [
35-
{ text: 'Introduction', link: '/guide/' },
36-
{ text: 'Installation', link: '/guide/installation' },
37-
{ text: 'Configuration', link: '/guide/configuration' },
38-
],
39-
},
40-
],
41-
'/cli/': [
42-
{
43-
text: 'CLI Reference',
44-
items: [
45-
{ text: 'Overview', link: '/cli/' },
46-
{ text: 'Code Commands', link: '/cli/code' },
47-
{ text: 'Sites Commands', link: '/cli/sites' },
48-
{ text: 'Sandbox Commands', link: '/cli/sandbox' },
49-
{ text: 'MRT Commands', link: '/cli/mrt' },
50-
],
51-
},
52-
],
53+
'/guide/': guideSidebar,
54+
'/cli/': guideSidebar,
5355
'/api/': [
5456
{
5557
text: 'API Reference',

docs/api-readme.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# API Reference
2+
3+
The `@salesforce/b2c-tooling` package provides a programmatic API for interacting with Salesforce B2C Commerce instances.
4+
5+
## Installation
6+
7+
```bash
8+
npm install @salesforce/b2c-tooling
9+
```
10+
11+
## Quick Start
12+
13+
```typescript
14+
import { B2CInstance } from '@salesforce/b2c-tooling/instance';
15+
import { OAuthStrategy } from '@salesforce/b2c-tooling/auth';
16+
17+
const instance = new B2CInstance({
18+
hostname: 'your-instance.salesforce.com',
19+
auth: new OAuthStrategy({
20+
clientId: 'your-client-id',
21+
clientSecret: 'your-client-secret',
22+
}),
23+
});
24+
```

typedoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"out": "./docs/api",
1414
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"],
1515
"tsconfig": "./packages/b2c-tooling/tsconfig.json",
16-
"readme": "none",
16+
"readme": "./docs/api-readme.md",
1717
"excludePrivate": true,
1818
"excludeProtected": true,
1919
"excludeInternal": true,

0 commit comments

Comments
 (0)