Skip to content

Commit

Permalink
docs: add github in sources (#1946)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes committed Mar 8, 2023
1 parent 8e6bfd6 commit 06335ab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/content/4.api/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The watcher is a development feature and will not be included in production.

Define different sources for contents.

Contents can be located in multiple places, in multiple directories, or in remote git repositories.
Contents can be located in multiple places, in multiple directories, or in remote git repositories thanks to [`unstorage`](https://unstorage.unjs.io/).

```ts [nuxt.config.ts]
export default defineNuxtConfig({
Expand All @@ -99,7 +99,15 @@ export default defineNuxtConfig({
driver: 'fs',
// ...driverOptions
base: resolve(__dirname, 'content-fa') // Path for source directory
}
},
github: {
prefix: '/blog', // Prefix for routes used to query contents
driver: 'github', // Driver used to fetch contents (view unstorage documentation)
repo: "<owner>/<repo>",
branch: "main",
dir: "content", // Directory where contents are located. It could be a subdirectory of the repository.
// Imagine you have a blog inside your content folder. You can set this option to `content/blog` with the prefix option to `/blog` to avoid conflicts with local files.
},
}
}
})
Expand Down

0 comments on commit 06335ab

Please sign in to comment.