From 451cd9319e36b59da7eaf64e09d310199d1b9c7a Mon Sep 17 00:00:00 2001 From: JGZYES Date: Sat, 5 Sep 2026 13:03:06 +0800 Subject: [PATCH] web: quick-start install cmd -> /download/install.sh + fix docs crumb title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - index.md (快速开始) one-line install now uses https://pmm.parlz.com/download/install.sh (matches the download folder). - docs/index.php: read the crumb title from the raw markdown's first '# ' line (was reading the rendered body, which had already converted '#' to

, so it fell back to the slug e.g. 'index'). --- web/docs/index.php | 6 +++--- web/docs/md/index.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/docs/index.php b/web/docs/index.php index d92f10f..42178b2 100644 --- a/web/docs/index.php +++ b/web/docs/index.php @@ -63,15 +63,15 @@ function render_tree(string $dir, string $rel): string { } $body = ''; +$title = $page; $f = $mdDir . '/' . $page . '.md'; if (is_file($f)) { $raw = (string)file_get_contents($f); $raw = str_replace("\r", "", $raw); + /* title = first '# ' line of the raw markdown (not the rendered body) */ + if (preg_match('/^#\s+(.+)$/m', $raw, $m)) $title = trim($m[1]); $body = md($raw); } -// crumb title = file's first heading or slug -$title = $page; -if ($body !== '' && preg_match('/^#\s+(.+)$/m', str_replace('<', '', $body), $m)) $title = trim(strip_tags($m[1])); if (isset($_GET['ajax'])) { /* partial response for AJAX nav (no layout) */ echo '
文档 / ' . htmlspecialchars($title) . '
'; diff --git a/web/docs/md/index.md b/web/docs/md/index.md index 7bf85af..1f4f6c0 100644 --- a/web/docs/md/index.md +++ b/web/docs/md/index.md @@ -7,7 +7,7 @@ ## 一分钟装好 ```bash -curl -sSL https://pmm.parlz.com/install.sh | bash +curl -sSL https://pmm.parlz.com/download/install.sh | bash ``` 装好后: