Skip to content

Commit

Permalink
fix: base url stuff (#75)
Browse files Browse the repository at this point in the history
* fix: base url stuff

* chore: revert unnecessary package
  • Loading branch information
jolexxa authored Sep 16, 2024
1 parent b707d44 commit b4db292
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import mdx from "@astrojs/mdx";
import react from "@astrojs/react";
import starlight from "@astrojs/starlight";
import { defineConfig } from "astro/config";

import tailwind from "@astrojs/tailwind";
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -57,7 +56,7 @@ export default defineConfig({
{
label: "🦄 Very Good Engineering",
autogenerate: {
directory: "very_good_engineering",
directory: "engineering",
},
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/components/vgv_footer/vgv-footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface Props {
}
const { compact = false } = Astro.props;
const base = import.meta.env.BASE_URL;
---

<div
Expand All @@ -31,7 +32,7 @@ const { compact = false } = Astro.props;
<a href="https://verygood.ventures/testimonials">Testimonials</a>
<a href="https://verygood.ventures/careers">Careers</a>
<a href="https://verygood.ventures/success-stories">Our Work</a>
<a href="/">Engineering</a>
<a href={base}>Engineering</a>
</div>
</section>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/vgv_nav/vgv-nav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import ThemeSelect from "@astrojs/starlight/components/ThemeSelect.astro";
import type { Props } from "@astrojs/starlight/props";
// Only show docs link from homepage
const shouldShowLinks = Astro.url.pathname === "/";
const base = import.meta.env.BASE_URL;
const shouldShowLinks = Astro.url.pathname === base + "/";
---

<header class="fixed top-0 w-[100%] transition-all backdrop-blur-2xl z-20">
Expand All @@ -25,7 +26,7 @@ const shouldShowLinks = Astro.url.pathname === "/";
{
shouldShowLinks && (
<a
href="/architecture"
href={`${base}/engineering/philosophy`}
class="sm:ml-4 md:ml-8 mx-4 mt-[1px] flex text-lg no-underline hover:underline visited:text-inherit active:text-inherit"
>
Docs
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import financialDashboard from "./home/demos/financial_dashboard.png";
import vehicleCockpit from "./home/demos/vehicle_cockpit.png";
import hero from "./home/very_good_engineering.png";
const base = import.meta.env.BASE_URL;
const props = await generateStarlightPageRouteData({
props: {
...Astro.props,
Expand All @@ -40,7 +42,7 @@ const props = await generateStarlightPageRouteData({
actions: [
{
text: "Read the Best Practices",
link: "/very_good_engineering/philosophy/",
link: `${base}/engineering/philosophy`,
icon: "right-arrow",
variant: "primary",
},
Expand Down

0 comments on commit b4db292

Please sign in to comment.