Skip to content

Commit cb5a619

Browse files
committed
(build) fixed use of page.slug which should now be page.id
1 parent 86344cc commit cb5a619

File tree

10 files changed

+35
-42
lines changed

10 files changed

+35
-42
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"@astrojs/starlight": "^0.31.0",
1616
"@astrojs/starlight-tailwind": "^3.0.0",
1717
"@astrojs/tailwind": "^5.1.4",
18-
"@effect/platform-node": "^0.68.2",
19-
"astro": "^5.1.6",
18+
"@effect/platform-node": "^0.70.0",
19+
"astro": "^5.1.7",
2020
"date-fns": "^4.1.0",
21-
"effect": "^3.12.2",
21+
"effect": "^3.12.5",
2222
"sharp": "^0.33.5",
2323
"tailwindcss": "^3.4.17",
2424
"typescript": "^5.7.3",
25-
"vitest": "^2.1.8",
25+
"vitest": "^3.0.2",
2626
"xml-js": "^1.6.11"
2727
}
2828
}

src/components/GrArxivPage.astro

-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import { format } from 'date-fns';
44

55
import {extractArxivID, getPaper} from '../lib/arxiv'
66

7-
import LinkSpan from './LinkSpan.astro'
8-
97
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
10-
import { Icon } from '@astrojs/starlight/components';
118

129
const props = Astro.props;
1310

src/components/GrSiteFooter.astro

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
22
import type { Props } from '@astrojs/starlight/props';
3-
import EditLink from '@astrojs/starlight/components/EditLink.astro';
4-
import LastUpdated from '@astrojs/starlight/components/LastUpdated.astro';
5-
import Pagination from '@astrojs/starlight/components/Pagination.astro';
63
import { Image } from 'astro:assets';
74
import neo4jLogoImage from "../assets/images/neo4j-logo-white.png";
85
---

src/components/NamedIcon.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ interface Props {
1818
class?: string;
1919
}
2020
21-
const { name, label, size = '1em', color } = Astro.props;
22-
const a11yAttrs = label ? ({ 'aria-label': label } as const) : ({ 'aria-hidden': 'true' } as const);
21+
const { name } = Astro.props;
22+
// const a11yAttrs = label ? ({ 'aria-label': label } as const) : ({ 'aria-hidden': 'true' } as const);
2323
---
2424

2525
{localIconNames.includes(name) ? (<GrIcon name={name as LocalIconNames} />) : (<SlIcon name={name as SlIconNames}/>)}

src/content/config.ts

+21-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
import { z, defineCollection } from 'astro:content';
1+
import { defineCollection } from 'astro:content';
22
import { docsSchema } from '@astrojs/starlight/schema';
33
import { docsLoader } from '@astrojs/starlight/loaders';
4+
// import { file } from "astro/loaders";
5+
6+
// const researchCollection = defineCollection({
7+
// loader: file("src/data/papers.json"),
8+
// schema: z.object({
9+
// title: z.string(),
10+
// canonicalURL: z.string().url()
11+
// })
12+
// })
413

5-
const researchCollection = defineCollection({
6-
type: 'data',
7-
schema: z.object({
8-
title: z.string(),
9-
canonicalURL: z.string().url()
10-
})
11-
})
1214

1315
export const collections = {
14-
docs: defineCollection({ loader: docsLoader(),schema: docsSchema() }),
15-
research: researchCollection
16+
docs: defineCollection({
17+
loader: docsLoader(),
18+
schema: docsSchema()
19+
}),
20+
// research: defineCollection({
21+
// loader: file("src/data/papers.json"),
22+
// schema: z.object({
23+
// title: z.string(),
24+
// canonicalURL: z.string().url()
25+
// })
26+
// })
1627
};

src/content/docs/reference/index.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Finding the perfect GraphRAG pattern for your application isn’t straightforwar
1515
### GraphRAG Patterns
1616

1717
<ul>
18-
{pages.filter(page => page.slug.indexOf("/graphrag/")!=-1).map(page => (
19-
<li key={page.slug}>
20-
<a href={"/"+page.slug}>{page.data.title}</a>
18+
{pages.filter(page => page.id.indexOf("/graphrag/")!=-1).map(page => (
19+
<li key={page.id}>
20+
<a href={"/"+page.id}>{page.data.title}</a>
2121
</li>
2222
))}
2323
</ul>
2424

2525
### Knowledge Graph Models
2626

2727
<ul>
28-
{pages.filter(page => page.slug.indexOf("/knowledge-graph/")!=-1).map(page => (
29-
<li key={page.slug}>
30-
<a href={"/"+page.slug}>{page.data.title}</a>
28+
{pages.filter(page => page.id.indexOf("/knowledge-graph/")!=-1).map(page => (
29+
<li key={page.id}>
30+
<a href={"/"+page.id}>{page.data.title}</a>
3131
</li>
3232
))}
3333
</ul>

src/lib/arxiv.spec.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { assert, expect, test } from 'vitest';
1+
import { expect, test } from 'vitest';
22

33
import { Effect, Either } from "effect"
44
import { FetchHttpClient } from "@effect/platform"
55

66
import { getArxivDetails } from './arxiv'
7-
import { type ArxivEntry } from './arxiv'
87

98
test('arxiv fetch well-known entry', async () => {
109
const arxivid = '2402.07630';

src/lib/arxiv.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
import {
2-
HttpClient,
3-
HttpClientRequest,
4-
HttpClientResponse,
5-
HttpClientError
2+
HttpClient
63
} from "@effect/platform"
7-
import type { Cause } from "effect"
84
import { Effect, Either } from "effect"
95
import * as convert from 'xml-js';
106

117
import { Schema } from "effect"
12-
import type { ParseError } from "effect/ParseResult";
13-
import type { ParseOptions } from "effect/SchemaAST";
148

159
import papers from '../data/papers.json';
1610

src/pages/appendices/research/[paper].astro

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
import { Code } from 'astro:components';
32
43
import { Effect, Either, ParseResult } from "effect"
54
import { FetchHttpClient } from "@effect/platform"

vitest.config.ts

-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22
import { getViteConfig } from 'astro/config';
33

44
export default getViteConfig({
5-
test: {
6-
/* for example, use global to avoid globals imports (describe, test, expect): */
7-
// globals: true,
8-
},
95
});

0 commit comments

Comments
 (0)