From 2e5fa98bef656a5acd541f061a915cee5e6e696b Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Fri, 8 Mar 2024 17:24:53 +0000 Subject: [PATCH] base url issues resolved --- astro.config.mjs | 7 ++----- src/components/CustomLink.astro | 7 ++++--- src/components/Menu.tsx | 2 +- src/components/footer.astro | 8 ++++---- src/pages/products/vfit.astro | 2 +- src/ui/card-hover-effect.tsx | 2 +- src/ui/google-gemini-effect.tsx | 2 +- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index 1d24800..73671e3 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -7,10 +7,7 @@ import compress from "astro-compress"; // https://astro.build/config export default defineConfig({ - redirects: { - "/vectoraico.github.io/products": "/vectoraico.github.io/products/vfit" - }, integrations: [tailwind(), icon(), react(), compress()], - site: "https://project-mirage.github.io/vectoraico.github.io/", - base: "/vectoraico.github.io" + site: "https://vectoraico.github.io/", + base: "/", }); diff --git a/src/components/CustomLink.astro b/src/components/CustomLink.astro index 22fe8fe..5404e5c 100644 --- a/src/components/CustomLink.astro +++ b/src/components/CustomLink.astro @@ -1,8 +1,9 @@ --- const { href, ...rest } = Astro.props; -const isExternal = href.startsWith("http://") || href.startsWith("https://"); -const base = ""; +// use if you want to prefix all links with a base +const base = "/vector-ai/"; +const isExternal = href.startsWith("http://") || href.startsWith("https://"); const getPrefixedHref = (href: string) => { // check if already prefixed if (href.startsWith(`/${base}/`)) { @@ -19,6 +20,6 @@ const getPrefixedHref = (href: string) => { }; --- - + diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx index 4e59a83..8128abf 100644 --- a/src/components/Menu.tsx +++ b/src/components/Menu.tsx @@ -78,7 +78,7 @@ export const FloatingNav = ({ {navItems.map((navItem: any, idx: number) => ( = [ { - url: "/vector-ai/", + url: "/", description: "Vectors's official website", icon: "mdi:home", }, @@ -50,10 +50,10 @@ const navItems = [ >
- Vector Logo + Vector Logo
diff --git a/src/pages/products/vfit.astro b/src/pages/products/vfit.astro index b6eb483..47ecef4 100644 --- a/src/pages/products/vfit.astro +++ b/src/pages/products/vfit.astro @@ -90,6 +90,6 @@ import imageTwoAfter from "@/assets/slider_images/2_TryOn.jpg"; - + diff --git a/src/ui/card-hover-effect.tsx b/src/ui/card-hover-effect.tsx index b5adce8..dbfa159 100644 --- a/src/ui/card-hover-effect.tsx +++ b/src/ui/card-hover-effect.tsx @@ -24,7 +24,7 @@ export const HoverEffect = ({ > {items.map((item, idx) => ( setHoveredIndex(idx)} diff --git a/src/ui/google-gemini-effect.tsx b/src/ui/google-gemini-effect.tsx index 5097460..2e3449f 100644 --- a/src/ui/google-gemini-effect.tsx +++ b/src/ui/google-gemini-effect.tsx @@ -82,7 +82,7 @@ export const GoogleGeminiEffect = ({
vector logo