Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@fontsource/ibm-plex-mono": "^5.2.5",
"@fontsource/ibm-plex-sans": "^5.2.5",
"astro": "^5.8.1",
"marked": "^16.1.2",
"sharp": "^0.34.1",
"starlight-links-validator": "^0.16.0",
"starlight-llms-txt": "^0.5.1",
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

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

597 changes: 421 additions & 176 deletions public/docs-bundle.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
'docs': defineCollection({ schema: docsSchema() }),
};
26 changes: 26 additions & 0 deletions src/pages/changelog.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
import { marked } from 'marked';

interface Release {
name: string;
html_url: string;
published_at: string;
body: string;
}

const response = await fetch('https://api.github.com/repos/firebase/genkit/releases');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const response = await fetch('https://api.github.com/repos/firebase/genkit/releases');
const response = await fetch('https://api.github.com/repos/firebase/genkit/releases?per_page=10');

const releases: Release[] = await response.json();
---

<StarlightPage frontmatter={{ title: 'Changelog' }}>
{
releases.map((release) => (
<div class="sl-markdown-content">
<h2>{release.name}</h2> ({new Date(release.published_at).toLocaleDateString()})
<div class="release-body" set:html={marked.parse(release.body)} />
<hr />
</div>
))
}
</StarlightPage>
1 change: 1 addition & 0 deletions src/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const JS_SIDEBAR = [
{ label: "Get started", slug: "docs/get-started" },
{ label: "Developer tools", slug: "docs/devtools" },
{ label: "MCP Server", slug: "docs/mcp-server" },
{ label: "Changelog", link: "/changelog" },
{
label: "Tutorials",
items: [
Expand Down
25 changes: 24 additions & 1 deletion src/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,27 @@ h1 {

[data-theme="light"] .sidebar-content a[aria-current="page"]:hover {
color: var(--sl-color-accent);
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move these into src/pages/changelog.astro?

.release-notes {
white-space: pre-wrap;
word-break: break-word;
}

.no-underline {
text-decoration: none;
}

.flex-center {
display: flex;
align-items: center;
gap: 0.5rem;
}

.release-body h2 {
font-size: 1.25rem;
}

.release-body h3 {
font-size: 1.1rem;
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"exclude": ["dist"],
"compilerOptions": {
"baseUrl": ".",
"strictNullChecks": true,
"paths": {
"@/*": ["src/*"]
}
},
"jsx": "react-jsx",
"jsxImportSource": "astro"
}
}