Skip to content

Commit

Permalink
Adjust paths
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzarius committed Jul 16, 2024
1 parent 6af707a commit f3159d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import sitemap from "@astrojs/sitemap";
const config =
import.meta.env.MODE === "development"
? defineConfig({
site: "http://localhost:4321",
base: "/",
integrations: [mdx(), sitemap()],
output: "static",
})
: defineConfig({
site: "https://adaptdk.github.io",
base: "/speculationrules",
base: "/speculationrules/",
integrations: [mdx(), sitemap()],
output: "static",
});
Expand Down
7 changes: 4 additions & 3 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Props {
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
const base = import.meta.env.BASE_URL;
---

<!-- Global Metadata -->
Expand All @@ -23,14 +24,14 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<!-- Font preloads -->
<link
rel="preload"
href="/fonts/atkinson-regular.woff"
href="fonts/atkinson-regular.woff"
as="font"
type="font/woff"
crossorigin
/>
<link
rel="preload"
href="/fonts/atkinson-bold.woff"
href="fonts/atkinson-bold.woff"
as="font"
type="font/woff"
crossorigin
Expand All @@ -43,7 +44,7 @@ const { title, description, image = "/blog-placeholder-1.jpg" } = Astro.props;
<title>{title}</title>
<meta name="title" content={title} />
<meta name="description" content={description} />
<base href={import.meta.env.BASE_URL} />
<base href={base} />

<script type="speculationrules">
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HeaderLink from "./HeaderLink.astro";
<nav>
<!-- <h3>{locals?.prerender ? "Prerendered" : ""}</h3> -->
<ul class="internal-links">
<HeaderLink class="prerender-immediate" href="/"
<HeaderLink class="prerender-immediate" href="./"
>Prerender immediate</HeaderLink
>
<HeaderLink
Expand Down
4 changes: 2 additions & 2 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
}
@font-face {
font-family: 'Atkinson';
src: url('/fonts/atkinson-regular.woff') format('woff');
src: url('fonts/atkinson-regular.woff') format('woff');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Atkinson';
src: url('/fonts/atkinson-bold.woff') format('woff');
src: url('fonts/atkinson-bold.woff') format('woff');
font-weight: 700;
font-style: normal;
font-display: swap;
Expand Down

0 comments on commit f3159d1

Please sign in to comment.