hollodotme/treemdown
Composer 安装命令:
composer require hollodotme/treemdown
包简介
A PHP class for browsing markdown files with HTML rendering, syntax highlighting and search
README 文档
README
TreeMDown [triː <'em> daʊn]
... is a single page PHP application for browsing markdown documents in a file structure and translating them to HTML.
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
- PHP >= 5.3
- Parsedown-Extra via composer
- Webserver (Apache, nginx, etc.)
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:
hollodotme/treemdown 适用场景与选型建议
hollodotme/treemdown 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 46.11k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2014 年 08 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「tree」 「parser」 「search」 「markdown」 「html」 「markdown extra」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hollodotme/treemdown 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hollodotme/treemdown 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hollodotme/treemdown 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel package to retrieve data from Google Search Console
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
jsTree widget for yii2
Indexed Search Autocomplete - Extends the TYPO3 Core Extension Indexed_Search searchform with an autocomplete feature.
Doctrine2 behavior traits - slowhop fork
Abstraction Layer to index and search entities
统计信息
- 总下载量: 46.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 36
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-15
