Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status Coverage Status Latest Stable Version Total Downloads License

TreeMDown [triː <'em> daʊn]

... is a single page PHP application for browsing markdown documents in a file structure and translating them to HTML.

A full featured demo can be found here!



You like TreeMDown and you are interested in browsing multiple trees of markdown files?

Check out TreeMDown-Multi! Live demo is available here.

Latest updates

  • Updated highlightjs to version 8.3
  • Fixed syntax highlighting of markdown code
  • Handling internal links between markdown files in the same tree (see the documentation)

Requirements / Dependencies

Note: This application is currently tested on linux systems only.


Via composer

To get the latest stable release, check the versions at Packagist and add to your composer.json:

	"require": {
		"hollodotme/treemdown": "~1.0"

To get the bleeding edge version add this to your composer.json:

	"repositories": [
			"type": "vcs",
			"url": ""

	"require": {
		"hollodotme/treemdown": "dev-master"

Now include the vendor/autoload.php and get started.




use hollodotme\TreeMDown\TreeMDown;

$treemdown = new TreeMDown('/path/to/your/markdown/files');


With personalization and options


use hollodotme\TreeMDown\TreeMDown;

// Create instance
$treemdown = new TreeMDown( '/path/to/your/markdown/files' );

# [Page meta data]
# Set a projectname
$treemdown->setProjectName('Your project name');

# Set a short description
$treemdown->setShortDescription('Your short description');

# Set a company name
$treemdown->setCompanyName('Your company name');

# [Output options]
# Show or hide empty folders in tree
# Default: Empty folders will be displayed

# Set the default file that is shown if no file or path is selected (initial state)
# The file path must be __relative__ to the root directory above: '/path/to/your/markdown/files'
# Default:

# Show/Hide filename suffix
# Default: Suffix is shown

# Prettify directory and file names
# This removes all "-" and "_" from the names displayed in the tree
# Default: Pretty names are disabled

# [File system options]
# Set the patterns for files you want to include
# Default: array( '*.md', '*.markdown')
$treemdown->setIncludePatterns( array( '*.md', '*.markdown') );

# Set the patterns for files/path you want to exclude
# Default: array( '.*' )
$treemdown->setExcludePatterns( array( '.*' ) );



This application uses the following libraries: