Commit b6aaa8b8 authored by Helmut Hummel's avatar Helmut Hummel
Browse files

Simlify, harden and stramline code

parent b1c9d016
......@@ -4,3 +4,5 @@ composer.phar
packages*
includes
satis.html
/vendor/
{
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"erusev/parsedown": "1.0.*"
}
}
\ No newline at end of file
"name": "typo3/composer-typo3-org-site",
"description": "Website for https://composer.typo3.org",
"type": "project",
"require": {
"erusev/parsedown": "^1.6"
},
"license": "GPL2+",
"authors": [
{
"name": "Helmut Hummel",
"email": "info@helhum.io"
}
]
}
......@@ -4,23 +4,26 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "435d337cd25430b4d1d51cbe6686b028",
"content-hash": "8efb978a41ab91457c0ad7bac317d8f6",
"hash": "045f6ba69a5643e9399c56c5179ee7ca",
"content-hash": "1cad3a661ef7a505c8bb7c87450f2ab7",
"packages": [
{
"name": "erusev/parsedown",
"version": "1.0.1",
"version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "d24439ada0704948deef0d3eda2ea20fd8db1747"
"reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/d24439ada0704948deef0d3eda2ea20fd8db1747",
"reference": "d24439ada0704948deef0d3eda2ea20fd8db1747",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb",
"reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"autoload": {
"psr-0": {
......@@ -44,7 +47,7 @@
"markdown",
"parser"
],
"time": "2014-05-21 20:20:46"
"time": "2016-11-02 15:56:58"
}
],
"packages-dev": [],
......
<?php
require 'Packages/Libraries/autoload.php';
require __DIR__ . '/vendor/autoload.php';
$template = 'Resources/template.html';
$output = file_get_contents($template);
$contentFile = 'index.md';
$contentRaw = file_get_contents($contentFile);
$output = file_get_contents(__DIR__ . '/Resources/template.html');
$contentRaw = file_get_contents(__DIR__ . '/index.md');
$parser = new Parsedown();
$content = $parser->text($contentRaw);
......@@ -14,4 +11,4 @@ $content = $parser->text($contentRaw);
$output = str_replace('###CONTENT###', $content, $output);
$output = str_replace('../', '/Resources/', $output);
print $output;
echo $output;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment