定制 hollodotme/treemdown 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hollodotme/treemdown

Composer 安装命令:

composer require hollodotme/treemdown

包简介

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

README 文档

README

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!

treemdown

News

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.

Installation

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": "git@github.com:hollodotme/TreeMDown.git"
		}
	],

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

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

Usage

Basic

<?php

use hollodotme\TreeMDown\TreeMDown;

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

$treemdown->display();

With personalization and options

<?php

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 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( '.*' ) );

$treemdown->display();

Contributions

This application uses the following libraries:

统计信息

  • 总下载量: 46.11k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 19
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固