@@ -43,12 +43,12 @@ if(!file_exists('vendor/autoload.php')) {
43
43
die('Please run <code >composer install</code > first.');
44
44
}
45
45
46
- require_once ' vendor/autoload.php';
46
+ require_once __DIR__.'/ vendor/autoload.php';
47
47
48
48
$manager = new DocsManager();
49
49
50
50
// Add all the files you wish to view here, along with
51
- // a title that will be shown in the UI.
51
+ // a title that will be shown in the UI.
52
52
$manager->addFile('Title of the file', '/path/to/documentation.md');
53
53
54
54
// The viewer needs to know the URL to the vendor/ folder, relative
@@ -154,3 +154,26 @@ this `README.md` file. To get it running, follow these steps:
154
154
1 ) Clone the repository into a webserver's document root
155
155
2 ) Run ` composer install ` in the package folder to install the dependencies
156
156
3 ) Point your browser to the package folder's ` example.php ` file
157
+
158
+ ## Markdown syntax extensions
159
+
160
+ ### Including external files
161
+
162
+ The ` {include-file} ` command allows you to import the content of external files
163
+ into your documents. This is especially handy for code examples, as it allows
164
+ you to maintain them separately from the main document.
165
+
166
+ If viewed through ` example.php ` , the following code sample is loaded dynamically,
167
+ for example:
168
+
169
+ ``` php
170
+ {include-file: tests/files/includes/test-php-highlight.php}
171
+ ```
172
+
173
+ The command looks like this:
174
+
175
+ ```
176
+ \{include-file: tests/files/includes/test-php-highlight.php\}
177
+ ```
178
+
179
+ File paths are relative to the source markdown file.
0 commit comments