Skip to content

Commit

Permalink
update the name of vanilla ui
Browse files Browse the repository at this point in the history
  • Loading branch information
adcentury committed Sep 20, 2023
1 parent 32c7935 commit 1be1eaf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions docs/getting-started/vanilla-js.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Get Started with Native JavaScript

Documate supports native JavaScript pages through the `@documate/ui` package.
Documate supports native JavaScript pages through the `@documate/vanilla` package.

## Initialize Documate

`@documate/ui` will automatically search for DOM elements with the ID `ask-ai` on the page, so you don't need to perform any manual initialization. The only thing you need to do is provide a button with the ID `ask-ai` on the page.
`@documate/vanilla` will automatically search for DOM elements with the ID `ask-ai` on the page, so you don't need to perform any manual initialization. The only thing you need to do is provide a button with the ID `ask-ai` on the page.

### Import from CDN:
### Import from CDN

```html
<button id="ask-ai" data-endpoint="https://xxxxxxxx.us.aircode.run/ask"></button>
...
<script src="https://unpkg.com/@documate/ui"></script>
<script src="https://unpkg.com/@documate/vanilla"></script>
```

### Import from Node:
### Import from Node

```bash
npm install @documate/ui
npm install @documate/vanilla
```

```js
import 'documate-ui';
import 'documate-vanilla';
```

## Prepare Data
Expand Down
2 changes: 1 addition & 1 deletion docs/integration/docsify.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ It's very easy to integrate Documate into Docsify. You just need to follow the [
```html
<button id="ask-ai" data-endpoint="https://xxxxxxxx.us.aircode.run/ask"></button>
...
<script src="https://unpkg.com/@documate/ui"></script>
<script src="https://unpkg.com/@documate/vanilla"></script>
```

You can place the button anywhere you like, but the most convenient way is to [enable the NavBar](https://docsify.js.org/#/configuration?id=loadnavbar) and then place the button on the NavBar.
Expand Down
2 changes: 1 addition & 1 deletion ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The UI components to integrate Documate into the framework of your choice. Packa
- `@documate/react` (Comming soon)
- `@documate/headless-vue` (Comming soon)
- `@documate/headless-react` (Comming soon)
- [`@documate/ui`](./vanilla-js/)
- [`@documate/vanilla`](./vanilla-js/)
10 changes: 5 additions & 5 deletions ui/vanilla-js/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Documate-UI
# Documate Vanilla

Build [Documate](https://github.com/aircodelabs/documate) UI using native JavaScript without any framework dependencies.

`@documate/ui` will automatically search for DOM elements with the ID `ask-ai` on the page, so you don't need to perform any manual initialization. The only thing you need to do is provide a button with the ID `ask-ai` on the page.
`@documate/vanilla` will automatically search for DOM elements with the ID `ask-ai` on the page, so you don't need to perform any manual initialization. The only thing you need to do is provide a button with the ID `ask-ai` on the page.


## Usage
Expand All @@ -12,15 +12,15 @@ Build [Documate](https://github.com/aircodelabs/documate) UI using native JavaSc
```html
<button id="ask-ai" data-endpoint="https://xxxxxxxx.us.aircode.run/ask"></button>
...
<script src="https://unpkg.com/@documate/ui"></script>
<script src="https://unpkg.com/@documate/vanilla"></script>
```

### Import from Node:

```bash
npm install @documate/ui
npm install @documate/vanilla
```

```js
import 'documate-ui';
import 'documate-vanilla';
```

0 comments on commit 1be1eaf

Please sign in to comment.