Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xianyunyh/parse-hexo

解析hexo的post的markdown文件
https://github.com/xianyunyh/parse-hexo

Last synced: 8 days ago
JSON representation

解析hexo的post的markdown文件

Awesome Lists containing this project

README

        

## 解析hexo的post的markdown文件。

依赖**erusev/parsedown** 和 **yaml**

```shell
composer install
```

测试实例

```php
$file = "./crontab.md";
$parse = new \XianYun\ParseHexo($file);
$header = $parse->getHeader();//markdown header中yaml数据
$content = $parse->getContent();//正文内容
$Parsedown = new \Parsedown();// 利用parsemarkdown 解析正文
$content = $Parsedown->text($content);
```