Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this site embeddable into another #68

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ jobs:
uses: actions/checkout@v3

- name: setup deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Get Version
id: vars
run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//')


- name: Setup Node
uses: actions/setup-node@v2
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ jobs:
uses: actions/checkout@v3

- name: setup deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Get Version
id: vars
run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^v//')


- name: Setup Node
uses: actions/setup-node@v2
with:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
uses: actions/checkout@v3

- name: setup deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: format
run: deno fmt --check
Expand All @@ -37,6 +37,4 @@ jobs:
run: deno lint

- name: test
run: |
deno task test
cd www && deno task test
run: deno task test
95 changes: 2 additions & 93 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions www/components/DocsSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function SidebarCategory(props: {

return (
<li class="my-2 block">
<a href={href} class={outerLink}>{title}</a>
<a href={`/${href}`} class={outerLink}>{title}</a>
{entries.length > 0 && (
<ol class="pl-4 list-decimal nested">
{entries.map((entry) => (
Expand All @@ -49,7 +49,7 @@ export function SidebarEntry(props: {

return (
<li class="my-0.5">
<a href={href} class={innerLink}>{title}</a>
<a href={`/${href}`} class={innerLink}>{title}</a>
</li>
);
}
2 changes: 1 addition & 1 deletion www/components/DocsTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default function DocsTitle(props: { title: string }) {
return (
<>
<a
href="."
href="/"
class="text(2xl gray-900) block flex items-center"
>
GraphGen
Expand Down
4 changes: 2 additions & 2 deletions www/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function Header(props: { title: string; active: string }) {

function Logo() {
return (
<a href="." class="flex mr-3 items-center">
<a href="/" class="flex mr-3 items-center">
<img
src="logo.svg"
src="/logo.svg"
alt="GraphGen logo"
width={40}
height={46}
Expand Down
4 changes: 2 additions & 2 deletions www/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function NavigationBar(
const items = [
{
name: "Docs",
href: "docs/introduction",
href: "/docs/introduction",
},
{
name: "Discord",
Expand All @@ -15,7 +15,7 @@ export default function NavigationBar(
];
const isHome = props.active == "/";
return (
<nav class={"flex " + props.class ?? ""}>
<nav class={"flex " + (props.class ?? "")}>
<ul class="flex justify-center items-center gap-4 mx-4 my-6 flex-wrap">
{items.map((item) => (
<li>
Expand Down
3 changes: 1 addition & 2 deletions www/routes/docs/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export default function DocsPage(props: PageProps<Data>) {
<>
<Head>
<title>{props.data.page?.title ?? "Not Found"} | graphgen docs</title>
<base href={props.data.base ?? "/"} />
<link rel="stylesheet" href={`gfm.css?build=${__FRSH_BUILD_ID}`} />
<link rel="stylesheet" href={`/gfm.css?build=${BUILD_ID}`} />
{description && <meta name="description" content={description} />}
</Head>
<div class="flex flex-col min-h-screen">
Expand Down
Loading