Skip to content

Commit 7a359ce

Browse files
committed
fix(docs): use GitHub URLs for out-of-tree wiki links
MkDocs strict mode fails on relative links to repo-root files; point openapi, protocols, SECURITY, and env example links at GitHub instead.
1 parent fa06620 commit 7a359ce

17 files changed

Lines changed: 45 additions & 28 deletions

docs/wiki/_mkdocs_sanitize.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
ROOT = Path(__file__).resolve().parent
1010
LANGS = ("en", "fa", "ar", "tr")
11+
GITHUB = "https://github.com/iPmartNetwork/VortexUI/blob/master"
1112

1213
ALERT_MAP = {
1314
"NOTE": "note",
@@ -90,6 +91,21 @@ def fix_admonition_quotes(text: str) -> str:
9091
return "\n".join(out)
9192

9293

94+
def fix_external_links(text: str) -> str:
95+
"""Point repo-root references at GitHub (outside docs_dir)."""
96+
replacements = {
97+
"../../openapi.yaml": f"{GITHUB}/docs/openapi.yaml",
98+
"../../protocols.md": f"{GITHUB}/docs/protocols.md",
99+
"../../../.env.example": f"{GITHUB}/.env.example",
100+
"../../../SECURITY.md": f"{GITHUB}/SECURITY.md",
101+
"../../../CONTRIBUTING.md": f"{GITHUB}/CONTRIBUTING.md",
102+
"../../../CHANGELOG.md": f"{GITHUB}/CHANGELOG.md",
103+
}
104+
for old, new in replacements.items():
105+
text = text.replace(old, new)
106+
return text
107+
108+
93109
def simplify_nav_line(text: str) -> str:
94110
# MkDocs has sidebar; drop redundant breadcrumb nav lines
95111
text = re.sub(
@@ -178,6 +194,7 @@ def sanitize_chapter(path: Path) -> None:
178194
text = github_alerts_to_material(text)
179195
text = fix_admonition_quotes(text)
180196
text = simplify_nav_line(text)
197+
text = fix_external_links(text)
181198
text = ensure_table_spacing(text)
182199
text = re.sub(r"\n{3,}", "\n\n", text).strip() + "\n"
183200
path.write_text(text, encoding="utf-8")

docs/wiki/ar/02-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ VORTEX_CORE_BIN=/usr/local/bin/xray
164164
| `VORTEX_TELEGRAM_TOKEN` || رمز بوت Telegram |
165165
| `VORTEX_CF_API_TOKEN` || أتمتة DNS Cloudflare |
166166

167-
القائمة الكاملة: [`.env.example`](../../../.env.example)
167+
القائمة الكاملة: [`.env.example`](https://github.com/iPmartNetwork/VortexUI/blob/master/.env.example)
168168

169169
---
170170

docs/wiki/ar/12-api-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ١٢. مرجع API
22

33
!!! note
4-
المواصفات الكاملة: [`docs/openapi.yaml`](../../openapi.yaml) — جميع endpoints وRBAC.
4+
المواصفات الكاملة: [`docs/openapi.yaml`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/openapi.yaml) — جميع endpoints وRBAC.
55

66
---
77

88
## OpenAPI
99

10-
المواصفات الكاملة: [`docs/openapi.yaml`](../../openapi.yaml)
10+
المواصفات الكاملة: [`docs/openapi.yaml`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/openapi.yaml)
1111

1212
### العرض التفاعلي
1313

docs/wiki/ar/13-protocols-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ١٣. البروتوكولات والتكوين
22

3-
> أمثلة JSON كاملة بالإنجليزية: [`docs/protocols.md`](../../protocols.md)
3+
> أمثلة JSON كاملة بالإنجليزية: [`docs/protocols.md`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/protocols.md)
44
55
!!! tip
66
تحت رقابة شديدة: **VLESS + REALITY + Vision** — أنشئ المفاتيح من الواجهة.

docs/wiki/ar/15-troubleshooting-faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ GPL-3.0 — المشتقات يجب أن تكون مفتوحة المصدر.
131131
1. [GitHub Issues](https://github.com/iPmartNetwork/VortexUI/issues)
132132
2. الإصدار: `vortexui settings` أو الشريط الجانبي
133133
3. السجلات: `vortexui logs` (بدون أسرار)
134-
4. [SECURITY.md](../../../SECURITY.md) للثغرات
134+
4. [SECURITY.md](https://github.com/iPmartNetwork/VortexUI/blob/master/SECURITY.md) للثغرات
135135

136136
---
137137

138138
## المجتمع
139139

140140
- ⭐ Star on GitHub
141-
- [Contributing](../../../CONTRIBUTING.md)
142-
- [Changelog](../../../CHANGELOG.md)
141+
- [Contributing](https://github.com/iPmartNetwork/VortexUI/blob/master/CONTRIBUTING.md)
142+
- [Changelog](https://github.com/iPmartNetwork/VortexUI/blob/master/CHANGELOG.md)

docs/wiki/en/02-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ In Docker Compose this is enabled by default.
164164
| `VORTEX_TELEGRAM_TOKEN` || Telegram bot token |
165165
| `VORTEX_CF_API_TOKEN` || Cloudflare DNS automation |
166166

167-
Full list: [`.env.example`](../../../.env.example)
167+
Full list: [`.env.example`](https://github.com/iPmartNetwork/VortexUI/blob/master/.env.example)
168168

169169
---
170170

docs/wiki/en/12-api-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# 12. API Reference
22

33
!!! note
4-
Full spec: [`docs/openapi.yaml`](../../openapi.yaml) — all endpoints and RBAC.
4+
Full spec: [`docs/openapi.yaml`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/openapi.yaml) — all endpoints and RBAC.
55

66
---
77

88
## OpenAPI
99

10-
Full specification: [`docs/openapi.yaml`](../../openapi.yaml)
10+
Full specification: [`docs/openapi.yaml`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/openapi.yaml)
1111

1212
### Interactive viewing
1313

docs/wiki/en/13-protocols-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 13. Protocols & Configuration
22

3-
> Full English JSON examples: [`docs/protocols.md`](../../protocols.md)
3+
> Full English JSON examples: [`docs/protocols.md`](https://github.com/iPmartNetwork/VortexUI/blob/master/docs/protocols.md)
44
55
!!! tip
66
Under heavy censorship: **VLESS + REALITY + Vision** — generate keys from the UI.

docs/wiki/en/15-troubleshooting-faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ GPL-3.0 — derivatives must be open source.
131131
1. [GitHub Issues](https://github.com/iPmartNetwork/VortexUI/issues)
132132
2. Version: `vortexui settings` or sidebar
133133
3. Logs: `vortexui logs` (no secrets)
134-
4. [SECURITY.md](../../../SECURITY.md) for vulnerabilities
134+
4. [SECURITY.md](https://github.com/iPmartNetwork/VortexUI/blob/master/SECURITY.md) for vulnerabilities
135135

136136
---
137137

138138
## Community
139139

140140
- ⭐ Star on GitHub
141-
- [Contributing](../../../CONTRIBUTING.md)
142-
- [Changelog](../../../CHANGELOG.md)
141+
- [Contributing](https://github.com/iPmartNetwork/VortexUI/blob/master/CONTRIBUTING.md)
142+
- [Changelog](https://github.com/iPmartNetwork/VortexUI/blob/master/CHANGELOG.md)

docs/wiki/fa/02-installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ VORTEX_CORE_BIN=/usr/local/bin/xray
164164
| `VORTEX_TELEGRAM_TOKEN` || توکن ربات تلگرام |
165165
| `VORTEX_CF_API_TOKEN` || Cloudflare DNS automation |
166166

167-
لیست کامل: [`.env.example`](../../../.env.example)
167+
لیست کامل: [`.env.example`](https://github.com/iPmartNetwork/VortexUI/blob/master/.env.example)
168168

169169
---
170170

0 commit comments

Comments
 (0)