vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.51k stars 4.76k forks source link

The home page repeat render twice #3207

Open brycenhe opened 6 months ago

brycenhe commented 6 months ago

Bug report

Hi,I met a issue,but I don not know why and know if this is a bug or something. My project works fine in local development mode, local packaging deployment, and online testing environment. But after being released in the production environment, the homepage is rendered twice, and you can also see the homepage when scrolling down on other pages. I tried deploying the production environment package locally, there is no problem.

project url:https://www.jaka.com/docs/

sorry for no source code support.

Does anyone have any ideas? Could it be a problem with the CDN cache? This project was previously upgraded from vuepress 1.x to vuepress 2.x.

Steps to reproduce

What is expected?

The home page should be rendered once.

What is actually happening?

Actually, it was rendered twice.

Other relevant information

Before, there were no issues with vuepress 1.x, but problems started occurring after upgrading to 2.x.

"devDependencies": { "@vuepress/bundler-vite": "2.0.0-rc.9", "@vuepress/theme-default": "2.0.0-rc.21", "artplayer": "^5.1.1", "dashjs": "^4.7.4", "hls.js": "^1.5.7", "mpegts.js": "^1.7.3", "vidstack": "^1.10.9", "vue": "^3.4.21", "vuepress": "2.0.0-rc.9", "vuepress-plugin-search-pro": "2.0.0-rc.32", "vuepress-theme-hope": "2.0.0-rc.32" }

bn-l commented 6 months ago

Just FYI this repo is deprecated and will continue to accrue security and dependency deprecation issues.

From the readme:

VuePress is now in maintenance mode. For a next-gen Vue-based SSG built on top of Vue 3 + Vite, check out VitePress.

It is frustrating that a google for vuepress goes to vuepress 1.x and there is no clear mention you are on a deprecated project. Almost like putting the gun in your hand, pointing it at your foot and saying "you should be more careful!"

This is "vuepress-next": https://v2.vuepress.vuejs.org/

brycenhe commented 5 months ago

It was resolved. The issue occurred due to HTML optimization being enabled when deployed to the production environment, resulting in key tags being optimized out.