From e24572790514bbe8b5e1e360cf136cf5388025b0 Mon Sep 17 00:00:00 2001 From: moderndevslulw Date: Sat, 5 Jul 2025 20:38:22 +0500 Subject: feat: wiki --- lib/partials.php | 14 +++++ public/static/img/icons/book.png | Bin 0 -> 754 bytes public/static/style.css | 130 +++++++++++++++++++++++++++++++++++++++ public/wiki.php | 66 ++++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 public/static/img/icons/book.png create mode 100644 public/wiki.php diff --git a/lib/partials.php b/lib/partials.php index 8dcc915..0fec678 100644 --- a/lib/partials.php +++ b/lib/partials.php @@ -10,6 +10,7 @@ function html_navigation_bar()
home + wiki
+ + $cur) { + if (basename($filename) == $page_name) { + $page_path = $filename; + break; + } +} + +if (!isset($page_path) || !is_file($page_path)) { + http_response_code(404); + exit; +} + +$parsedown = new Parsedown(); +$contents = $parsedown->parse(file_get_contents($page_path)); + +if ($sidebar = file_get_contents(WIKI_PAGE_DIRECTORY . '/summary.md')) { + $sidebar = $parsedown->parse($sidebar); +} +?> + + + + <?= $page_id ?> - Wiki - The Tinybot Project + + + + + + +
+ + +
+ +

Wiki

+
+
+ + +
+ +
+ + + +
+ +
+
+
+
+ + + + + \ No newline at end of file -- cgit v1.2.3