File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,20 @@ With the following syntax, you can include files into your book:
3535
3636The path to the file has to be relative from the current source file.
3737
38- Usually, this command is used for including code snippets and examples. In this
39- case, oftens one would include a specific part of the file e.g. which only
40- contains the relevant lines for the example. We support four different modes of
41- partial includes:
38+ mdBook will interpret included files as markdown. Since the include command
39+ is usually used for inserting code snippets and examples, you will often
40+ wrap the command with ```` ``` ```` to display the file contents without
41+ interpretting them.
42+
43+ ```` hbs
44+ ```
45+ \{{#include file.rs}}
46+ ```
47+ ````
48+
49+ ## Including portions of a file
50+ Often you only need a specific part of the file e.g. relevant lines for an
51+ example. We support four different modes of partial includes:
4252
4353``` hbs
4454\{{#include file.rs:2}}
You can’t perform that action at this time.
0 commit comments