-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Specify the different entry file rather than index.md #1429
Conversation
Signed-off-by: GurkiranSingh <[email protected]>
Signed-off-by: GurkiranSingh <[email protected]>
src/node/serve/serve.ts
Outdated
res.statusCode = 404 | ||
if (notAnAsset(req.path)) res.write(notFound.toString()) | ||
res.end() | ||
if (site.site.entry !== 'index' && req.path === '/') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but this logic won't work when someone is deploying their site. It only works with our custom server which is only suitable for previewing the website locally after build. The servers specifically need index.html
to be present. That being said, we need to build entry
as if it was index.md
(and emit index.html
).
VuePress has probably done this using their permalink feature, which is still missing in VitePress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I was worried by this too. I will look into VuePress implementation for this.
Signed-off-by: GurkiranSingh <[email protected]>
Signed-off-by: GurkiranSingh <[email protected]>
Signed-off-by: GurkiranSingh <[email protected]>
@brc-dd If user specifies the different |
Signed-off-by: GurkiranSingh [email protected]
User can specify different entry rather
index.md
by using theentry
config option. Please, let me know if you see any issues :)Resolves: #280