Skip to content

How to load public file before initialization? #3990

Answered by brc-dd
ZhongxuYang asked this question in Q&A
Discussion options

You must be logged in to vote

That is likely not possible. VitePress is a "static" site generator. If you want to update the navbar, sidebar, etc. dynamically you'll need to write your own components that fetch runtime.json and generate them on each load. The config file is only loaded during build.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ZhongxuYang
Comment options

@brc-dd
Comment options

Answer selected by ZhongxuYang
@ZhongxuYang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants