Closed arcqiufeng closed 1 year ago
More:
Then I rollback to v1.0.0-alpha.51:
yarn add -D vitepress@1.0.0-alpha.51
It works, outline is back after build.
Can you share your code? Our site is also using the latest version, but we are able to see the outline:
Maybe it is caused by badge.
I notice there is a break change in alpha52.
It really affected me. I have badges in headlines.
Can you add badges in headlines and tried it again?
My code is in LAN, and size is Large.
You mean having just the badge in whole heading? In that case, yeah that heading will be skipped π
Also not asking for the whole code, just a dummy file with 2-3 headings that demonstrates the problem will work.
I will try to reproduce it later.
In the third level of the title, the second level of the title, and there are badges like βto doβ and so on.
It works well in dev mode.
It works well in dev mode.
Ah, ok. Then we need some code to reproduce the problem at our end. Can't suggest a fix without that π
In dev mode, the outline is there. And the badge was perfectly omitted. But it remains in the [[toc]]. Perfect is exactly what I was hoping for.
Now I can reproduce the bug:
Following:
W:\work\2023>md test & cd test
W:\work\2023\test>yarn add -D vitepress
W:\work\2023\test>npx vitepress init
vitepress v1.0.0-alpha.52
β Welcome to VitePress!
β
β Where should VitePress initialize the config?
β ./docs
β
β Site title:
β My Awesome Project
β
β Site description:
β A VitePress Site
β
β Theme:
β Default Theme
β
β Use TypeScript for config and theme files?
β Yes
β
β Add VitePress npm scripts to package.json?
β Yes
β
β Done! Now run npm run docs:dev and start writing.
Now edit the file "markdown-examples.md" that automatically generated. Just add a badge into the title, as following:
## Syntax Highlighting<Badge type="danger" text="caution" />
Now we can test the file:
W:\work\2023\test>yarn docs:dev
yarn run v1.22.19
warning package.json: No license field
$ vitepress dev docs
vitepress v1.0.0-alpha.52
β Local: http://localhost:5173/
β Network: use --host to expose
It works fine in http://localhost:5173/markdown-examples.html
Then I try to build it:
W:\work\2023\test>yarn docs:build
yarn run v1.22.19
warning package.json: No license field
$ vitepress build docs
vitepress v1.0.0-alpha.52
β building client + server bundles...
β rendering pages...
build complete in 19.05s.
Done in 19.83s.
I copied all the stuffs into iis root. (C:\inetpub\wwwroot)
Now: http://127.0.0.1/markdown-examples.html The Page can be displayed but the outline is missing.
I have a similar problem. In v1.0.0-alpha.52, Appearance switch button and custom css work with dev, but fail with preview. #2075
Looks like alpha.53 didn't fix this, looking into it further...
Describe the bug
I upgrade to alpha52 then docs:build. Outline in page missing.
I tried docs:dev, it goes well.
Is it a bug?
Reproduction
I upgrade to alpha52 then docs:build. Outline in page missing.
I tried docs:dev, it is goes well.
Is it a bug?
Expected behavior
docs:dev and docs:build should be the same.
System Info
Additional context
No response
Validations