fix(478-2 문서 사이트): TS 함수 화면 = TypeDoc HTML(structure) — markdown 판의 배열 타입 꼴이 링크로 오인돼 strict 빨강 · 파이썬 설명 없는 함수도 화면에
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+8
-8
@@ -5,7 +5,7 @@
|
||||
<페이지>/index.md 개요 · 묶음 상자 · 묶음 사이 흐름 그림 · 손글(규칙 · 사용자 결정)
|
||||
<페이지>/<묶음>.md 손글 설명 · 묶음 안 흐름 그림 · 세션 칸 · 서버 주소 · 함수 칸
|
||||
<페이지>/none.md 묶음 없음
|
||||
ts/ · py/ 함수 화면 — TypeDoc(markdown) · mkdocstrings(griffe)가 만듦
|
||||
ts/ · py/ 함수 화면 — TypeDoc(HTML) · mkdocstrings(griffe)가 만듦
|
||||
.nav.json 왼쪽 메뉴(nav_hook.py 가 읽음)
|
||||
함수 목록 지문이 손글 지문과 다른 묶음 = 「설명 확인 필요」 · 맞으면 --stamp.
|
||||
|
||||
@@ -72,18 +72,17 @@ def stamp(path: Path, print_: str) -> None:
|
||||
|
||||
|
||||
def run_typedoc(ts_files: list[str], out: Path) -> dict[tuple[str, str], str]:
|
||||
"""TypeDoc 으로 ts/ 함수 화면 · (파일, 이름) → 원고 안 경로."""
|
||||
"""TypeDoc HTML 로 ts/ 함수 화면 · (파일, 이름) → 원고 안 경로."""
|
||||
if not ts_files:
|
||||
return {}
|
||||
opts = {
|
||||
"entryPoints": [(ROOT / f).as_posix() for f in ts_files],
|
||||
"tsconfig": (ROOT / "tsconfig.json").as_posix(),
|
||||
"skipErrorChecking": True,
|
||||
"plugin": ["typedoc-plugin-markdown"],
|
||||
"router": "structure",
|
||||
"out": (out / "src" / "ts").as_posix(),
|
||||
"json": (out / "typedoc.json").as_posix(),
|
||||
"readme": "none",
|
||||
"entryFileName": "index.md",
|
||||
"logLevel": "Error",
|
||||
}
|
||||
opt_file = out / "typedoc.options.json"
|
||||
@@ -105,9 +104,8 @@ def typedoc_pages(out: Path) -> dict[tuple[str, str], str]:
|
||||
for mod in modules:
|
||||
base = f"ts/{mod['name']}/" if mod["name"] else "ts/"
|
||||
for c in mod.get("children", []):
|
||||
folder = {64: "functions", 32: "variables"}.get(c["kind"])
|
||||
if folder and c.get("sources"):
|
||||
rel = f"{base}{folder}/{c['name']}.md"
|
||||
if c["kind"] in (64, 32) and c.get("sources"):
|
||||
rel = f"{base}{c['name']}.html"
|
||||
if (out / "src" / rel).exists():
|
||||
pages[(c["sources"][0]["fileName"], c["name"])] = rel
|
||||
return pages
|
||||
@@ -388,7 +386,9 @@ class Site:
|
||||
self.gid.update({f["id"]: gid for gid, fns in groups.items() for f in fns})
|
||||
nav.append({page["title"]: self.write_page(page, groups)})
|
||||
home.append(f"- [{page['title']}]({page['id']}/index.md)")
|
||||
ts_nav = [{"TypeScript": "ts/index.md"}] if (self.src / "ts" / "index.md").exists() else []
|
||||
ts_nav = (
|
||||
[{"TypeScript": "ts/index.html"}] if (self.src / "ts" / "index.html").exists() else []
|
||||
)
|
||||
nav.append({"함수 화면": [*ts_nav, {"파이썬": "py/index.md"}]})
|
||||
(self.src / "index.md").write_text("\n".join(home) + "\n", encoding="utf-8")
|
||||
(self.src / ".nav.json").write_text(json.dumps(nav, ensure_ascii=False), encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user