docs: add documentation for using layers with private repos (#26094)

This commit is contained in:
təəna.vuə 2024-03-06 07:25:23 -06:00 committed by GitHub
parent f09311d717
commit cdc3c4b3d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,6 +29,19 @@ export default defineNuxtConfig({
})
```
You can also pass an authentication token if you are extending from a private GitHub repository:
```ts twoslash [nuxt.config.ts]
export default defineNuxtConfig({
extends: [
// per layer configuration
['github:my-themes/private-awesome', { auth: process.env.GITHUB_TOKEN }]
]
})
```
Nuxt uses [unjs/c12](https://c12.unjs.io) and [unjs/giget](https://giget.unjs.io) for extending remote layers. Check the documentation for more information and all available options.
::read-more{to="/docs/guide/going-further/layers"}
Read more about layers in the **Layer Author Guide**.
::