Skip to content

Synchronize URL Hash with Active Section #35

@bae080311

Description

@bae080311

Summary

It's common practice to update the URL hash to reflect the currently active section for shareability and direct linking. The library should provide an option to automatically manage this.

Proposed Solution

Implement a feature that, when enabled, automatically updates window.location.hash to the ID of the currently active section. It should also handle initial load by jumping to the section specified in the URL hash, if present.

Acceptance Criteria

  • When scrolling, window.location.hash updates to the active section's ID.
  • Initial page load with a hash (e.g., /#section-id) correctly scrolls to and activates that section.
  • Option syncHash: boolean or updateUrlHash: boolean is available.
  • Back/forward browser navigation correctly updates the active section based on hash changes.

🤖 Gemini AI가 자동 생성한 기획 이슈입니다. 구현하려면 ai-implement 라벨을 추가하세요.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions