拼拼凑凑简单的demo:
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php
require 'Parsedown.php';
$Parsedown = new Parsedown();
//$html = file_get_contents('https://raw.githubusercontent.com/simple-mvc-framework/framework/master/README.md');
$html = file_get_contents('https://raw.githubusercontent.com/zlgopen/awtk/master/docs/manual/align_h_t.md');
$Parsedown = new Parsedown();
echo $Parsedown->text($html);
//echo $Parsedown->text('Hello _Parsedown_!');
?>
</body>
</html>
临时演示地址: http://whycan.io/parsedown/test5.php
用的是 awtk 的 md 文件: https://github.com/zlgopen/awtk/blob/master/docs/manual/align_h_t.md
参考地址: https://daveismyname.blog/reading-markdown-files-with-parsedown
离线