@@ -13,6 +13,7 @@ Configuration is built around three core concepts:
1313 - Composer package
1414 - or Git diffs
1515- ** Modifiers** : Transform source content before inclusion - clean up, simplify, or enhance raw content
16+ - ** Imports** : Include and merge configuration from external files to enable modular configuration management
1617
1718## YAML Configuration Format
1819
@@ -106,4 +107,54 @@ Create a `context.json` file in your project root:
106107}
107108` ` `
108109
109- As you can see it's pretty simple.
110+ As you can see it's pretty simple.
111+
112+ # # Configuration Imports
113+
114+ For large projects with multiple components or services, you can split your configuration across multiple files using the import functionality.
115+
116+ - Import paths are resolved relative to the importing file
117+ - You can apply path prefixes to source paths in imported configurations
118+ - Imports can be nested (configurations can import other configurations)
119+ - Circular imports are automatically detected and prevented
120+
121+ # ## Import Example in YAML
122+
123+ ` ` ` yaml
124+ import:
125+ - path: services/api/context.yaml
126+
127+ documents:
128+ - description: Project Overview
129+ outputPath: docs/overview.md
130+ sources:
131+ - type: text
132+ content: |
133+ # Project Documentation
134+
135+ This is the main project documentation.
136+ ` ` `
137+
138+ # ## Import Example in JSON
139+
140+ ` ` ` json
141+ {
142+ "import": [
143+ {
144+ "path": "services/api/context.json"
145+ }
146+ ],
147+ "documents": [
148+ {
149+ "description": "Project Overview",
150+ "outputPath": "docs/overview.md",
151+ "sources": [
152+ {
153+ "type": "text",
154+ "content": "# Project Documentation\n\n This is the main project documentation."
155+ }
156+ ]
157+ }
158+ ]
159+ }
160+ ` ` `
0 commit comments