From 51573e2fe7fd61ad95d06679dbb5ff7e4d644188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lohrer?= Date: Sat, 22 Mar 2025 09:47:08 +0100 Subject: [PATCH] =?UTF-8?q?add=20debug.php=20zur=20=C3=9Cberpr=C3=BCfung?= =?UTF-8?q?=20/=20Logging=20von=20import,=20yaml-mapping,=20export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 debug.php diff --git a/debug.php b/debug.php new file mode 100644 index 0000000..521da40 --- /dev/null +++ b/debug.php @@ -0,0 +1,49 @@ +text($content_md); + return [$yaml, $html]; + } else { + throw new Exception("YAML-Header im Markdown nicht gefunden."); + } +} + +// Hauptlogik +try { + $url = 'https://git.rpi-virtuell.de/Comenius-Institut/FOERBICO/raw/branch/main/Website/content/posts/2025-02-25-KLT-M%C3%BCnster/index.md'; + echo "Lade Markdown von: $url\n\n"; + $markdown = fetch_markdown($url); + echo "Markdown-Inhalt:\n" . $markdown . "\n\n"; + + list($yaml, $html) = parse_markdown($markdown); + + echo "--- YAML-Header als Array ---\n"; + print_r($yaml); + echo "\n--- Generiertes HTML ---\n"; + echo $html . "\n"; + +} catch (Exception $e) { + echo "Fehler: " . $e->getMessage(); +}