Closed florian-sattler closed 3 weeks ago
It seems like a hydration mismatch. Can you share this using a repo or https://vitepress.new
Same for me, when you go on the nested page through the link directly, the layout breaks. When you go through the home page, the layout is correct. Using 1.0.2. Strangely, happens only in production in docker for me, in dev and with preview locally it seems fine.
@mikeboe Can you share the link where you've hosted it? In your docker setup are you running nginx? Can you share it's configuration?
Can I share somewhere privately?
Yeah I'm on discord (#vitepress channel).
Looks like your server is serving home page for all pages. How are you hosting your site? Have you added some rewrite rule on cloudflare or something?
You're right, I have an error in nginx configuration, now it works. Thanks man.
I'm also running an Nginx stack. This could very well be the problem. I will investigate this and get back to you.
Would it make sense to add a 'docker' section to the deployment section of the docs? I imagine other people might also run this page inside a container. I would be happy to create a pull request with a first draft of the new section.
This did the job for me: add nginx config example #3235. I was missing $uri.html
in the nginx conf.
server {
listen 80;
location / {
root /app/build;
index index.html;
try_files $uri $uri/ $uri.html =404;
}
}
I can confirm this is a nginx issue. I erroneously served index.html
as a backup, which in turn loaded the article with the wrong page initialization as described above.
@brc-dd Should I propose a docs section?
Yeah, contributions are welcome. Thanks!
Just add Nginx's routing related config there. Other stuff and dockerfile, etc. is probably not needed. You can pick whatever works best from this thread or #3235 or #2837.
@brc-dd I hope this meets your expectations. Let me know if improvements are needed!
Describe the bug
First of all: Thank you all very much for your work on this amazing software! ๐
When navigating to page using a direkt link the sidebar overlap the content of the page:
However when accessing the page from the main page, everything looks normal:
The problem seems to be caused by a missing class on two elements. Take a look at the developer console:
Broken:
Working:
Notice how the class
.has-sidebar
is missing on the first (.VPLocalNav
) and third element (#VPContent
) below the header (.VPNav
)When manually adding this class in the browers dev tools the site looks normal again ๐
Reproduction
See above.
Expected behavior
The sidebar should be located on the side not above the page content.
System Info
Additional context
No response
Validations