summaryrefslogtreecommitdiff
path: root/expand.php
diff options
context:
space:
mode:
authorJonas Kohl <gitlab@jonaskohl.de>2024-07-19 17:20:26 +0200
committerJonas Kohl <gitlab@jonaskohl.de>2024-07-19 17:20:26 +0200
commit8a6897e3fd2efceacf8d020dfbf8b742a68f96cd (patch)
treef43176d660ec727a72a2a8ac3a029c572a167ecb /expand.php
parent1e02dc1555f9d298f6f054834589a80c8f8d8273 (diff)
Add development server and refactor building
Diffstat (limited to 'expand.php')
-rw-r--r--expand.php21
1 files changed, 2 insertions, 19 deletions
diff --git a/expand.php b/expand.php
index fb83625..bbe1a3b 100644
--- a/expand.php
+++ b/expand.php
@@ -1,21 +1,4 @@
<?php
-define("SRCDIR", realpath(__DIR__ . "/src/"));
-
-$__page = file_get_contents("php://stdin");
-$title = "";
-$__page = preg_replace_callback(
- ';<title>(.*?)</title>;i',
- function(array $matches) use(&$title): string {
- $title = $matches[1];
- return "";
- },
- $__page
-);
-$page = SRCDIR . "/pages/" . bin2hex(random_bytes(8)) . ".tmp";
-file_put_contents($page, $__page);
-unset($__page);
-
-include SRCDIR . "/template.php";
-
-unlink($page);
+require_once __DIR__ . "/common.php";
+echo hzcom_expand(file_get_contents("php://stdin"));