PHP code example of hollodotme / treemdown
1. Go to this page and download the library: Download hollodotme/treemdown library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hollodotme / treemdown example snippets
use hollodotme\TreeMDown\TreeMDown;
$treemdown = new TreeMDown('/path/to/your/markdown/files');
$treemdown->display();
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
#
#$treemdown->showEmptyFolders();
$treemdown->hideEmptyFolders();
# 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: index.md
#
$treemdown->setDefaultFile('README.md');
# Show/Hide filename suffix
#
# Default: Suffix is shown
#
#$tmd->showFilenameSuffix();
$tmd->hideFilenameSuffix();
# Prettify directory and file names
# This removes all "-" and "_" from the names displayed in the tree
#
# Default: Pretty names are disabled
#
#$tmd->disablePrettyNames();
$tmd->enablePrettyNames();
# [File system options]
#
# Set the patterns for files you want to