镜像自地址
https://github.com/JGZYES/ParlzPackageManger.git
已同步 2026-09-11 08:52:45 +08:00
web: quick-start install cmd -> /download/install.sh + fix docs crumb title
- 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 <h1>, so it fell back to the slug e.g. 'index').
这个提交包含在:
+3
-3
@@ -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 '<div class="docs-crumb">文档 / ' . htmlspecialchars($title) . '</div>';
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
## 一分钟装好
|
||||
|
||||
```bash
|
||||
curl -sSL https://pmm.parlz.com/install.sh | bash
|
||||
curl -sSL https://pmm.parlz.com/download/install.sh | bash
|
||||
```
|
||||
|
||||
装好后:
|
||||
|
||||
在新工单中引用
屏蔽一个用户