vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

fix(client): avoid updating existing head tags, close #1268 #1314

Closed Mister-Hope closed 6 months ago

Mister-Hope commented 1 year ago

@meteorlxy Need some help here, the id is recalculated many times, and I am thinking if we can add a new type called ResolvedHeadConfig besides HeadConfig while has the id attribute?

The changes need to be applied in @vuepress/shared. and it may affect pageHeadResolver and PageHead .

If you think it's fine for use to do this breaking change, I can update this pr.

Also I am thinking if we could drop support of boolean attribute value.

jcwangxp commented 1 year ago

@meteorlxy the js reload issue causes wired behavior, and we need this bug to be fixed, so could you help to review and get it fixed?

meteorlxy commented 1 year ago

Some alternative improvement:

meteorlxy commented 9 months ago

ref: https://github.com/vuejs/vitepress/pull/3017

Mister-Hope commented 7 months ago

@meteorlxy Maybe a review of this pr?

meteorlxy commented 7 months ago

@Mister-Hope e2e failed for some reason. Also meet the error when testing locally. Try cd e2e && pnpm e2e:dev

Mister-Hope commented 7 months ago

I give up this pr, the problem is that in production, head tag already exisits in <head>, while on devServer it's not, I can not find a graceful way to bypass this right now.