Commit blank nginx config
This commit is contained in:
40
parser/markdown/md.php
Normal file
40
parser/markdown/md.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
require_once('lib/Parsedown.php');
|
||||
|
||||
$Parsedown = new Parsedown();
|
||||
|
||||
$text = file_get_contents($_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME']);
|
||||
$html = $Parsedown->text($text);
|
||||
|
||||
$css = trim(file_get_contents('assets/github-markdown.min.css'), "\n");
|
||||
//$prism_css = trim(file_get_contents('assets/prism.min.css'), "\n");
|
||||
//$prism_js = trim(file_get_contents('assets/prism.min.js'), "\n");
|
||||
?><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php echo basename($_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME']);?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
|
||||
<style><?php echo $css; ?></style>
|
||||
<?php /* <style><?php echo $prism_css; ?></style>
|
||||
*/ ?>
|
||||
<style>
|
||||
body {
|
||||
min-width: 200px;
|
||||
max-width: 790px;
|
||||
margin: 0 auto;
|
||||
padding: 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- generated -->
|
||||
<?php echo $html; ?>
|
||||
|
||||
<!-- /generated -->
|
||||
|
||||
<?php /* <script><?php echo $prism_js; ?></script>
|
||||
*/ ?> </body>
|
||||
</html>
|
Reference in New Issue
Block a user