vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.47k stars 1.86k forks source link

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

Closed Kythuen closed 2 weeks ago

Kythuen commented 2 weeks ago

Describe the bug

Reproduction

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

Machineric commented 2 weeks ago

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

pclokcer commented 2 weeks ago

I am facing same error

pclokcer commented 2 weeks ago

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 commented 2 weeks ago

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.

Kythuen commented 2 weeks ago

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.