浏览代码

add the doc for the yaml include statement

nico 8 年之前
父节点
当前提交
df0acd4e67
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22 0
      Docs/brain.md

+ 22 - 0
Docs/brain.md

@@ -97,3 +97,25 @@ signals:
   - order: "say"
 ```
 When you will pronounce "say hello", it will trigger both synapses. 
+
+
+## Split the brain
+
+If you want a better visibly, or simply sort your actions with different file, you can split the main brain file into multiple one.
+
+To do that, use the import statement in the entry brain.yml file with the following syntax:
+
+```
+---
+  - !include path/to/sub_brain.yml
+  - !include path/to/another_sub_brain.yml
+```
+
+E.g:
+```
+---
+  - !include brains/rolling_shutter_commands.yml
+  - !include brains/find_my_phone.yml
+```
+
+>**Note:** You can only use the `!include` statement in the main brain file.