@@ -32,7 +32,7 @@ The `source` property can be defined as either a string (following a glob patter
32
32
- ` source: '**/*.{json,yml}' ` includes ` JSON ` or ` YML ` file within the content directory and all its subdirectories.
33
33
- ` source: '*.json' ` includes only ` JSON ` files located directly within the content directory, excluding any subdirectories.
34
34
35
- ### ` include `
35
+ ### ` include ` (required)
36
36
37
37
Glob pattern of your target repository and files in the content folder.
38
38
@@ -80,8 +80,44 @@ source: {
80
80
81
81
### ` repository `
82
82
83
- External source representing a remote git repository URL (e.g., < https://github.com/nuxt/content > )
83
+ External source representing a remote git repository URL (e.g., < https://github.com/nuxt/content > ).
84
+
85
+ When defining an external source you must also define the ` include ` option.
86
+ ` include ` pattern is essential for the module to know which files to use for the collection.
87
+
88
+ ``` js
89
+ import { defineCollection , defineContentConfig } from ' @nuxt/content'
90
+
91
+ export default defineContentConfig ({
92
+ collections: {
93
+ docs: defineCollection ({
94
+ type: ' page'
95
+ source: {
96
+ repository: ' https://github.com/nuxt/content' ,
97
+ include: ' docs/content/**' ,
98
+ },
99
+ })
100
+ }
101
+ })
102
+ ```
84
103
85
104
### ` authToken `
86
105
87
106
Authentication token for private repositories (e.g., GitHub personal access token).
107
+
108
+ ### ` authBasic `
109
+
110
+ Basic authentication for private repositories (e.g., Bitbucket username and password).
111
+
112
+ ``` ts
113
+ defineCollection ({
114
+ type: ' page' ,
115
+ source: {
116
+ repository: ' https://bitbucket.org/username/repo' ,
117
+ authBasic: {
118
+ username: ' username' ,
119
+ password: ' password' ,
120
+ },
121
+ },
122
+ })
123
+ ```
0 commit comments