Skip to content

Commit

Permalink
feat: add graphql query for jaenPage and allJaenPage in docs.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn authored May 23, 2024
1 parent 5d789c5 commit badaecc
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/pages/docs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import { Link, HeadFC, PageProps } from "gatsby";
import { Link, HeadFC, PageProps, graphql } from "gatsby";
import { PageConfig } from "@atsnek/jaen";

const Page: React.FC<PageProps> = () => {
Expand All @@ -14,3 +14,29 @@ export const pageConfig: PageConfig = {
label: "Docs",
childTemplates: ["DocPage"],
};

export const query = graphql`
query ($jaenPageId: String!) {
jaenPage(id: { eq: $jaenPageId }) {
...JaenPageData
childPages {
...JaenPageChildrenData
}
}
allJaenPage(filter: { id: { in: ["JaenPage /docs/"] } }) {
nodes {
id
childPagesOrder
jaenPageMetadata {
title
blogPost {
category
}
}
childPages {
...JaenPageChildrenData
}
}
}
}
`;

0 comments on commit badaecc

Please sign in to comment.