Skip to content

Commit 06335ab

Browse files
authored
docs: add github in sources (#1946)
1 parent 8e6bfd6 commit 06335ab

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/content/4.api/3.configuration.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The watcher is a development feature and will not be included in production.
8181

8282
Define different sources for contents.
8383

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

8686
```ts [nuxt.config.ts]
8787
export default defineNuxtConfig({
@@ -99,7 +99,15 @@ export default defineNuxtConfig({
9999
driver: 'fs',
100100
// ...driverOptions
101101
base: resolve(__dirname, 'content-fa') // Path for source directory
102-
}
102+
},
103+
github: {
104+
prefix: '/blog', // Prefix for routes used to query contents
105+
driver: 'github', // Driver used to fetch contents (view unstorage documentation)
106+
repo: "<owner>/<repo>",
107+
branch: "main",
108+
dir: "content", // Directory where contents are located. It could be a subdirectory of the repository.
109+
// 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.
110+
},
103111
}
104112
}
105113
})

0 commit comments

Comments
 (0)