Closed pdanpdan closed 1 year ago
The origin needs to be processed through withBase
withBase
import { useData, withBase } from "vitepress"; https://github.com/emersonbottero/vitepress-plugin-search/blob/faad6292b05428586d42dcafbe2076f64e8e330e/src/Search.vue#L3
import { useData, withBase } from "vitepress";
origin.value = window.location.origin + withBase(locale.value === 'root' ? '/' : locale.value); https://github.com/emersonbottero/vitepress-plugin-search/blob/faad6292b05428586d42dcafbe2076f64e8e330e/src/Search.vue#L81
origin.value = window.location.origin + withBase(locale.value === 'root' ? '/' : locale.value);
Also can you please also remove the index.html in the end of the link?
index.html
fixed in #49
Working as expected ~(except index.html at the end, but that is not a problem)~, thank you :)
sorry - index is also removed in prod, so it's all perfect
The origin needs to be processed through
withBase
import { useData, withBase } from "vitepress";
https://github.com/emersonbottero/vitepress-plugin-search/blob/faad6292b05428586d42dcafbe2076f64e8e330e/src/Search.vue#L3origin.value = window.location.origin + withBase(locale.value === 'root' ? '/' : locale.value);
https://github.com/emersonbottero/vitepress-plugin-search/blob/faad6292b05428586d42dcafbe2076f64e8e330e/src/Search.vue#L81Also can you please also remove the
index.html
in the end of the link?