-
In vuepress I was able to just upload But in vitepress I can't find a way to do this. The custom index is accessible via First I've tried wrapping the HTML page inside a vue template component and injecting it to I've tried using route rewrites, but they don't seem to support routing to static html pages. I feel it should be possible to override routing with import Theme from "vitepress/theme";
import "./style.css";
export default {
...Theme,
enhanceApp({ app, router, siteData }) {
router.addRoute({ path: "/", redirect: "/public/index.html" });
}
}; — but it throws "router.addRoute is not a function", even though it should be judging by https://router.vuejs.org/api/interfaces/Router.html#Methods-addRoute. Would be very grateful for any hints on how this could be achieved. Basically, I just need domain root to redirect to a custom static HTML, while everything else should work by default. I'm aware it's possible with URL rewriting on HTTP server side, but I'm hosting the app on github pages, so that's not possible. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Move public directory outside the .vitepress directory |
Beta Was this translation helpful? Give feedback.
-
Solved in #2426 |
Beta Was this translation helpful? Give feedback.
Solved in #2426