From c0e5c789a909f9ee5a4353f5df1aa9f6d8d12f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?t=C9=99=C9=99na=2Evu=C9=99?= <76698025+franklin-tina@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:51:47 -0600 Subject: [PATCH 1/4] docs: add documentation for using layers with private repos Update **Layers** documentation to include instructions for extending from private repositories. --- docs/1.getting-started/9.layers.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index ed61136af1af..5ef17a89cf9c 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -29,6 +29,18 @@ export default defineNuxtConfig({ }) ``` +The above example illustrates extending from a public GitHub repository. To extend from a **private** GitHub repository, follow the modified approach outlined below. + +```ts twoslash [nuxt.config.ts] +export default defineNuxtConfig({ + extends: [ + // per layer configuration + ['github:my-themes/private-awesome', { giget: { auth: process.env.GH_TOKEN } }] + ] +}) +``` + + ::read-more{to="/docs/guide/going-further/layers"} Read more about layers in the **Layer Author Guide**. :: From 07a0b9956252a4717bf0ef3fea3060e07f01463d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?t=C9=99=C9=99na=2Evu=C9=99?= <76698025+franklin-tina@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:25:54 -0600 Subject: [PATCH 2/4] Update 9.layers.md --- docs/1.getting-started/9.layers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 5ef17a89cf9c..c3b83a9e7d79 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -39,7 +39,7 @@ export default defineNuxtConfig({ ] }) ``` - +This uses [giget](https://unjs.io/packages/giget) under the hood for authenticating access to private repositories. For more information about this, visit [the documentation](https://unjs.io/packages/giget#providing-token-for-private-repositories) on "Providing token for private repositories" ::read-more{to="/docs/guide/going-further/layers"} Read more about layers in the **Layer Author Guide**. From 25950e2c5dfa57fcc97d191b23d971b077c5e0f8 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 6 Mar 2024 12:05:22 +0000 Subject: [PATCH 3/4] chore: slight tweak --- docs/1.getting-started/9.layers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index c3b83a9e7d79..478a18321089 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -29,7 +29,7 @@ export default defineNuxtConfig({ }) ``` -The above example illustrates extending from a public GitHub repository. To extend from a **private** GitHub repository, follow the modified approach outlined below. +You can also pass an authentication token if you are extending from a private GitHub repository: ```ts twoslash [nuxt.config.ts] export default defineNuxtConfig({ @@ -39,6 +39,7 @@ export default defineNuxtConfig({ ] }) ``` + This uses [giget](https://unjs.io/packages/giget) under the hood for authenticating access to private repositories. For more information about this, visit [the documentation](https://unjs.io/packages/giget#providing-token-for-private-repositories) on "Providing token for private repositories" ::read-more{to="/docs/guide/going-further/layers"} From 64f08cfdf99268e30995e4b480ad2093f45baece Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 6 Mar 2024 13:22:33 +0000 Subject: [PATCH 4/4] docs: fixes Co-authored-by: Pooya Parsa --- docs/1.getting-started/9.layers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/1.getting-started/9.layers.md b/docs/1.getting-started/9.layers.md index 478a18321089..eb35638d0383 100644 --- a/docs/1.getting-started/9.layers.md +++ b/docs/1.getting-started/9.layers.md @@ -35,12 +35,12 @@ You can also pass an authentication token if you are extending from a private Gi export default defineNuxtConfig({ extends: [ // per layer configuration - ['github:my-themes/private-awesome', { giget: { auth: process.env.GH_TOKEN } }] + ['github:my-themes/private-awesome', { auth: process.env.GITHUB_TOKEN }] ] }) ``` -This uses [giget](https://unjs.io/packages/giget) under the hood for authenticating access to private repositories. For more information about this, visit [the documentation](https://unjs.io/packages/giget#providing-token-for-private-repositories) on "Providing token for private repositories" +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**.