Skip to content

Commit

Permalink
add a docsify start template
Browse files Browse the repository at this point in the history
  • Loading branch information
adcentury committed Sep 20, 2023
1 parent a646057 commit e34711f
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/integration/docsify.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pnpm install @documate/vanilla

:::

Them import it in your `index.js` file:
Then import it in your `index.js` file:

```js
import '@documate/vanilla'
Expand All @@ -95,7 +95,7 @@ Modify the Documate UI you added before to pass the endpoint to the `data-endpoi

```html
<!-- Replace the URL with your own one -->
<button id="ask-ai" data-endpoint="https://test123.us.aircode.run/ask"></button>
<button id="ask-ai" data-endpoint="https://test123.us.aircode.run/ask">Ask AI</button>
```

## Run the Project
Expand Down
1 change: 1 addition & 0 deletions examples/docsify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Empty file added examples/docsify/.nojekyll
Empty file.
3 changes: 3 additions & 0 deletions examples/docsify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Documate Docsify Starter

This is a template for creating a new Docsify site with Documate. Read [the guide](https://documate.site/integration/docsify) for more information.
5 changes: 5 additions & 0 deletions examples/docsify/_navbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<body>
<!-- Replace the data-endpoint value with your own URL -->
<!-- @see: https://documate.site/integration/docsify#connect-to-backend -->
<a id="ask-ai" data-endpoint="https://test123.us.aircode.run/ask" href="###">Ask AI</a>
</body>
5 changes: 5 additions & 0 deletions examples/docsify/documate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"root": ".",
"include": [ "**/*.md" ],
"backend": ""
}
25 changes: 25 additions & 0 deletions examples/docsify/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Documate Docsify Starter</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'Documate Docsify Starter',
repo: 'aircodelabs/documate',
loadNavbar: true,
}
</script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<!-- Documate -->
<script src="https://unpkg.com/@documate/vanilla"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions examples/docsify/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "documate-docsify-starter",
"version": "1.0.0",
"description": "A template for creating a new Docsify site with Documate",
"private": true,
"scripts": {
"documate:upload": "documate upload"
},
"devDependencies": {
"@documate/documate": "^0.1.0"
}
}
2 changes: 1 addition & 1 deletion examples/vitepress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "documate-vitepress-starter",
"description": "A demo of how to integrate Documate into Vitepress site. You can also use this as a template to start a new project.",
"description": "A template for creating a new VitePress site with Documate",
"version": "0.0.0",
"private": true,
"type": "module",
Expand Down

0 comments on commit e34711f

Please sign in to comment.