배포 안내
이 문서 사이트는 가족 약정에 따라 www.lhgb.top의 /lhui/core/ 접두사 아래에 배포됩니다(android / ios / harmony / windows 네 사이트와 동일한 체계).
사이트 프레임워크는 Astro Starlight입니다(2026-10-12에 VitePress에서 마이그레이션, 선정 기록은 문서 사이트 기술 선정 참고).
pnpm docs:build산출물은 docs/dist/에 있습니다(astro.config.mjs의 outDir: 'docs/dist'로 명시적으로 지정, codegen의 리포지터리 루트 dist/를 의도적으로 피함, 레드라인 6 참고. .gitignore에 포함되어 버전 관리에서 제외).
배포 관련 설정은 모두 docs/astro.config.mjs에 있습니다.
| 설정 항목 | 값 | 설명 |
|---|---|---|
site |
https://www.lhgb.top |
sitemap과 SEO의 사이트 출처 |
base |
/lhui/core/ |
배포 접두사, 시작과 끝에 슬래시 필수 |
build.format |
'file' |
page/index.html 대신 page.html을 산출, 가족 nginx 계약에 맞춤 |
trailingSlash |
'never' |
Starlight가 담당, format: 'file'과 함께 사용 |
업로드
섹션 제목: “업로드”docs/dist/의 내용을 서버 디렉터리 /home/webuser/nginx/lh-ui/core/에 업로드합니다.
nginx 설정
섹션 제목: “nginx 설정”location ^~ /lhui/core/ { alias /home/webuser/nginx/lh-ui/core/; index index.html; try_files $uri $uri.html $uri/ /lhui/core/index.html;}가족에서 채험한 세 가지 계약(Starlight 마이그레이션 후에도 여전히 유효함을 항목별로 확인):
try_files폴백에 base 접두사가 필수(/lhui/core/index.html). 그렇지 않으면 딥 링크 새로고침 시 404가 납니다.alias의 끝 슬래시는 생략할 수 없으며,location ^~ /lhui/core/와 짝지어 사용합니다.$uri.html이 필수 — 이 사이트는build.format: 'file'로page.html형태를 산출하므로(URL은/lhui/core/page, 끝 슬래시 없음) nginx가$uri.html로 실제 파일을 찾습니다. 이것을 빼면 딥 링크가 404가 됩니다.
배포 후 자체 점검
섹션 제목: “배포 후 자체 점검”curl -I https://www.lhgb.top/lhui/core/guide/introductiongrep -c "lhui/core" docs/dist/index.html # 0보다 커야 함# 역방향 어서션: 산출물에 base가 빠진 사이트 내부 링크가 없어야 함(일치 수는 0이어야 함)grep -rcE 'href="/(guide|tokens|specs|cases|codegen|artifacts)/' docs/dist/ | grep -v ':0$' || echo OK로컬 미리보기
섹션 제목: “로컬 미리보기”pnpm docs:dev # http://localhost:5185/lhui/core/pnpm docs:preview # 프로덕션 빌드로 미리보기, 마찬가지로 base 접두사 포함Astro의 base는 dev server에서도 동일하게 적용됩니다(VitePress처럼 .env.development로 DOCS_BASE=/를 구분하는 방식과 다름). 따라서 로컬 경로에도 /lhui/core/ 접두사가 붙습니다 — 로컬과 프로덕션의 URL 구조가 완전히 동일하여, 예전의 “로컬에는 접두사 없음, 프로덕션에는 접두사 있음”이라는 인지 부담이 사라졌습니다.
포트 할당
섹션 제목: “포트 할당”| 리포지터리 | dev 포트 | base |
|---|---|---|
| lh-ui-vue2 | 5177 | /lhui/vue2/ |
| lh-ui-plus | 5178 | /lhui/vue3/ |
| lh-ui-react | 5179 | /lhui/react/ |
| lh-ui-uniapp | 5187 | /lhui/uniapp/ |
| lh-ui-android | 5181 | /lhui/android/ |
| lh-ui-ios | 5182 | /lhui/ios/ |
| lh-ui-harmony | 5183 | /lhui/harmony/ |
| lh-ui-windows | 5186 | /lhui/windows/ |
| lh-ui-core(이 사이트) | 5185 | /lhui/core/ |
가족 배포의 권위 있는 참고 자료는 lh-ui/docs 리포지터리의 部署/nginx-lhui.conf.md에 있습니다. 이 문서는 이 리포지터리에서 보관하는 운영 매뉴얼입니다. 배포가 반영된 뒤에는 가족 총괄 표를 함께 업데이트해야 합니다(이번 변경에는 리포지터리 간 수정이 포함되지 않습니다).
Copyright © 2024-2026 FengMo WenXue