core
core copied to clipboard
feat(core)!: remove headers field from page data
This reduces page data size by removing headers info from page data, downstream themes can infer headers via dom structure with @vuepress/helper and they can manually write it to page data if necessary.
Pull Request Test Coverage Report for Build 13690291830
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 71.722%
| Totals | |
|---|---|
| Change from base Build 13616164910: | 0.0% |
| Covered Lines: | 648 |
| Relevant Lines: | 906 |
💛 - Coveralls
Then the markdown.headers option should default to false?
Could headers be server-side rendered after the change?
I think the header information might still be required on the page object, but we should no longer pass it to client data by default.
I see. What about SSR? Seems that helper pkg is using DOM api to get headers.
A toc is not needed for ssr I think. VitePress is doing the same, the full content dom is already rendered.
I think this can be merged