Skip to content

TOC 가 없는 페이지에 오른쪽 상단의 언어 선택기 컴포넌트가 표시되지 않습니다 #526

Description

@jk-kim0

문제

TOC(Table of Contents)가 없는 페이지에서 오른쪽 상단의 언어 선택기 컴포넌트가 표시되지 않습니다.

재현 방법

원인 분석

src/components/language-selector.tsx에서 언어 선택기는 nav.nextra-toc 요소를 찾아서 삽입합니다:

const tocContainer = document.querySelector('nav.nextra-toc');
if (tocContainer && !tocContainer.querySelector('.language-selector-toc')) {
  // 언어 선택기 삽입
}
  • installation 페이지: # 제품 설치 하나의 헤딩만 존재 → TOC 미생성 → 언어 선택기 미표시
  • support 페이지: 여러 하위 헤딩(###, ####) 존재 → TOC 생성 → 언어 선택기 표시

해결 방안

  1. 컴포넌트 수정: TOC가 없을 때도 언어 선택기가 표시되도록 대체 컨테이너 사용
  2. 문서 구조 변경: 해당 페이지에 하위 헤딩 추가하여 TOC 생성 유도

관련 파일

  • src/components/language-selector.tsx
  • src/content/*/installation.mdx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions