Skip to content

Commit

Permalink
add dosify integration
Browse files Browse the repository at this point in the history
  • Loading branch information
akira-cn committed Sep 19, 2023
1 parent e6d1be0 commit f2537ae
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ export default defineConfig({
{ text: 'Start with Native JS', link: '/getting-started/vanilla-js' }
]
},
{
text: 'Integration',
items: [
{ text: 'Integration to Docsify', link: '/integration/docsify' },
]
},
{
text: 'Reference',
items: [
Expand Down
Empty file removed docs/developments/docsify.md
Empty file.
5 changes: 4 additions & 1 deletion docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ Please choose a framework below to get started:
- [General Vue Project](/getting-started/general-vue)
- [Vanilla JS](/getting-started/vanilla-js)

Documate can also be manually integrated to other library or frameworks.

- [Docsify](/integration/docsify)

The following frameworks are coming soon:

- Docusaurus
- Docsify
- Vuepress
- Docus
- Nextra
Expand Down
17 changes: 17 additions & 0 deletions docs/integration/docsify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Integration to Docsify

It's very easy to integrate Documate into Docsify. You just need to follow the [Native JavaScript Startup](/getting-started/vanilla-js) guide to import js and provide a button with the ID `ask-ai` in your doc's `index.html` page.

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

There is an [online Example](https://spritejs.vercel.app/#/).

<img src="https://aircode-yvo.b-cdn.net/resource/14-y607yzcv44.jpg" width="400">

<img src="https://aircode-yvo.b-cdn.net/resource/1695090094690-cbh1nh85p3.jpg" width="400">

0 comments on commit f2537ae

Please sign in to comment.