Skip to content

Commit

Permalink
Update basepath to root for deployment target
Browse files Browse the repository at this point in the history
  • Loading branch information
GDWR committed Dec 21, 2023
1 parent b28dd7d commit 3659d29
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ let yakshaGrammar = await resp.json();

// https://astro.build/config
export default defineConfig({
site: 'https://gdwr.github.io',
base: '/yakshalang.github.io',
site: 'https://yakshalang.github.io',
base: '/',
integrations: [tailwind(), mdx()],
markdown: {
shikiConfig: {
Expand Down
2 changes: 1 addition & 1 deletion public/static_demos/space_blast/space_blast.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<footer class="footer footer-center bg-base-100 text-base-content fill-base-content">
<aside>
<img src="/yakshalang.github.io/imgs/yaksha_logo.png" class="w-24 mt-8" />
<img src="/imgs/yaksha_logo.png" class="w-24 mt-8" />
<div>
<p class="font-bold">Yaksha - The Programming Language</p>
<p>Copyright (C) 2023 Bhathiya Perera</p>
Expand Down
32 changes: 16 additions & 16 deletions src/components/NavBar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import LightSwitch from "./LightSwitch.astro";
const pathname = new URL(Astro.request.url).pathname;
const currentPageRegex = /\/yakshalang.github.io\/([^\/]*)/;
const currentPageRegex = /\/([^\/]*)/;
const matches = currentPageRegex.exec(pathname);
const currentPath = matches ? matches[1] : "";
Expand All @@ -12,7 +12,7 @@ const activePageStyling = (path: string) => path == currentPath ? "text-secondar

<nav class="sticky top-0 bg-base-100 z-40 w-full">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<img src="/yakshalang.github.io/imgs/yk-banner1.png" class="h-12" alt="Yaksha Banner" />
<img src="/imgs/yk-banner1.png" class="h-12" alt="Yaksha Banner" />

<!-- For small devices use consise burger menu, basically just phones -->
<details class="dropdown dropdown-end md:hidden">
Expand All @@ -22,30 +22,30 @@ const activePageStyling = (path: string) => path == currentPath ? "text-secondar
</svg>
</summary>
<ul class="p-2 shadow menu dropdown-content z-[1] bg-base-100 rounded-box w-52">
<li><a href="/yakshalang.github.io/">Home</a></li>
<li><a href="/yakshalang.github.io/lib">Lib</a></li>
<li><a href="/yakshalang.github.io/docs">Docs</a></li>
<li><a href="/yakshalang.github.io/tutorials">Tutorials</a></li>
<li><a href="/yakshalang.github.io/demos">Demos</a></li>
<li><a href="/">Home</a></li>
<li><a href="/lib">Lib</a></li>
<li><a href="/docs">Docs</a></li>
<li><a href="/tutorials">Tutorials</a></li>
<li><a href="/demos">Demos</a></li>
<li><a href="https://yaksha.pages.dev/">Playground</a></li>
<li><a href="/yakshalang.github.io/yama">YAMA</a></li>
<li><a href="/yakshalang.github.io/blog">Blog</a></li>
<li><a href="/yama">YAMA</a></li>
<li><a href="/blog">Blog</a></li>
</ul>
</details>

<!-- For larger screen devices like desktops -->
<div class="hidden w-full md:block md:w-auto">
<div class="flex rounded-lg space-x-4 text-lg">
<a href="/yakshalang.github.io/" class={`${activePageStyling("")} hover:text-primary`}>Home</a>
<a href="/yakshalang.github.io/lib" class={`${activePageStyling("lib")} hover:text-primary`}>Lib</a>
<a href="/yakshalang.github.io/docs" class={`${activePageStyling("docs")} hover:text-primary`}>Docs</a>
<a href="/" class={`${activePageStyling("")} hover:text-primary`}>Home</a>
<a href="/lib" class={`${activePageStyling("lib")} hover:text-primary`}>Lib</a>
<a href="/docs" class={`${activePageStyling("docs")} hover:text-primary`}>Docs</a>
<div class="divider divider-horizontal divider-primary" />
<a href="/yakshalang.github.io/tutorials" class={`${activePageStyling("tutorials")} hover:text-primary`}>Tutorials</a>
<a href="/yakshalang.github.io/demos" class={`${activePageStyling("demos")} hover:text-primary`}>Demos</a>
<a href="/tutorials" class={`${activePageStyling("tutorials")} hover:text-primary`}>Tutorials</a>
<a href="/demos" class={`${activePageStyling("demos")} hover:text-primary`}>Demos</a>
<a href="https://yaksha.pages.dev/" class={`${activePageStyling("playground")} hover:text-primary`}>Playground</a>
<div class="divider divider-horizontal divider-primary" />
<a href="/yakshalang.github.io/blog" class={`${activePageStyling("blog")} hover:text-primary`}>Blog</a>
<a href="/yakshalang.github.io/yama" class={`${activePageStyling("yama")} hover:text-primary`}>YAMA</a>
<a href="/blog" class={`${activePageStyling("blog")} hover:text-primary`}>Blog</a>
<a href="/yama" class={`${activePageStyling("yama")} hover:text-primary`}>YAMA</a>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const { title, description } = Astro.props;
<head>
<meta charset="UTF-8" />
<meta name="theme-color" content="#9a2036">
<meta property="og:image" content="/yakshalang.github.io/imgs/yaksha_logo.png">
<meta property="og:image" content="/imgs/yaksha_logo.png">
<meta name="description" content={description ?? "Yaksha Programming Language"} />
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/png" href="/yakshalang.github.io/favicon.ico" />
<link rel="icon" type="image/png" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demos/0001-tree.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Fractal Tree
author: Bhathiya Perera
layout: "../../layouts/DemoLayout.astro"
description: "a Fractal Tree created with Yaksha and Raylib!"
demoJs: "/yakshalang.github.io/static_demos/tree/wind_tree.js"
demoJs: "/static_demos/tree/wind_tree.js"
---

Hint: Refresh to get a new random tree
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demos/0002-space-blast.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Space Blast
author: Bhathiya Perera
layout: "../../layouts/DemoLayout.astro"
description: "A interactive 2d Space Shooter game in Yaksha with Raylib!"
demoJs: "/yakshalang.github.io/static_demos/space_blast/space_blast.js"
demoJs: "/static_demos/space_blast/space_blast.js"
---

Hint: You need a keyboard to play this
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demos/0003-gui.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Gui
author: Bhathiya Perera
layout: "../../layouts/DemoLayout.astro"
description: "Creating Graphical User Interfaces with Yaksha and Raylib!"
demoJs: "/yakshalang.github.io/static_demos/gui/gui_window.js"
demoJs: "/static_demos/gui/gui_window.js"
---

Try pressing the counter buttons
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demos/0004-wasm4-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: WASM4 Notes
author: Bhathiya Perera
layout: "../../layouts/DemoLayout.astro"
description: "A Note synthesiser application using Yaksha and WASM4!"
demoHtml: "/yakshalang.github.io/static_demos/notes_wasm4/notes.html"
demoHtml: "/static_demos/notes_wasm4/notes.html"
---

Hint: Something like Nokia ringtone maker for WASM4
Expand Down
2 changes: 1 addition & 1 deletion src/pages/demos/0005-wasm4-snake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: WASM4 Snake
author: Bhathiya Perera
layout: "../../layouts/DemoLayout.astro"
description: "Snake using Yaksha and WASM4!"
demoHtml: "/yakshalang.github.io/static_demos/snake_wasm4/snake.html"
demoHtml: "/static_demos/snake_wasm4/snake.html"
---

Hint: Snake game in Yaksha for WASM4 (ported)
Expand Down
8 changes: 4 additions & 4 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import Layout from '../layouts/Layout.astro';
<span class="text-xs md:text-lg">programing language with <a class="font-black text-secondary">off-side rule</a> syntax.</span>
</p>

<img src="/yakshalang.github.io/imgs/typing_code_yaksha.gif" class="h-44 rounded-xl md:h-96"/>
<img src="/imgs/typing_code_yaksha.gif" class="h-44 rounded-xl md:h-96"/>
</div>

<div class="divider divider-base-300 w-3/4 mx-auto md:w-1/2"/>

<div class="flex justify-center gap-8 py-8 px-8 md:px-0">
<img src="/yakshalang.github.io/imgs/code_scroll_yaksha.gif" class="h-44 rounded-xl md:h-96"/>
<img src="/imgs/code_scroll_yaksha.gif" class="h-44 rounded-xl md:h-96"/>

<div class="divide-y divide-dotted">
<p class="font-mono text-xl my-auto pb-4 md:text-4xl">
Expand All @@ -41,13 +41,13 @@ import Layout from '../layouts/Layout.astro';
A randomly generated tree moving in the wind.
</p>
</div>
<img src="/yakshalang.github.io/imgs/wind_tree.gif" class="h-44 rounded-xl md:h-96"/>
<img src="/imgs/wind_tree.gif" class="h-44 rounded-xl md:h-96"/>
</div>

<div class="divider divider-base-300 w-3/4 mx-auto md:w-1/2"/>

<div class="flex justify-center gap-8 pt-8 pb-16 px-8 md:px-0">
<img src="/yakshalang.github.io/imgs/carpntr_tool_run.gif" class="h-44 rounded-xl md:h-96"/>
<img src="/imgs/carpntr_tool_run.gif" class="h-44 rounded-xl md:h-96"/>
<div class="divide-y divide-dotted">
<p class="font-mono text-xl my-auto pb-2 md:text-4xl">
A versatile new tool
Expand Down

0 comments on commit 3659d29

Please sign in to comment.