Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom Layout, markdown in Content area not render in preview mode. #3831

Closed
4 tasks done
Kythuen opened this issue Apr 26, 2024 · 5 comments
Closed
4 tasks done
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@Kythuen
Copy link

Kythuen commented Apr 26, 2024

Describe the bug

  • When there is development mode, everything is ok.
  • In preview mode, when coming form a direct route link or refresh page, the markdown of the content do not render.

Reproduction

  • come in page /
  • click button to guide page, then route to page /guide, now is ok.
  • then refresh the page at /guide, the content area not render.

Expected behavior

As for a document website, we often hope others come in through a detail page url.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 14.93 GB / 31.72 GB
  Binaries:
    Node: 20.12.1 - ~\.nvmd\versions\20.12.1\node.EXE
    npm: 10.5.0 - ~\.nvmd\versions\20.12.1\npm.CMD
    pnpm: 8.15.6 - ~\.nvmd\versions\20.12.1\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.19041.3636

Additional context

Validations

@Kythuen Kythuen added the bug: pending triage Maybe a bug, waiting for confirmation label Apr 26, 2024
@Machineric
Copy link

I'm facing this issue as well. Exactly the same situation.

@pclokcer
Copy link

I am facing same error

@pclokcer
Copy link

you can solve with nginx. but I think vitepress need to solve this error

nginx resolve

...
    location / {
        # for example.com/ so unpath requests
        if ($http_:path: = "/") {
                rewrite ^(.*)/$ $1 permanent;
        }

        try_files $uri $uri.html $uri/ =404;

        error_page 404 /404.html;

        error_page 403 /404.html;
    }

@brc-dd
Copy link
Member

brc-dd commented Apr 27, 2024

you're using ClientOnly and Suspense in your layout which will disable SSR for whole app. This is not supported. Use plain vite app if you don't want SSR.

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
@Kythuen
Copy link
Author

Kythuen commented Apr 28, 2024

you're using ClientOnly and Suspense in your layout which will disable SSR for whole app. This is not supported. Use plain vite app if you don't want SSR.

thank you, it worked.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

4 participants