Skip to content

Commit 730da5f

Browse files
committed
Added some docs.
1 parent 4af2bba commit 730da5f

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ if(!file_exists('vendor/autoload.php')) {
4343
die('Please run <code>composer install</code> first.');
4444
}
4545

46-
require_once 'vendor/autoload.php';
46+
require_once __DIR__.'/vendor/autoload.php';
4747

4848
$manager = new DocsManager();
4949

5050
// 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.
5252
$manager->addFile('Title of the file', '/path/to/documentation.md');
5353

5454
// 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:
154154
1) Clone the repository into a webserver's document root
155155
2) Run `composer install` in the package folder to install the dependencies
156156
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

Comments
 (0)