zzfly256/markdown-to-site

一个通过即时读取markdown文件来构建文档网站的工具

dev-master 2018-09-13 13:23 UTC

This package is auto-updated.

Last update: 2024-09-14 02:30:10 UTC


README

版本:20180913

作者:Rytia

Github: zzfly256/markdown-to-site

描述

一个通过即时加载远程或本地markdown文件来构建网站的工具。

您可以使用它构建一些有用的网站,如从GitHub同步内容,例如

  • 简单博客
  • 开发文档
  • Wiki

安装

要求

  • PHP (7.0+ 更好)
  • composer

下载和安装

安装composer后,您可以在控制台执行以下操作

git clone https://github.com/zzfly256/markdown-to-site.git
cd mark-to-site
composer install

或者,您可以直接通过composer安装

composer create-project zzfly256/markdown-to-site

配置

只需将index.php中的第12行改为您的markdown文件路径。以下是一些示例

// load the remote file
$file = file("https://raw.githubusercontent.com/php-quickorm/documents/master/README.md");

// load the local file
$file = file("/home/Rytia/readme.md");

// load file frome GET method
$file = file($_GET['md']);

用法

将您的根目录设置为markdown-to-site,并通过http://your_ip/访问。