Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hollodotme/treemdown-multi
TreeMDown with multiple trees of markdown files
https://github.com/hollodotme/treemdown-multi
markdown-viewer multiple-trees php
Last synced: about 1 month ago
JSON representation
TreeMDown with multiple trees of markdown files
- Host: GitHub
- URL: https://github.com/hollodotme/treemdown-multi
- Owner: hollodotme
- Created: 2014-08-29T08:30:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-12T15:57:58.000Z (almost 10 years ago)
- Last Synced: 2024-11-11T16:51:14.422Z (about 1 month ago)
- Topics: markdown-viewer, multiple-trees, php
- Language: PHP
- Homepage: https://hollo.me/treemdown-multi/
- Size: 191 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TreeMDown-Multi
This is an extension of [TreeMDown](https://github.com/hollodotme/TreeMDown) to handle and display multiple trees of markdown files.
## Installation
### Via composer
Checkout the current release at [packagist.org](http://packagist.org/hollodotme/treemdown-multi).
Add to your `composer.json`:
```json
{
"require": {
"hollodotme/treemdown-multi": "~1.0"
}
}
```## Basic usage
```php
addTree( new TreeMDown(__DIR__ . '/my_docs'), 'My documents');
$multi_view->addTree( new TreeMDown(__DIR__ . '/your_docs'), 'Your documents');$multi_view->display();
```
## Advanced Usage
You can configure each of the TreeMDown instances to fit your needs.
Please visit the [documentation of TreeMDown](http://hollo.me/treemdown) to see all available options.Here is a simplyfied example:
```php
hideEmptyFolders();
$tree1->setProjectName( 'Your markdown files' );
$tree1->enablePrettyNames();
$tree1->hideFilenameSuffix();// Configure other dir
// Note: No output options set to show the difference
$tree2 = new TreeMDown( '/path/to/other/markdown/files' );
$tree2->setProjectName( 'Other markdown files' );// Make "Yours" default (3rd parameter)
$multi_view->addTreeMDown( $tree1, 'Yours', true );
$multi_view->addTreeMDown( $tree2, 'Others' );// Display
$multi_view->display();```