Skip to content

[docs]: add scrollOffset in site config documentation #4291

@Barbapapazes

Description

@Barbapapazes

Describe the bug

Hello 👋,

Not really a bug but an API missing in the documentation. I'm building a custom theme and it took me an hour to understand why a scroll-margin-top does not affect the scroll. It seems the router overwrite it with a custom value offset, defined for the documentation theme (134px). For a custom theme this value will change but I found nothing in the documentation.

See the link below that shows all references to scrollOffset. The option exists but not in the documentation.

Reproduction

https://github.com/search?q=repo%3Avuejs%2Fvitepress%20scrollOffset&type=code

Expected behavior

I expect the documentation to have this API explained.

System Info

https://vitepress.dev/reference/site-config#site-config

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomeThe team would welcome a contribution from the community for this issuedocsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions