Skip to content

Commit

Permalink
ci: fix base url
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Dec 28, 2024
1 parent 49ef2b7 commit 2e78aff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install and Build
run: |
pnpm i --frozen-lockfile
pnpm build
pnpm build --base=/docs-template/
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Sidebar({ items = [], initialValue = "" } = {}) {
function SidebarItem({ item, active, onPress }) {
return (
<li class="w-fit">
<a href={item.key} onClick={onPress} class="group text-zinc-600">
<a href={"/" + item.key} onClick={onPress} class="group text-zinc-600">
{item.label}
<span
class={`block max-w-0 group-hover:max-w-full transition-all duration-500 h-0.5 bg-black ${
Expand Down
6 changes: 3 additions & 3 deletions src/content/data.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { lazy } from "preact-iso";

export const sideBar = {
quickStart: {
"quick-start": {
order: 0,
label: "Quick Start",
source: lazy(() => import("./quick-start.mdx")),
key: "quick-start",
},
about:{
about: {
order: 1,
label: "About",
source: lazy(() => import("./about.mdx")),
key: "about",
}
},
};
2 changes: 1 addition & 1 deletion src/pages/$content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import BaseLayout from "../layouts/base";

export default function ContentPage() {
const route = useRoute();
const Content = sideBar[route.params.content].source;
const Content = sideBar[route.params.content]?.source || (() => <></>);
return (
<BaseLayout sideBarItems={sideBar}>
<Content />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BaseLayout from "../layouts/base";

const AllContent = () =>
Object.keys(sideBar).map((d, i) => {
const Component = sideBar[d].source;
const Component = sideBar[d]?.source || (() => <></>);
const classList = i > 0 ? "mt-12 pt-12" : "";
return <Component class={classList} />;
});
Expand Down

0 comments on commit 2e78aff

Please sign in to comment.