2017 © Pedro Peláez
 

library treemdown-multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

image

hollodotme/treemdown-multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

  • Monday, January 12, 2015
  • by hollodotme
  • Repository
  • 1 Watchers
  • 0 Stars
  • 145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

TreeMDown-Multi

This is an extension of TreeMDown to handle and display multiple trees of markdown files., (*1)

Installation

Via composer

Checkout the current release at packagist.org., (*2)

Add to your composer.json:, (*3)

{
    "require": {
        "hollodotme/treemdown-multi": "~1.0"
    }
}

Basic usage

<?php

// Require composer autoloading
require_once 'vendor/autoload.php';

use hollodotme\TreeMDown\TreeMDown;
use hollodotme\TreeMDownMulti\TreeMDownMulti;

$multi_view = new TreeMDownMulti();

$multi_view->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 to see all available options., (*4)

Here is a simplyfied example:, (*5)

<?php

// include composer autoloading
require_once 'vendor/autoload.php';

// IMPORTANT: Don't use hollodotme\**TreeMDown**\TreeMDown here!
// This package has an extended TreeMDown class

use hollodotme\TreeMDownMulti\TreeMDown;
use hollodotme\TreeMDownMulti\TreeMDownMulti;

// Create instance
$multi_view = new TreeMDownMulti();

// Configure your markdown primary dir
$tree1 = new TreeMDown( '/path/to/your/markdown/files' );
$tree1->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();

The Versions

12/01 2015

dev-master

9999999-dev https://github.com/hollodotme/TreeMDown-Multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

  Sources   Download

MIT

The Requires

 

parser search html markdown tree markdown extra multi grep

12/01 2015

v1.1.1

1.1.1.0 https://github.com/hollodotme/TreeMDown-Multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

  Sources   Download

MIT

The Requires

 

parser search html markdown tree markdown extra multi grep

01/11 2014

v1.1.0

1.1.0.0 https://github.com/hollodotme/TreeMDown-Multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

  Sources   Download

MIT

The Requires

 

parser search html markdown tree markdown extra multi grep

30/08 2014

v1.0.0

1.0.0.0 https://github.com/hollodotme/TreeMDown-Multi

A PHP class for browsing multiple trees of markdown files with HTML rendering, syntax highlighting and search

  Sources   Download

MIT

The Requires

 

parser search html markdown tree markdown extra multi grep